1. Packages
  2. Volcengine
  3. API Docs
  4. alb
  5. Rule
Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
volcengine logo
Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine

    Provides a resource to manage alb rule

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    // Basic edition
    const foo = new volcengine.alb.Rule("foo", {
        description: "test",
        domain: "www.test.com",
        listenerId: "lsn-1iidd19u4oni874adhezjkyj3",
        redirectConfig: {
            redirectDomain: "www.testtest.com",
            redirectHttpCode: "302",
            redirectPort: "555",
            redirectUri: "/testtest",
        },
        rewriteConfig: {
            rewritePath: "/test",
        },
        rewriteEnabled: "off",
        ruleAction: "Redirect",
        serverGroupId: "rsp-1g72w74y4umf42zbhq4k4hnln",
        trafficLimitEnabled: "off",
        trafficLimitQps: 100,
        url: "/test",
    });
    // Standard edition
    const example = new volcengine.alb.Rule("example", {
        description: "standard edition alb rule",
        listenerId: "lsn-bddjp5fcof0g8dv40naga1yd",
        priority: 1,
        ruleAction: "",
        ruleActions: [{
            forwardGroupConfig: {
                serverGroupStickySession: {
                    enabled: "off",
                },
                serverGroupTuples: [{
                    serverGroupId: "rsp-bdd1lpcbvv288dv40ov1sye0",
                    weight: 50,
                }],
            },
            type: "ForwardGroup",
        }],
        ruleConditions: [
            {
                hostConfig: {
                    values: ["www.example.com"],
                },
                type: "Host",
            },
            {
                pathConfig: {
                    values: ["/app/*"],
                },
                type: "Path",
            },
        ],
        url: "",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    # Basic edition
    foo = volcengine.alb.Rule("foo",
        description="test",
        domain="www.test.com",
        listener_id="lsn-1iidd19u4oni874adhezjkyj3",
        redirect_config=volcengine.alb.RuleRedirectConfigArgs(
            redirect_domain="www.testtest.com",
            redirect_http_code="302",
            redirect_port="555",
            redirect_uri="/testtest",
        ),
        rewrite_config=volcengine.alb.RuleRewriteConfigArgs(
            rewrite_path="/test",
        ),
        rewrite_enabled="off",
        rule_action="Redirect",
        server_group_id="rsp-1g72w74y4umf42zbhq4k4hnln",
        traffic_limit_enabled="off",
        traffic_limit_qps=100,
        url="/test")
    # Standard edition
    example = volcengine.alb.Rule("example",
        description="standard edition alb rule",
        listener_id="lsn-bddjp5fcof0g8dv40naga1yd",
        priority=1,
        rule_action="",
        rule_actions=[volcengine.alb.RuleRuleActionArgs(
            forward_group_config=volcengine.alb.RuleRuleActionForwardGroupConfigArgs(
                server_group_sticky_session=volcengine.alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs(
                    enabled="off",
                ),
                server_group_tuples=[volcengine.alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs(
                    server_group_id="rsp-bdd1lpcbvv288dv40ov1sye0",
                    weight=50,
                )],
            ),
            type="ForwardGroup",
        )],
        rule_conditions=[
            volcengine.alb.RuleRuleConditionArgs(
                host_config=volcengine.alb.RuleRuleConditionHostConfigArgs(
                    values=["www.example.com"],
                ),
                type="Host",
            ),
            volcengine.alb.RuleRuleConditionArgs(
                path_config=volcengine.alb.RuleRuleConditionPathConfigArgs(
                    values=["/app/*"],
                ),
                type="Path",
            ),
        ],
        url="")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/alb"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Basic edition
    		_, err := alb.NewRule(ctx, "foo", &alb.RuleArgs{
    			Description: pulumi.String("test"),
    			Domain:      pulumi.String("www.test.com"),
    			ListenerId:  pulumi.String("lsn-1iidd19u4oni874adhezjkyj3"),
    			RedirectConfig: &alb.RuleRedirectConfigArgs{
    				RedirectDomain:   pulumi.String("www.testtest.com"),
    				RedirectHttpCode: pulumi.String("302"),
    				RedirectPort:     pulumi.String("555"),
    				RedirectUri:      pulumi.String("/testtest"),
    			},
    			RewriteConfig: &alb.RuleRewriteConfigArgs{
    				RewritePath: pulumi.String("/test"),
    			},
    			RewriteEnabled:      pulumi.String("off"),
    			RuleAction:          pulumi.String("Redirect"),
    			ServerGroupId:       pulumi.String("rsp-1g72w74y4umf42zbhq4k4hnln"),
    			TrafficLimitEnabled: pulumi.String("off"),
    			TrafficLimitQps:     pulumi.Int(100),
    			Url:                 pulumi.String("/test"),
    		})
    		if err != nil {
    			return err
    		}
    		// Standard edition
    		_, err = alb.NewRule(ctx, "example", &alb.RuleArgs{
    			Description: pulumi.String("standard edition alb rule"),
    			ListenerId:  pulumi.String("lsn-bddjp5fcof0g8dv40naga1yd"),
    			Priority:    pulumi.Int(1),
    			RuleAction:  pulumi.String(""),
    			RuleActions: alb.RuleRuleActionArray{
    				&alb.RuleRuleActionArgs{
    					ForwardGroupConfig: &alb.RuleRuleActionForwardGroupConfigArgs{
    						ServerGroupStickySession: &alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs{
    							Enabled: pulumi.String("off"),
    						},
    						ServerGroupTuples: alb.RuleRuleActionForwardGroupConfigServerGroupTupleArray{
    							&alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs{
    								ServerGroupId: pulumi.String("rsp-bdd1lpcbvv288dv40ov1sye0"),
    								Weight:        pulumi.Int(50),
    							},
    						},
    					},
    					Type: pulumi.String("ForwardGroup"),
    				},
    			},
    			RuleConditions: alb.RuleRuleConditionArray{
    				&alb.RuleRuleConditionArgs{
    					HostConfig: &alb.RuleRuleConditionHostConfigArgs{
    						Values: pulumi.StringArray{
    							pulumi.String("www.example.com"),
    						},
    					},
    					Type: pulumi.String("Host"),
    				},
    				&alb.RuleRuleConditionArgs{
    					PathConfig: &alb.RuleRuleConditionPathConfigArgs{
    						Values: pulumi.StringArray{
    							pulumi.String("/app/*"),
    						},
    					},
    					Type: pulumi.String("Path"),
    				},
    			},
    			Url: pulumi.String(""),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        // Basic edition
        var foo = new Volcengine.Alb.Rule("foo", new()
        {
            Description = "test",
            Domain = "www.test.com",
            ListenerId = "lsn-1iidd19u4oni874adhezjkyj3",
            RedirectConfig = new Volcengine.Alb.Inputs.RuleRedirectConfigArgs
            {
                RedirectDomain = "www.testtest.com",
                RedirectHttpCode = "302",
                RedirectPort = "555",
                RedirectUri = "/testtest",
            },
            RewriteConfig = new Volcengine.Alb.Inputs.RuleRewriteConfigArgs
            {
                RewritePath = "/test",
            },
            RewriteEnabled = "off",
            RuleAction = "Redirect",
            ServerGroupId = "rsp-1g72w74y4umf42zbhq4k4hnln",
            TrafficLimitEnabled = "off",
            TrafficLimitQps = 100,
            Url = "/test",
        });
    
        // Standard edition
        var example = new Volcengine.Alb.Rule("example", new()
        {
            Description = "standard edition alb rule",
            ListenerId = "lsn-bddjp5fcof0g8dv40naga1yd",
            Priority = 1,
            RuleAction = "",
            RuleActions = new[]
            {
                new Volcengine.Alb.Inputs.RuleRuleActionArgs
                {
                    ForwardGroupConfig = new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigArgs
                    {
                        ServerGroupStickySession = new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs
                        {
                            Enabled = "off",
                        },
                        ServerGroupTuples = new[]
                        {
                            new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupTupleArgs
                            {
                                ServerGroupId = "rsp-bdd1lpcbvv288dv40ov1sye0",
                                Weight = 50,
                            },
                        },
                    },
                    Type = "ForwardGroup",
                },
            },
            RuleConditions = new[]
            {
                new Volcengine.Alb.Inputs.RuleRuleConditionArgs
                {
                    HostConfig = new Volcengine.Alb.Inputs.RuleRuleConditionHostConfigArgs
                    {
                        Values = new[]
                        {
                            "www.example.com",
                        },
                    },
                    Type = "Host",
                },
                new Volcengine.Alb.Inputs.RuleRuleConditionArgs
                {
                    PathConfig = new Volcengine.Alb.Inputs.RuleRuleConditionPathConfigArgs
                    {
                        Values = new[]
                        {
                            "/app/*",
                        },
                    },
                    Type = "Path",
                },
            },
            Url = "",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.alb.Rule;
    import com.pulumi.volcengine.alb.RuleArgs;
    import com.pulumi.volcengine.alb.inputs.RuleRedirectConfigArgs;
    import com.pulumi.volcengine.alb.inputs.RuleRewriteConfigArgs;
    import com.pulumi.volcengine.alb.inputs.RuleRuleActionArgs;
    import com.pulumi.volcengine.alb.inputs.RuleRuleActionForwardGroupConfigArgs;
    import com.pulumi.volcengine.alb.inputs.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs;
    import com.pulumi.volcengine.alb.inputs.RuleRuleConditionArgs;
    import com.pulumi.volcengine.alb.inputs.RuleRuleConditionHostConfigArgs;
    import com.pulumi.volcengine.alb.inputs.RuleRuleConditionPathConfigArgs;
    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) {
            // Basic edition
            var foo = new Rule("foo", RuleArgs.builder()        
                .description("test")
                .domain("www.test.com")
                .listenerId("lsn-1iidd19u4oni874adhezjkyj3")
                .redirectConfig(RuleRedirectConfigArgs.builder()
                    .redirectDomain("www.testtest.com")
                    .redirectHttpCode("302")
                    .redirectPort("555")
                    .redirectUri("/testtest")
                    .build())
                .rewriteConfig(RuleRewriteConfigArgs.builder()
                    .rewritePath("/test")
                    .build())
                .rewriteEnabled("off")
                .ruleAction("Redirect")
                .serverGroupId("rsp-1g72w74y4umf42zbhq4k4hnln")
                .trafficLimitEnabled("off")
                .trafficLimitQps(100)
                .url("/test")
                .build());
    
            // Standard edition
            var example = new Rule("example", RuleArgs.builder()        
                .description("standard edition alb rule")
                .listenerId("lsn-bddjp5fcof0g8dv40naga1yd")
                .priority(1)
                .ruleAction("")
                .ruleActions(RuleRuleActionArgs.builder()
                    .forwardGroupConfig(RuleRuleActionForwardGroupConfigArgs.builder()
                        .serverGroupStickySession(RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs.builder()
                            .enabled("off")
                            .build())
                        .serverGroupTuples(RuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
                            .serverGroupId("rsp-bdd1lpcbvv288dv40ov1sye0")
                            .weight(50)
                            .build())
                        .build())
                    .type("ForwardGroup")
                    .build())
                .ruleConditions(            
                    RuleRuleConditionArgs.builder()
                        .hostConfig(RuleRuleConditionHostConfigArgs.builder()
                            .values("www.example.com")
                            .build())
                        .type("Host")
                        .build(),
                    RuleRuleConditionArgs.builder()
                        .pathConfig(RuleRuleConditionPathConfigArgs.builder()
                            .values("/app/*")
                            .build())
                        .type("Path")
                        .build())
                .url("")
                .build());
    
        }
    }
    
    resources:
      # Basic edition
      foo:
        type: volcengine:alb:Rule
        properties:
          description: test
          domain: www.test.com
          listenerId: lsn-1iidd19u4oni874adhezjkyj3
          redirectConfig:
            redirectDomain: www.testtest.com
            redirectHttpCode: '302'
            redirectPort: '555'
            redirectUri: /testtest
          rewriteConfig:
            rewritePath: /test
          rewriteEnabled: off
          ruleAction: Redirect
          serverGroupId: rsp-1g72w74y4umf42zbhq4k4hnln
          trafficLimitEnabled: off
          trafficLimitQps: 100
          url: /test
      # Standard edition
      example:
        type: volcengine:alb:Rule
        properties:
          description: standard edition alb rule
          listenerId: lsn-bddjp5fcof0g8dv40naga1yd
          priority: 1
          ruleAction:
          ruleActions:
            - forwardGroupConfig:
                serverGroupStickySession:
                  enabled: off
                serverGroupTuples:
                  - serverGroupId: rsp-bdd1lpcbvv288dv40ov1sye0
                    weight: 50
              type: ForwardGroup
          ruleConditions:
            - hostConfig:
                values:
                  - www.example.com
              type: Host
            - pathConfig:
                values:
                  - /app/*
              type: Path
          url:
    

    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,
             rule_action: Optional[str] = None,
             rule_actions: Optional[Sequence[RuleRuleActionArgs]] = None,
             rule_conditions: Optional[Sequence[RuleRuleConditionArgs]] = None,
             redirect_config: Optional[RuleRedirectConfigArgs] = None,
             rewrite_config: Optional[RuleRewriteConfigArgs] = None,
             rewrite_enabled: Optional[str] = None,
             domain: Optional[str] = None,
             description: Optional[str] = None,
             priority: Optional[int] = None,
             server_group_id: Optional[str] = None,
             server_group_tuples: Optional[Sequence[RuleServerGroupTupleArgs]] = None,
             sticky_session_enabled: Optional[str] = None,
             sticky_session_timeout: Optional[int] = None,
             traffic_limit_enabled: Optional[str] = None,
             traffic_limit_qps: Optional[int] = None,
             url: Optional[str] = None)
    func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
    public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    type: volcengine: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 Volcengine.Alb.Rule("ruleResource", new()
    {
        ListenerId = "string",
        RuleAction = "string",
        RuleActions = new[]
        {
            new Volcengine.Alb.Inputs.RuleRuleActionArgs
            {
                FixedResponseConfig = new Volcengine.Alb.Inputs.RuleRuleActionFixedResponseConfigArgs
                {
                    ContentType = "string",
                    ResponseBody = "string",
                    ResponseCode = "string",
                    ResponseMessage = "string",
                },
                ForwardGroupConfig = new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigArgs
                {
                    ServerGroupStickySession = new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs
                    {
                        Enabled = "string",
                        Timeout = 0,
                    },
                    ServerGroupTuples = new[]
                    {
                        new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupTupleArgs
                        {
                            ServerGroupId = "string",
                            Weight = 0,
                        },
                    },
                },
                RedirectConfig = new Volcengine.Alb.Inputs.RuleRuleActionRedirectConfigArgs
                {
                    Host = "string",
                    HttpCode = "string",
                    Path = "string",
                    Port = "string",
                    Protocol = "string",
                },
                RewriteConfig = new Volcengine.Alb.Inputs.RuleRuleActionRewriteConfigArgs
                {
                    Path = "string",
                },
                TrafficLimitConfig = new Volcengine.Alb.Inputs.RuleRuleActionTrafficLimitConfigArgs
                {
                    Qps = 0,
                },
                Type = "string",
            },
        },
        RuleConditions = new[]
        {
            new Volcengine.Alb.Inputs.RuleRuleConditionArgs
            {
                HeaderConfig = new Volcengine.Alb.Inputs.RuleRuleConditionHeaderConfigArgs
                {
                    Key = "string",
                    Values = new[]
                    {
                        "string",
                    },
                },
                HostConfig = new Volcengine.Alb.Inputs.RuleRuleConditionHostConfigArgs
                {
                    Values = new[]
                    {
                        "string",
                    },
                },
                MethodConfig = new Volcengine.Alb.Inputs.RuleRuleConditionMethodConfigArgs
                {
                    Values = new[]
                    {
                        "string",
                    },
                },
                PathConfig = new Volcengine.Alb.Inputs.RuleRuleConditionPathConfigArgs
                {
                    Values = new[]
                    {
                        "string",
                    },
                },
                QueryStringConfig = new Volcengine.Alb.Inputs.RuleRuleConditionQueryStringConfigArgs
                {
                    Values = new[]
                    {
                        new Volcengine.Alb.Inputs.RuleRuleConditionQueryStringConfigValueArgs
                        {
                            Key = "string",
                            Value = "string",
                        },
                    },
                },
                Type = "string",
            },
        },
        RedirectConfig = new Volcengine.Alb.Inputs.RuleRedirectConfigArgs
        {
            RedirectDomain = "string",
            RedirectHttpCode = "string",
            RedirectPort = "string",
            RedirectProtocol = "string",
            RedirectUri = "string",
        },
        RewriteConfig = new Volcengine.Alb.Inputs.RuleRewriteConfigArgs
        {
            RewritePath = "string",
        },
        RewriteEnabled = "string",
        Domain = "string",
        Description = "string",
        Priority = 0,
        ServerGroupId = "string",
        ServerGroupTuples = new[]
        {
            new Volcengine.Alb.Inputs.RuleServerGroupTupleArgs
            {
                ServerGroupId = "string",
                Weight = 0,
            },
        },
        StickySessionEnabled = "string",
        StickySessionTimeout = 0,
        TrafficLimitEnabled = "string",
        TrafficLimitQps = 0,
        Url = "string",
    });
    
    example, err := alb.NewRule(ctx, "ruleResource", &alb.RuleArgs{
    	ListenerId: pulumi.String("string"),
    	RuleAction: pulumi.String("string"),
    	RuleActions: alb.RuleRuleActionArray{
    		&alb.RuleRuleActionArgs{
    			FixedResponseConfig: &alb.RuleRuleActionFixedResponseConfigArgs{
    				ContentType:     pulumi.String("string"),
    				ResponseBody:    pulumi.String("string"),
    				ResponseCode:    pulumi.String("string"),
    				ResponseMessage: pulumi.String("string"),
    			},
    			ForwardGroupConfig: &alb.RuleRuleActionForwardGroupConfigArgs{
    				ServerGroupStickySession: &alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs{
    					Enabled: pulumi.String("string"),
    					Timeout: pulumi.Int(0),
    				},
    				ServerGroupTuples: alb.RuleRuleActionForwardGroupConfigServerGroupTupleArray{
    					&alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs{
    						ServerGroupId: pulumi.String("string"),
    						Weight:        pulumi.Int(0),
    					},
    				},
    			},
    			RedirectConfig: &alb.RuleRuleActionRedirectConfigArgs{
    				Host:     pulumi.String("string"),
    				HttpCode: pulumi.String("string"),
    				Path:     pulumi.String("string"),
    				Port:     pulumi.String("string"),
    				Protocol: pulumi.String("string"),
    			},
    			RewriteConfig: &alb.RuleRuleActionRewriteConfigArgs{
    				Path: pulumi.String("string"),
    			},
    			TrafficLimitConfig: &alb.RuleRuleActionTrafficLimitConfigArgs{
    				Qps: pulumi.Int(0),
    			},
    			Type: pulumi.String("string"),
    		},
    	},
    	RuleConditions: alb.RuleRuleConditionArray{
    		&alb.RuleRuleConditionArgs{
    			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"),
    					},
    				},
    			},
    			Type: pulumi.String("string"),
    		},
    	},
    	RedirectConfig: &alb.RuleRedirectConfigArgs{
    		RedirectDomain:   pulumi.String("string"),
    		RedirectHttpCode: pulumi.String("string"),
    		RedirectPort:     pulumi.String("string"),
    		RedirectProtocol: pulumi.String("string"),
    		RedirectUri:      pulumi.String("string"),
    	},
    	RewriteConfig: &alb.RuleRewriteConfigArgs{
    		RewritePath: pulumi.String("string"),
    	},
    	RewriteEnabled: pulumi.String("string"),
    	Domain:         pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	Priority:       pulumi.Int(0),
    	ServerGroupId:  pulumi.String("string"),
    	ServerGroupTuples: alb.RuleServerGroupTupleArray{
    		&alb.RuleServerGroupTupleArgs{
    			ServerGroupId: pulumi.String("string"),
    			Weight:        pulumi.Int(0),
    		},
    	},
    	StickySessionEnabled: pulumi.String("string"),
    	StickySessionTimeout: pulumi.Int(0),
    	TrafficLimitEnabled:  pulumi.String("string"),
    	TrafficLimitQps:      pulumi.Int(0),
    	Url:                  pulumi.String("string"),
    })
    
    var ruleResource = new com.pulumi.volcengine.alb.Rule("ruleResource", com.pulumi.volcengine.alb.RuleArgs.builder()
        .listenerId("string")
        .ruleAction("string")
        .ruleActions(RuleRuleActionArgs.builder()
            .fixedResponseConfig(RuleRuleActionFixedResponseConfigArgs.builder()
                .contentType("string")
                .responseBody("string")
                .responseCode("string")
                .responseMessage("string")
                .build())
            .forwardGroupConfig(RuleRuleActionForwardGroupConfigArgs.builder()
                .serverGroupStickySession(RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs.builder()
                    .enabled("string")
                    .timeout(0)
                    .build())
                .serverGroupTuples(RuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
                    .serverGroupId("string")
                    .weight(0)
                    .build())
                .build())
            .redirectConfig(RuleRuleActionRedirectConfigArgs.builder()
                .host("string")
                .httpCode("string")
                .path("string")
                .port("string")
                .protocol("string")
                .build())
            .rewriteConfig(RuleRuleActionRewriteConfigArgs.builder()
                .path("string")
                .build())
            .trafficLimitConfig(RuleRuleActionTrafficLimitConfigArgs.builder()
                .qps(0)
                .build())
            .type("string")
            .build())
        .ruleConditions(RuleRuleConditionArgs.builder()
            .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())
            .type("string")
            .build())
        .redirectConfig(RuleRedirectConfigArgs.builder()
            .redirectDomain("string")
            .redirectHttpCode("string")
            .redirectPort("string")
            .redirectProtocol("string")
            .redirectUri("string")
            .build())
        .rewriteConfig(RuleRewriteConfigArgs.builder()
            .rewritePath("string")
            .build())
        .rewriteEnabled("string")
        .domain("string")
        .description("string")
        .priority(0)
        .serverGroupId("string")
        .serverGroupTuples(RuleServerGroupTupleArgs.builder()
            .serverGroupId("string")
            .weight(0)
            .build())
        .stickySessionEnabled("string")
        .stickySessionTimeout(0)
        .trafficLimitEnabled("string")
        .trafficLimitQps(0)
        .url("string")
        .build());
    
    rule_resource = volcengine.alb.Rule("ruleResource",
        listener_id="string",
        rule_action="string",
        rule_actions=[{
            "fixed_response_config": {
                "content_type": "string",
                "response_body": "string",
                "response_code": "string",
                "response_message": "string",
            },
            "forward_group_config": {
                "server_group_sticky_session": {
                    "enabled": "string",
                    "timeout": 0,
                },
                "server_group_tuples": [{
                    "server_group_id": "string",
                    "weight": 0,
                }],
            },
            "redirect_config": {
                "host": "string",
                "http_code": "string",
                "path": "string",
                "port": "string",
                "protocol": "string",
            },
            "rewrite_config": {
                "path": "string",
            },
            "traffic_limit_config": {
                "qps": 0,
            },
            "type": "string",
        }],
        rule_conditions=[{
            "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",
                }],
            },
            "type": "string",
        }],
        redirect_config={
            "redirect_domain": "string",
            "redirect_http_code": "string",
            "redirect_port": "string",
            "redirect_protocol": "string",
            "redirect_uri": "string",
        },
        rewrite_config={
            "rewrite_path": "string",
        },
        rewrite_enabled="string",
        domain="string",
        description="string",
        priority=0,
        server_group_id="string",
        server_group_tuples=[{
            "server_group_id": "string",
            "weight": 0,
        }],
        sticky_session_enabled="string",
        sticky_session_timeout=0,
        traffic_limit_enabled="string",
        traffic_limit_qps=0,
        url="string")
    
    const ruleResource = new volcengine.alb.Rule("ruleResource", {
        listenerId: "string",
        ruleAction: "string",
        ruleActions: [{
            fixedResponseConfig: {
                contentType: "string",
                responseBody: "string",
                responseCode: "string",
                responseMessage: "string",
            },
            forwardGroupConfig: {
                serverGroupStickySession: {
                    enabled: "string",
                    timeout: 0,
                },
                serverGroupTuples: [{
                    serverGroupId: "string",
                    weight: 0,
                }],
            },
            redirectConfig: {
                host: "string",
                httpCode: "string",
                path: "string",
                port: "string",
                protocol: "string",
            },
            rewriteConfig: {
                path: "string",
            },
            trafficLimitConfig: {
                qps: 0,
            },
            type: "string",
        }],
        ruleConditions: [{
            headerConfig: {
                key: "string",
                values: ["string"],
            },
            hostConfig: {
                values: ["string"],
            },
            methodConfig: {
                values: ["string"],
            },
            pathConfig: {
                values: ["string"],
            },
            queryStringConfig: {
                values: [{
                    key: "string",
                    value: "string",
                }],
            },
            type: "string",
        }],
        redirectConfig: {
            redirectDomain: "string",
            redirectHttpCode: "string",
            redirectPort: "string",
            redirectProtocol: "string",
            redirectUri: "string",
        },
        rewriteConfig: {
            rewritePath: "string",
        },
        rewriteEnabled: "string",
        domain: "string",
        description: "string",
        priority: 0,
        serverGroupId: "string",
        serverGroupTuples: [{
            serverGroupId: "string",
            weight: 0,
        }],
        stickySessionEnabled: "string",
        stickySessionTimeout: 0,
        trafficLimitEnabled: "string",
        trafficLimitQps: 0,
        url: "string",
    });
    
    type: volcengine:alb:Rule
    properties:
        description: string
        domain: string
        listenerId: string
        priority: 0
        redirectConfig:
            redirectDomain: string
            redirectHttpCode: string
            redirectPort: string
            redirectProtocol: string
            redirectUri: string
        rewriteConfig:
            rewritePath: string
        rewriteEnabled: string
        ruleAction: string
        ruleActions:
            - fixedResponseConfig:
                contentType: string
                responseBody: string
                responseCode: string
                responseMessage: string
              forwardGroupConfig:
                serverGroupStickySession:
                    enabled: string
                    timeout: 0
                serverGroupTuples:
                    - serverGroupId: string
                      weight: 0
              redirectConfig:
                host: string
                httpCode: string
                path: string
                port: string
                protocol: string
              rewriteConfig:
                path: string
              trafficLimitConfig:
                qps: 0
              type: string
        ruleConditions:
            - headerConfig:
                key: string
                values:
                    - string
              hostConfig:
                values:
                    - string
              methodConfig:
                values:
                    - string
              pathConfig:
                values:
                    - string
              queryStringConfig:
                values:
                    - key: string
                      value: string
              type: string
        serverGroupId: string
        serverGroupTuples:
            - serverGroupId: string
              weight: 0
        stickySessionEnabled: string
        stickySessionTimeout: 0
        trafficLimitEnabled: string
        trafficLimitQps: 0
        url: 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 listener.
    RuleAction string
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    Description string
    The description of the Rule.
    Domain string
    The domain of Rule.
    Priority int
    The priority of the Rule.Only the standard version is supported.
    RedirectConfig RuleRedirectConfig
    The redirect related configuration.
    RewriteConfig RuleRewriteConfig
    The list of rewrite configurations.
    RewriteEnabled string
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    RuleActions List<RuleRuleAction>
    The rule actions for standard edition forwarding rules.
    RuleConditions List<RuleRuleCondition>
    The rule conditions for standard edition forwarding rules.
    ServerGroupId string
    Server group ID, this parameter is required if rule_action is empty.
    ServerGroupTuples List<RuleServerGroupTuple>
    Weight forwarded to the corresponding backend server group.
    StickySessionEnabled string
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    StickySessionTimeout int
    The group session stickiness timeout, in seconds.
    TrafficLimitEnabled string
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    TrafficLimitQps int
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    Url string
    The Url of Rule.
    ListenerId string
    The ID of listener.
    RuleAction string
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    Description string
    The description of the Rule.
    Domain string
    The domain of Rule.
    Priority int
    The priority of the Rule.Only the standard version is supported.
    RedirectConfig RuleRedirectConfigArgs
    The redirect related configuration.
    RewriteConfig RuleRewriteConfigArgs
    The list of rewrite configurations.
    RewriteEnabled string
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    RuleActions []RuleRuleActionArgs
    The rule actions for standard edition forwarding rules.
    RuleConditions []RuleRuleConditionArgs
    The rule conditions for standard edition forwarding rules.
    ServerGroupId string
    Server group ID, this parameter is required if rule_action is empty.
    ServerGroupTuples []RuleServerGroupTupleArgs
    Weight forwarded to the corresponding backend server group.
    StickySessionEnabled string
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    StickySessionTimeout int
    The group session stickiness timeout, in seconds.
    TrafficLimitEnabled string
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    TrafficLimitQps int
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    Url string
    The Url of Rule.
    listenerId String
    The ID of listener.
    ruleAction String
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    description String
    The description of the Rule.
    domain String
    The domain of Rule.
    priority Integer
    The priority of the Rule.Only the standard version is supported.
    redirectConfig RuleRedirectConfig
    The redirect related configuration.
    rewriteConfig RuleRewriteConfig
    The list of rewrite configurations.
    rewriteEnabled String
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    ruleActions List<RuleRuleAction>
    The rule actions for standard edition forwarding rules.
    ruleConditions List<RuleRuleCondition>
    The rule conditions for standard edition forwarding rules.
    serverGroupId String
    Server group ID, this parameter is required if rule_action is empty.
    serverGroupTuples List<RuleServerGroupTuple>
    Weight forwarded to the corresponding backend server group.
    stickySessionEnabled String
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    stickySessionTimeout Integer
    The group session stickiness timeout, in seconds.
    trafficLimitEnabled String
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    trafficLimitQps Integer
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    url String
    The Url of Rule.
    listenerId string
    The ID of listener.
    ruleAction string
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    description string
    The description of the Rule.
    domain string
    The domain of Rule.
    priority number
    The priority of the Rule.Only the standard version is supported.
    redirectConfig RuleRedirectConfig
    The redirect related configuration.
    rewriteConfig RuleRewriteConfig
    The list of rewrite configurations.
    rewriteEnabled string
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    ruleActions RuleRuleAction[]
    The rule actions for standard edition forwarding rules.
    ruleConditions RuleRuleCondition[]
    The rule conditions for standard edition forwarding rules.
    serverGroupId string
    Server group ID, this parameter is required if rule_action is empty.
    serverGroupTuples RuleServerGroupTuple[]
    Weight forwarded to the corresponding backend server group.
    stickySessionEnabled string
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    stickySessionTimeout number
    The group session stickiness timeout, in seconds.
    trafficLimitEnabled string
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    trafficLimitQps number
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    url string
    The Url of Rule.
    listener_id str
    The ID of listener.
    rule_action str
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    description str
    The description of the Rule.
    domain str
    The domain of Rule.
    priority int
    The priority of the Rule.Only the standard version is supported.
    redirect_config RuleRedirectConfigArgs
    The redirect related configuration.
    rewrite_config RuleRewriteConfigArgs
    The list of rewrite configurations.
    rewrite_enabled str
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    rule_actions Sequence[RuleRuleActionArgs]
    The rule actions for standard edition forwarding rules.
    rule_conditions Sequence[RuleRuleConditionArgs]
    The rule conditions for standard edition forwarding rules.
    server_group_id str
    Server group ID, this parameter is required if rule_action is empty.
    server_group_tuples Sequence[RuleServerGroupTupleArgs]
    Weight forwarded to the corresponding backend server group.
    sticky_session_enabled str
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    sticky_session_timeout int
    The group session stickiness timeout, in seconds.
    traffic_limit_enabled str
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    traffic_limit_qps int
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    url str
    The Url of Rule.
    listenerId String
    The ID of listener.
    ruleAction String
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    description String
    The description of the Rule.
    domain String
    The domain of Rule.
    priority Number
    The priority of the Rule.Only the standard version is supported.
    redirectConfig Property Map
    The redirect related configuration.
    rewriteConfig Property Map
    The list of rewrite configurations.
    rewriteEnabled String
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    ruleActions List<Property Map>
    The rule actions for standard edition forwarding rules.
    ruleConditions List<Property Map>
    The rule conditions for standard edition forwarding rules.
    serverGroupId String
    Server group ID, this parameter is required if rule_action is empty.
    serverGroupTuples List<Property Map>
    Weight forwarded to the corresponding backend server group.
    stickySessionEnabled String
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    stickySessionTimeout Number
    The group session stickiness timeout, in seconds.
    trafficLimitEnabled String
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    trafficLimitQps Number
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    url String
    The Url of Rule.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    The ID of rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    The ID of rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    The ID of rule.
    id string
    The provider-assigned unique ID for this managed resource.
    ruleId string
    The ID of rule.
    id str
    The provider-assigned unique ID for this managed resource.
    rule_id str
    The ID of rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    The ID of rule.

    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,
            description: Optional[str] = None,
            domain: Optional[str] = None,
            listener_id: Optional[str] = None,
            priority: Optional[int] = None,
            redirect_config: Optional[RuleRedirectConfigArgs] = None,
            rewrite_config: Optional[RuleRewriteConfigArgs] = None,
            rewrite_enabled: Optional[str] = None,
            rule_action: Optional[str] = None,
            rule_actions: Optional[Sequence[RuleRuleActionArgs]] = None,
            rule_conditions: Optional[Sequence[RuleRuleConditionArgs]] = None,
            rule_id: Optional[str] = None,
            server_group_id: Optional[str] = None,
            server_group_tuples: Optional[Sequence[RuleServerGroupTupleArgs]] = None,
            sticky_session_enabled: Optional[str] = None,
            sticky_session_timeout: Optional[int] = None,
            traffic_limit_enabled: Optional[str] = None,
            traffic_limit_qps: Optional[int] = None,
            url: Optional[str] = None) -> Rule
    func 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: volcengine: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.
    The following state arguments are supported:
    Description string
    The description of the Rule.
    Domain string
    The domain of Rule.
    ListenerId string
    The ID of listener.
    Priority int
    The priority of the Rule.Only the standard version is supported.
    RedirectConfig RuleRedirectConfig
    The redirect related configuration.
    RewriteConfig RuleRewriteConfig
    The list of rewrite configurations.
    RewriteEnabled string
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    RuleAction string
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    RuleActions List<RuleRuleAction>
    The rule actions for standard edition forwarding rules.
    RuleConditions List<RuleRuleCondition>
    The rule conditions for standard edition forwarding rules.
    RuleId string
    The ID of rule.
    ServerGroupId string
    Server group ID, this parameter is required if rule_action is empty.
    ServerGroupTuples List<RuleServerGroupTuple>
    Weight forwarded to the corresponding backend server group.
    StickySessionEnabled string
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    StickySessionTimeout int
    The group session stickiness timeout, in seconds.
    TrafficLimitEnabled string
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    TrafficLimitQps int
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    Url string
    The Url of Rule.
    Description string
    The description of the Rule.
    Domain string
    The domain of Rule.
    ListenerId string
    The ID of listener.
    Priority int
    The priority of the Rule.Only the standard version is supported.
    RedirectConfig RuleRedirectConfigArgs
    The redirect related configuration.
    RewriteConfig RuleRewriteConfigArgs
    The list of rewrite configurations.
    RewriteEnabled string
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    RuleAction string
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    RuleActions []RuleRuleActionArgs
    The rule actions for standard edition forwarding rules.
    RuleConditions []RuleRuleConditionArgs
    The rule conditions for standard edition forwarding rules.
    RuleId string
    The ID of rule.
    ServerGroupId string
    Server group ID, this parameter is required if rule_action is empty.
    ServerGroupTuples []RuleServerGroupTupleArgs
    Weight forwarded to the corresponding backend server group.
    StickySessionEnabled string
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    StickySessionTimeout int
    The group session stickiness timeout, in seconds.
    TrafficLimitEnabled string
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    TrafficLimitQps int
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    Url string
    The Url of Rule.
    description String
    The description of the Rule.
    domain String
    The domain of Rule.
    listenerId String
    The ID of listener.
    priority Integer
    The priority of the Rule.Only the standard version is supported.
    redirectConfig RuleRedirectConfig
    The redirect related configuration.
    rewriteConfig RuleRewriteConfig
    The list of rewrite configurations.
    rewriteEnabled String
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    ruleAction String
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    ruleActions List<RuleRuleAction>
    The rule actions for standard edition forwarding rules.
    ruleConditions List<RuleRuleCondition>
    The rule conditions for standard edition forwarding rules.
    ruleId String
    The ID of rule.
    serverGroupId String
    Server group ID, this parameter is required if rule_action is empty.
    serverGroupTuples List<RuleServerGroupTuple>
    Weight forwarded to the corresponding backend server group.
    stickySessionEnabled String
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    stickySessionTimeout Integer
    The group session stickiness timeout, in seconds.
    trafficLimitEnabled String
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    trafficLimitQps Integer
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    url String
    The Url of Rule.
    description string
    The description of the Rule.
    domain string
    The domain of Rule.
    listenerId string
    The ID of listener.
    priority number
    The priority of the Rule.Only the standard version is supported.
    redirectConfig RuleRedirectConfig
    The redirect related configuration.
    rewriteConfig RuleRewriteConfig
    The list of rewrite configurations.
    rewriteEnabled string
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    ruleAction string
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    ruleActions RuleRuleAction[]
    The rule actions for standard edition forwarding rules.
    ruleConditions RuleRuleCondition[]
    The rule conditions for standard edition forwarding rules.
    ruleId string
    The ID of rule.
    serverGroupId string
    Server group ID, this parameter is required if rule_action is empty.
    serverGroupTuples RuleServerGroupTuple[]
    Weight forwarded to the corresponding backend server group.
    stickySessionEnabled string
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    stickySessionTimeout number
    The group session stickiness timeout, in seconds.
    trafficLimitEnabled string
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    trafficLimitQps number
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    url string
    The Url of Rule.
    description str
    The description of the Rule.
    domain str
    The domain of Rule.
    listener_id str
    The ID of listener.
    priority int
    The priority of the Rule.Only the standard version is supported.
    redirect_config RuleRedirectConfigArgs
    The redirect related configuration.
    rewrite_config RuleRewriteConfigArgs
    The list of rewrite configurations.
    rewrite_enabled str
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    rule_action str
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    rule_actions Sequence[RuleRuleActionArgs]
    The rule actions for standard edition forwarding rules.
    rule_conditions Sequence[RuleRuleConditionArgs]
    The rule conditions for standard edition forwarding rules.
    rule_id str
    The ID of rule.
    server_group_id str
    Server group ID, this parameter is required if rule_action is empty.
    server_group_tuples Sequence[RuleServerGroupTupleArgs]
    Weight forwarded to the corresponding backend server group.
    sticky_session_enabled str
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    sticky_session_timeout int
    The group session stickiness timeout, in seconds.
    traffic_limit_enabled str
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    traffic_limit_qps int
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    url str
    The Url of Rule.
    description String
    The description of the Rule.
    domain String
    The domain of Rule.
    listenerId String
    The ID of listener.
    priority Number
    The priority of the Rule.Only the standard version is supported.
    redirectConfig Property Map
    The redirect related configuration.
    rewriteConfig Property Map
    The list of rewrite configurations.
    rewriteEnabled String
    Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
    ruleAction String
    The forwarding rule action, if this parameter is empty(""), forward to server group, if value is Redirect, will redirect.
    ruleActions List<Property Map>
    The rule actions for standard edition forwarding rules.
    ruleConditions List<Property Map>
    The rule conditions for standard edition forwarding rules.
    ruleId String
    The ID of rule.
    serverGroupId String
    Server group ID, this parameter is required if rule_action is empty.
    serverGroupTuples List<Property Map>
    Weight forwarded to the corresponding backend server group.
    stickySessionEnabled String
    Whether to enable group session stickiness. Valid values are 'on' and 'off'.
    stickySessionTimeout Number
    The group session stickiness timeout, in seconds.
    trafficLimitEnabled String
    Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
    trafficLimitQps Number
    When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
    url String
    The Url of Rule.

    Supporting Types

    RuleRedirectConfig, RuleRedirectConfigArgs

    RedirectDomain string
    The redirect domain, only support exact domain name.
    RedirectHttpCode string
    The redirect http code, support 301(default), 302, 307, 308.
    RedirectPort string
    The redirect port.
    RedirectProtocol string
    The redirect protocol, support HTTP, HTTPS(default).
    RedirectUri string
    The redirect URI.
    RedirectDomain string
    The redirect domain, only support exact domain name.
    RedirectHttpCode string
    The redirect http code, support 301(default), 302, 307, 308.
    RedirectPort string
    The redirect port.
    RedirectProtocol string
    The redirect protocol, support HTTP, HTTPS(default).
    RedirectUri string
    The redirect URI.
    redirectDomain String
    The redirect domain, only support exact domain name.
    redirectHttpCode String
    The redirect http code, support 301(default), 302, 307, 308.
    redirectPort String
    The redirect port.
    redirectProtocol String
    The redirect protocol, support HTTP, HTTPS(default).
    redirectUri String
    The redirect URI.
    redirectDomain string
    The redirect domain, only support exact domain name.
    redirectHttpCode string
    The redirect http code, support 301(default), 302, 307, 308.
    redirectPort string
    The redirect port.
    redirectProtocol string
    The redirect protocol, support HTTP, HTTPS(default).
    redirectUri string
    The redirect URI.
    redirect_domain str
    The redirect domain, only support exact domain name.
    redirect_http_code str
    The redirect http code, support 301(default), 302, 307, 308.
    redirect_port str
    The redirect port.
    redirect_protocol str
    The redirect protocol, support HTTP, HTTPS(default).
    redirect_uri str
    The redirect URI.
    redirectDomain String
    The redirect domain, only support exact domain name.
    redirectHttpCode String
    The redirect http code, support 301(default), 302, 307, 308.
    redirectPort String
    The redirect port.
    redirectProtocol String
    The redirect protocol, support HTTP, HTTPS(default).
    redirectUri String
    The redirect URI.

    RuleRewriteConfig, RuleRewriteConfigArgs

    RewritePath string
    Rewrite path.
    RewritePath string
    Rewrite path.
    rewritePath String
    Rewrite path.
    rewritePath string
    Rewrite path.
    rewrite_path str
    Rewrite path.
    rewritePath String
    Rewrite path.

    RuleRuleAction, RuleRuleActionArgs

    FixedResponseConfig RuleRuleActionFixedResponseConfig
    Fixed response configuration for fixed response type rule.
    ForwardGroupConfig RuleRuleActionForwardGroupConfig
    Forward group configuration for ForwardGroup type action.
    RedirectConfig RuleRuleActionRedirectConfig
    Redirect configuration for Redirect type action.
    RewriteConfig RuleRuleActionRewriteConfig
    Rewrite configuration for Rewrite type action.
    TrafficLimitConfig RuleRuleActionTrafficLimitConfig
    Traffic limit configuration for TrafficLimit type action.
    Type string
    The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
    FixedResponseConfig RuleRuleActionFixedResponseConfig
    Fixed response configuration for fixed response type rule.
    ForwardGroupConfig RuleRuleActionForwardGroupConfig
    Forward group configuration for ForwardGroup type action.
    RedirectConfig RuleRuleActionRedirectConfig
    Redirect configuration for Redirect type action.
    RewriteConfig RuleRuleActionRewriteConfig
    Rewrite configuration for Rewrite type action.
    TrafficLimitConfig RuleRuleActionTrafficLimitConfig
    Traffic limit configuration for TrafficLimit type action.
    Type string
    The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
    fixedResponseConfig RuleRuleActionFixedResponseConfig
    Fixed response configuration for fixed response type rule.
    forwardGroupConfig RuleRuleActionForwardGroupConfig
    Forward group configuration for ForwardGroup type action.
    redirectConfig RuleRuleActionRedirectConfig
    Redirect configuration for Redirect type action.
    rewriteConfig RuleRuleActionRewriteConfig
    Rewrite configuration for Rewrite type action.
    trafficLimitConfig RuleRuleActionTrafficLimitConfig
    Traffic limit configuration for TrafficLimit type action.
    type String
    The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
    fixedResponseConfig RuleRuleActionFixedResponseConfig
    Fixed response configuration for fixed response type rule.
    forwardGroupConfig RuleRuleActionForwardGroupConfig
    Forward group configuration for ForwardGroup type action.
    redirectConfig RuleRuleActionRedirectConfig
    Redirect configuration for Redirect type action.
    rewriteConfig RuleRuleActionRewriteConfig
    Rewrite configuration for Rewrite type action.
    trafficLimitConfig RuleRuleActionTrafficLimitConfig
    Traffic limit configuration for TrafficLimit type action.
    type string
    The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
    fixed_response_config RuleRuleActionFixedResponseConfig
    Fixed response configuration for fixed response type rule.
    forward_group_config RuleRuleActionForwardGroupConfig
    Forward group configuration for ForwardGroup type action.
    redirect_config RuleRuleActionRedirectConfig
    Redirect configuration for Redirect type action.
    rewrite_config RuleRuleActionRewriteConfig
    Rewrite configuration for Rewrite type action.
    traffic_limit_config RuleRuleActionTrafficLimitConfig
    Traffic limit configuration for TrafficLimit type action.
    type str
    The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
    fixedResponseConfig Property Map
    Fixed response configuration for fixed response type rule.
    forwardGroupConfig Property Map
    Forward group configuration for ForwardGroup type action.
    redirectConfig Property Map
    Redirect configuration for Redirect type action.
    rewriteConfig Property Map
    Rewrite configuration for Rewrite type action.
    trafficLimitConfig Property Map
    Traffic limit configuration for TrafficLimit type action.
    type String
    The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.

    RuleRuleActionFixedResponseConfig, RuleRuleActionFixedResponseConfigArgs

    ContentType string
    The content type of the fixed response.
    ResponseBody string
    The response body of the fixed response.
    ResponseCode string
    The fixed response HTTP status code.
    ResponseMessage string
    The fixed response message.
    ContentType string
    The content type of the fixed response.
    ResponseBody string
    The response body of the fixed response.
    ResponseCode string
    The fixed response HTTP status code.
    ResponseMessage string
    The fixed response message.
    contentType String
    The content type of the fixed response.
    responseBody String
    The response body of the fixed response.
    responseCode String
    The fixed response HTTP status code.
    responseMessage String
    The fixed response message.
    contentType string
    The content type of the fixed response.
    responseBody string
    The response body of the fixed response.
    responseCode string
    The fixed response HTTP status code.
    responseMessage string
    The fixed response message.
    content_type str
    The content type of the fixed response.
    response_body str
    The response body of the fixed response.
    response_code str
    The fixed response HTTP status code.
    response_message str
    The fixed response message.
    contentType String
    The content type of the fixed response.
    responseBody String
    The response body of the fixed response.
    responseCode String
    The fixed response HTTP status code.
    responseMessage String
    The fixed response message.

    RuleRuleActionForwardGroupConfig, RuleRuleActionForwardGroupConfigArgs

    serverGroupStickySession Property Map
    The config of group session stickiness.
    serverGroupTuples List<Property Map>
    The server group tuples.

    RuleRuleActionForwardGroupConfigServerGroupStickySession, RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs

    Enabled string
    Whether to enable sticky session stickiness. Valid values are 'on' and 'off'.
    Timeout int
    The sticky session timeout, in seconds.
    Enabled string
    Whether to enable sticky session stickiness. Valid values are 'on' and 'off'.
    Timeout int
    The sticky session timeout, in seconds.
    enabled String
    Whether to enable sticky session stickiness. Valid values are 'on' and 'off'.
    timeout Integer
    The sticky session timeout, in seconds.
    enabled string
    Whether to enable sticky session stickiness. Valid values are 'on' and 'off'.
    timeout number
    The sticky session timeout, in seconds.
    enabled str
    Whether to enable sticky session stickiness. Valid values are 'on' and 'off'.
    timeout int
    The sticky session timeout, in seconds.
    enabled String
    Whether to enable sticky session stickiness. Valid values are 'on' and 'off'.
    timeout Number
    The sticky session timeout, in seconds.

    RuleRuleActionForwardGroupConfigServerGroupTuple, RuleRuleActionForwardGroupConfigServerGroupTupleArgs

    ServerGroupId string
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    Weight int
    The weight of the server group.
    ServerGroupId string
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    Weight int
    The weight of the server group.
    serverGroupId String
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    weight Integer
    The weight of the server group.
    serverGroupId string
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    weight number
    The weight of the server group.
    server_group_id str
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    weight int
    The weight of the server group.
    serverGroupId String
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    weight Number
    The weight of the server group.

    RuleRuleActionRedirectConfig, RuleRuleActionRedirectConfigArgs

    Host string
    The domain name to which the request was redirected.
    HttpCode string
    The redirect HTTP code.
    Path string
    The path to which the request was redirected.
    Port string
    The redirect port.
    Protocol string
    The redirect protocol.
    Host string
    The domain name to which the request was redirected.
    HttpCode string
    The redirect HTTP code.
    Path string
    The path to which the request was redirected.
    Port string
    The redirect port.
    Protocol string
    The redirect protocol.
    host String
    The domain name to which the request was redirected.
    httpCode String
    The redirect HTTP code.
    path String
    The path to which the request was redirected.
    port String
    The redirect port.
    protocol String
    The redirect protocol.
    host string
    The domain name to which the request was redirected.
    httpCode string
    The redirect HTTP code.
    path string
    The path to which the request was redirected.
    port string
    The redirect port.
    protocol string
    The redirect protocol.
    host str
    The domain name to which the request was redirected.
    http_code str
    The redirect HTTP code.
    path str
    The path to which the request was redirected.
    port str
    The redirect port.
    protocol str
    The redirect protocol.
    host String
    The domain name to which the request was redirected.
    httpCode String
    The redirect HTTP code.
    path String
    The path to which the request was redirected.
    port String
    The redirect port.
    protocol String
    The redirect protocol.

    RuleRuleActionRewriteConfig, RuleRuleActionRewriteConfigArgs

    Path string
    The rewrite path.
    Path string
    The rewrite path.
    path String
    The rewrite path.
    path string
    The rewrite path.
    path str
    The rewrite path.
    path String
    The rewrite path.

    RuleRuleActionTrafficLimitConfig, RuleRuleActionTrafficLimitConfigArgs

    Qps int
    The QPS limit.
    Qps int
    The QPS limit.
    qps Integer
    The QPS limit.
    qps number
    The QPS limit.
    qps int
    The QPS limit.
    qps Number
    The QPS limit.

    RuleRuleCondition, RuleRuleConditionArgs

    HeaderConfig RuleRuleConditionHeaderConfig
    Header configuration for Header type condition.
    HostConfig RuleRuleConditionHostConfig
    Host configuration for Host type condition.
    MethodConfig RuleRuleConditionMethodConfig
    Method configuration for Method type condition.
    PathConfig RuleRuleConditionPathConfig
    Path configuration for Path type condition.
    QueryStringConfig RuleRuleConditionQueryStringConfig
    Query string configuration for QueryString type condition.
    Type string
    The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
    HeaderConfig RuleRuleConditionHeaderConfig
    Header configuration for Header type condition.
    HostConfig RuleRuleConditionHostConfig
    Host configuration for Host type condition.
    MethodConfig RuleRuleConditionMethodConfig
    Method configuration for Method type condition.
    PathConfig RuleRuleConditionPathConfig
    Path configuration for Path type condition.
    QueryStringConfig RuleRuleConditionQueryStringConfig
    Query string configuration for QueryString type condition.
    Type string
    The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
    headerConfig RuleRuleConditionHeaderConfig
    Header configuration for Header type condition.
    hostConfig RuleRuleConditionHostConfig
    Host configuration for Host type condition.
    methodConfig RuleRuleConditionMethodConfig
    Method configuration for Method type condition.
    pathConfig RuleRuleConditionPathConfig
    Path configuration for Path type condition.
    queryStringConfig RuleRuleConditionQueryStringConfig
    Query string configuration for QueryString type condition.
    type String
    The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
    headerConfig RuleRuleConditionHeaderConfig
    Header configuration for Header type condition.
    hostConfig RuleRuleConditionHostConfig
    Host configuration for Host type condition.
    methodConfig RuleRuleConditionMethodConfig
    Method configuration for Method type condition.
    pathConfig RuleRuleConditionPathConfig
    Path configuration for Path type condition.
    queryStringConfig RuleRuleConditionQueryStringConfig
    Query string configuration for QueryString type condition.
    type string
    The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
    header_config RuleRuleConditionHeaderConfig
    Header configuration for Header type condition.
    host_config RuleRuleConditionHostConfig
    Host configuration for Host type condition.
    method_config RuleRuleConditionMethodConfig
    Method configuration for Method type condition.
    path_config RuleRuleConditionPathConfig
    Path configuration for Path type condition.
    query_string_config RuleRuleConditionQueryStringConfig
    Query string configuration for QueryString type condition.
    type str
    The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
    headerConfig Property Map
    Header configuration for Header type condition.
    hostConfig Property Map
    Host configuration for Host type condition.
    methodConfig Property Map
    Method configuration for Method type condition.
    pathConfig Property Map
    Path configuration for Path type condition.
    queryStringConfig Property Map
    Query string configuration for QueryString type condition.
    type String
    The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.

    RuleRuleConditionHeaderConfig, RuleRuleConditionHeaderConfigArgs

    Key string
    The header key.
    Values List<string>
    The list of header values.
    Key string
    The header key.
    Values []string
    The list of header values.
    key String
    The header key.
    values List<String>
    The list of header values.
    key string
    The header key.
    values string[]
    The list of header values.
    key str
    The header key.
    values Sequence[str]
    The list of header values.
    key String
    The header key.
    values List<String>
    The list of header values.

    RuleRuleConditionHostConfig, RuleRuleConditionHostConfigArgs

    Values List<string>
    The list of domain names.
    Values []string
    The list of domain names.
    values List<String>
    The list of domain names.
    values string[]
    The list of domain names.
    values Sequence[str]
    The list of domain names.
    values List<String>
    The list of domain names.

    RuleRuleConditionMethodConfig, RuleRuleConditionMethodConfigArgs

    Values List<string>
    The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
    Values []string
    The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
    values List<String>
    The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
    values string[]
    The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
    values Sequence[str]
    The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
    values List<String>
    The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.

    RuleRuleConditionPathConfig, RuleRuleConditionPathConfigArgs

    Values List<string>
    The list of absolute paths.
    Values []string
    The list of absolute paths.
    values List<String>
    The list of absolute paths.
    values string[]
    The list of absolute paths.
    values Sequence[str]
    The list of absolute paths.
    values List<String>
    The list of absolute paths.

    RuleRuleConditionQueryStringConfig, RuleRuleConditionQueryStringConfigArgs

    Values []RuleRuleConditionQueryStringConfigValue
    The list of query string values.
    values RuleRuleConditionQueryStringConfigValue[]
    The list of query string values.
    values List<Property Map>
    The list of query string values.

    RuleRuleConditionQueryStringConfigValue, RuleRuleConditionQueryStringConfigValueArgs

    Key string
    The query string key.
    Value string
    The query string value.
    Key string
    The query string key.
    Value string
    The query string value.
    key String
    The query string key.
    value String
    The query string value.
    key string
    The query string key.
    value string
    The query string value.
    key str
    The query string key.
    value str
    The query string value.
    key String
    The query string key.
    value String
    The query string value.

    RuleServerGroupTuple, RuleServerGroupTupleArgs

    ServerGroupId string
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    Weight int
    The weight of the server group.
    ServerGroupId string
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    Weight int
    The weight of the server group.
    serverGroupId String
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    weight Integer
    The weight of the server group.
    serverGroupId string
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    weight number
    The weight of the server group.
    server_group_id str
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    weight int
    The weight of the server group.
    serverGroupId String
    The server group ID. The priority of this parameter is higher than that of server_group_id.
    weight Number
    The weight of the server group.

    Import

    AlbRule can be imported using the listener id and rule id, e.g.

    $ pulumi import volcengine:alb/rule:Rule default lsn-273yv0mhs5xj47fap8sehiiso:rule-****
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.43 published on Friday, Jan 16, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate