1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. alb
  5. Rule
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.alb.Rule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    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.

    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)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    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 Rule("ruleResource", 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=[alicloud.alb.RuleRuleActionArgs(
            order=0,
            type="string",
            cors_config=alicloud.alb.RuleRuleActionCorsConfigArgs(
                allow_credentials="string",
                allow_headers=["string"],
                allow_methods=["string"],
                allow_origins=["string"],
                expose_headers=["string"],
                max_age=0,
            ),
            fixed_response_config=alicloud.alb.RuleRuleActionFixedResponseConfigArgs(
                content="string",
                content_type="string",
                http_code="string",
            ),
            forward_group_config=alicloud.alb.RuleRuleActionForwardGroupConfigArgs(
                server_group_sticky_session=alicloud.alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs(
                    enabled=False,
                    timeout=0,
                ),
                server_group_tuples=[alicloud.alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs(
                    server_group_id="string",
                    weight=0,
                )],
            ),
            insert_header_config=alicloud.alb.RuleRuleActionInsertHeaderConfigArgs(
                key="string",
                value="string",
                value_type="string",
            ),
            redirect_config=alicloud.alb.RuleRuleActionRedirectConfigArgs(
                host="string",
                http_code="string",
                path="string",
                port="string",
                protocol="string",
                query="string",
            ),
            remove_header_config=alicloud.alb.RuleRuleActionRemoveHeaderConfigArgs(
                key="string",
            ),
            rewrite_config=alicloud.alb.RuleRuleActionRewriteConfigArgs(
                host="string",
                path="string",
                query="string",
            ),
            traffic_limit_config=alicloud.alb.RuleRuleActionTrafficLimitConfigArgs(
                per_ip_qps=0,
                qps=0,
            ),
            traffic_mirror_config=alicloud.alb.RuleRuleActionTrafficMirrorConfigArgs(
                mirror_group_config=alicloud.alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs(
                    server_group_tuples=[alicloud.alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs(
                        server_group_id="string",
                    )],
                ),
                target_type="string",
            ),
        )],
        rule_conditions=[alicloud.alb.RuleRuleConditionArgs(
            type="string",
            cookie_config=alicloud.alb.RuleRuleConditionCookieConfigArgs(
                values=[alicloud.alb.RuleRuleConditionCookieConfigValueArgs(
                    key="string",
                    value="string",
                )],
            ),
            header_config=alicloud.alb.RuleRuleConditionHeaderConfigArgs(
                key="string",
                values=["string"],
            ),
            host_config=alicloud.alb.RuleRuleConditionHostConfigArgs(
                values=["string"],
            ),
            method_config=alicloud.alb.RuleRuleConditionMethodConfigArgs(
                values=["string"],
            ),
            path_config=alicloud.alb.RuleRuleConditionPathConfigArgs(
                values=["string"],
            ),
            query_string_config=alicloud.alb.RuleRuleConditionQueryStringConfigArgs(
                values=[alicloud.alb.RuleRuleConditionQueryStringConfigValueArgs(
                    key="string",
                    value="string",
                )],
            ),
            response_header_config=alicloud.alb.RuleRuleConditionResponseHeaderConfigArgs(
                key="string",
                values=["string"],
            ),
            response_status_code_config=alicloud.alb.RuleRuleConditionResponseStatusCodeConfigArgs(
                values=["string"],
            ),
            source_ip_config=alicloud.alb.RuleRuleConditionSourceIpConfigArgs(
                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

    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.AliCloud.Alb.Inputs.RuleRuleAction>
    The actions of the forwarding rules. See rule_actions below.
    RuleConditions List<Pulumi.AliCloud.Alb.Inputs.RuleRuleCondition>
    The conditions of the forwarding rule. See rule_conditions below.
    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 []RuleRuleActionArgs
    The actions of the forwarding rules. See rule_actions below.
    RuleConditions []RuleRuleConditionArgs
    The conditions of the forwarding rule. See rule_conditions below.
    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<RuleRuleAction>
    The actions of the forwarding rules. See rule_actions below.
    ruleConditions List<RuleRuleCondition>
    The conditions of the forwarding rule. See rule_conditions below.
    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 RuleRuleAction[]
    The actions of the forwarding rules. See rule_actions below.
    ruleConditions RuleRuleCondition[]
    The conditions of the forwarding rule. See rule_conditions below.
    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[RuleRuleActionArgs]
    The actions of the forwarding rules. See rule_actions below.
    rule_conditions Sequence[RuleRuleConditionArgs]
    The conditions of the forwarding rule. See rule_conditions below.
    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_actions below.
    ruleConditions List<Property Map>
    The conditions of the forwarding rule. See rule_conditions below.
    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.

    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) -> 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)
    Resource lookup is not supported in YAML
    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:
    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.AliCloud.Alb.Inputs.RuleRuleAction>
    The actions of the forwarding rules. See rule_actions below.
    RuleConditions List<Pulumi.AliCloud.Alb.Inputs.RuleRuleCondition>
    The conditions of the forwarding rule. See rule_conditions below.
    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 []RuleRuleActionArgs
    The actions of the forwarding rules. See rule_actions below.
    RuleConditions []RuleRuleConditionArgs
    The conditions of the forwarding rule. See rule_conditions below.
    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<RuleRuleAction>
    The actions of the forwarding rules. See rule_actions below.
    ruleConditions List<RuleRuleCondition>
    The conditions of the forwarding rule. See rule_conditions below.
    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 RuleRuleAction[]
    The actions of the forwarding rules. See rule_actions below.
    ruleConditions RuleRuleCondition[]
    The conditions of the forwarding rule. See rule_conditions below.
    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[RuleRuleActionArgs]
    The actions of the forwarding rules. See rule_actions below.
    rule_conditions Sequence[RuleRuleConditionArgs]
    The conditions of the forwarding rule. See rule_conditions below.
    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_actions below.
    ruleConditions List<Property Map>
    The conditions of the forwarding rule. See rule_conditions below.
    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: 1 to 50000. 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, TrafficMirror and Cors. Note: The preceding actions can be classified into two types: FinalType: A forwarding rule can contain only one FinalType action, which is executed last. This type of action can contain only one ForwardGroup, Redirect or FixedResponse action. ExtType: A forwarding rule can contain one or more ExtType actions, which are executed before FinalType actions and need to coexist with the FinalType actions. This type of action can contain multiple InsertHeader actions or one Rewrite action. NOTE: The TrafficLimit and TrafficMirror option is available since 1.162.0. NOTE: From version 1.205.0, type can be set to Cors.
    CorsConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionCorsConfig
    Request forwarding based on CORS. See cors_config below.
    FixedResponseConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionFixedResponseConfig
    The configuration of the fixed response. See fixed_response_config below.
    ForwardGroupConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfig
    The forward response action within ALB. See forward_group_config below.
    InsertHeaderConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionInsertHeaderConfig
    The configuration of the inserted header field. See insert_header_config below.
    RedirectConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionRedirectConfig
    The configuration of the external redirect action. See redirect_config below.
    RemoveHeaderConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionRemoveHeaderConfig
    The configuration of the inserted header field. See remove_header_config below.
    RewriteConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionRewriteConfig
    The redirect action within ALB. See rewrite_config below.
    TrafficLimitConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionTrafficLimitConfig
    The Flow speed limit. See traffic_limit_config below.
    TrafficMirrorConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleActionTrafficMirrorConfig
    The Traffic mirroring. See traffic_mirror_config below.
    Order int
    The order of the forwarding rule actions. Valid values: 1 to 50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
    Type string
    The action type. Valid values: ForwardGroup, Redirect, FixedResponse, Rewrite, InsertHeader, RemoveHeader, TrafficLimit, TrafficMirror and Cors. Note: The preceding actions can be classified into two types: FinalType: A forwarding rule can contain only one FinalType action, which is executed last. This type of action can contain only one ForwardGroup, Redirect or FixedResponse action. ExtType: A forwarding rule can contain one or more ExtType actions, which are executed before FinalType actions and need to coexist with the FinalType actions. This type of action can contain multiple InsertHeader actions or one Rewrite action. NOTE: The TrafficLimit and TrafficMirror option is available since 1.162.0. NOTE: From version 1.205.0, type can be set to Cors.
    CorsConfig RuleRuleActionCorsConfig
    Request forwarding based on CORS. See cors_config below.
    FixedResponseConfig RuleRuleActionFixedResponseConfig
    The configuration of the fixed response. See fixed_response_config below.
    ForwardGroupConfig RuleRuleActionForwardGroupConfig
    The forward response action within ALB. See forward_group_config below.
    InsertHeaderConfig RuleRuleActionInsertHeaderConfig
    The configuration of the inserted header field. See insert_header_config below.
    RedirectConfig RuleRuleActionRedirectConfig
    The configuration of the external redirect action. See redirect_config below.
    RemoveHeaderConfig RuleRuleActionRemoveHeaderConfig
    The configuration of the inserted header field. See remove_header_config below.
    RewriteConfig RuleRuleActionRewriteConfig
    The redirect action within ALB. See rewrite_config below.
    TrafficLimitConfig RuleRuleActionTrafficLimitConfig
    The Flow speed limit. See traffic_limit_config below.
    TrafficMirrorConfig RuleRuleActionTrafficMirrorConfig
    The Traffic mirroring. See traffic_mirror_config below.
    order Integer
    The order of the forwarding rule actions. Valid values: 1 to 50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
    type String
    The action type. Valid values: ForwardGroup, Redirect, FixedResponse, Rewrite, InsertHeader, RemoveHeader, TrafficLimit, TrafficMirror and Cors. Note: The preceding actions can be classified into two types: FinalType: A forwarding rule can contain only one FinalType action, which is executed last. This type of action can contain only one ForwardGroup, Redirect or FixedResponse action. ExtType: A forwarding rule can contain one or more ExtType actions, which are executed before FinalType actions and need to coexist with the FinalType actions. This type of action can contain multiple InsertHeader actions or one Rewrite action. NOTE: The TrafficLimit and TrafficMirror option is available since 1.162.0. NOTE: From version 1.205.0, type can be set to Cors.
    corsConfig RuleRuleActionCorsConfig
    Request forwarding based on CORS. See cors_config below.
    fixedResponseConfig RuleRuleActionFixedResponseConfig
    The configuration of the fixed response. See fixed_response_config below.
    forwardGroupConfig RuleRuleActionForwardGroupConfig
    The forward response action within ALB. See forward_group_config below.
    insertHeaderConfig RuleRuleActionInsertHeaderConfig
    The configuration of the inserted header field. See insert_header_config below.
    redirectConfig RuleRuleActionRedirectConfig
    The configuration of the external redirect action. See redirect_config below.
    removeHeaderConfig RuleRuleActionRemoveHeaderConfig
    The configuration of the inserted header field. See remove_header_config below.
    rewriteConfig RuleRuleActionRewriteConfig
    The redirect action within ALB. See rewrite_config below.
    trafficLimitConfig RuleRuleActionTrafficLimitConfig
    The Flow speed limit. See traffic_limit_config below.
    trafficMirrorConfig RuleRuleActionTrafficMirrorConfig
    The Traffic mirroring. See traffic_mirror_config below.
    order number
    The order of the forwarding rule actions. Valid values: 1 to 50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
    type string
    The action type. Valid values: ForwardGroup, Redirect, FixedResponse, Rewrite, InsertHeader, RemoveHeader, TrafficLimit, TrafficMirror and Cors. Note: The preceding actions can be classified into two types: FinalType: A forwarding rule can contain only one FinalType action, which is executed last. This type of action can contain only one ForwardGroup, Redirect or FixedResponse action. ExtType: A forwarding rule can contain one or more ExtType actions, which are executed before FinalType actions and need to coexist with the FinalType actions. This type of action can contain multiple InsertHeader actions or one Rewrite action. NOTE: The TrafficLimit and TrafficMirror option is available since 1.162.0. NOTE: From version 1.205.0, type can be set to Cors.
    corsConfig RuleRuleActionCorsConfig
    Request forwarding based on CORS. See cors_config below.
    fixedResponseConfig RuleRuleActionFixedResponseConfig
    The configuration of the fixed response. See fixed_response_config below.
    forwardGroupConfig RuleRuleActionForwardGroupConfig
    The forward response action within ALB. See forward_group_config below.
    insertHeaderConfig RuleRuleActionInsertHeaderConfig
    The configuration of the inserted header field. See insert_header_config below.
    redirectConfig RuleRuleActionRedirectConfig
    The configuration of the external redirect action. See redirect_config below.
    removeHeaderConfig RuleRuleActionRemoveHeaderConfig
    The configuration of the inserted header field. See remove_header_config below.
    rewriteConfig RuleRuleActionRewriteConfig
    The redirect action within ALB. See rewrite_config below.
    trafficLimitConfig RuleRuleActionTrafficLimitConfig
    The Flow speed limit. See traffic_limit_config below.
    trafficMirrorConfig RuleRuleActionTrafficMirrorConfig
    The Traffic mirroring. See traffic_mirror_config below.
    order int
    The order of the forwarding rule actions. Valid values: 1 to 50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
    type str
    The action type. Valid values: ForwardGroup, Redirect, FixedResponse, Rewrite, InsertHeader, RemoveHeader, TrafficLimit, TrafficMirror and Cors. Note: The preceding actions can be classified into two types: FinalType: A forwarding rule can contain only one FinalType action, which is executed last. This type of action can contain only one ForwardGroup, Redirect or FixedResponse action. ExtType: A forwarding rule can contain one or more ExtType actions, which are executed before FinalType actions and need to coexist with the FinalType actions. This type of action can contain multiple InsertHeader actions or one Rewrite action. NOTE: The TrafficLimit and TrafficMirror option is available since 1.162.0. NOTE: From version 1.205.0, type can be set to Cors.
    cors_config RuleRuleActionCorsConfig
    Request forwarding based on CORS. See cors_config below.
    fixed_response_config RuleRuleActionFixedResponseConfig
    The configuration of the fixed response. See fixed_response_config below.
    forward_group_config RuleRuleActionForwardGroupConfig
    The forward response action within ALB. See forward_group_config below.
    insert_header_config RuleRuleActionInsertHeaderConfig
    The configuration of the inserted header field. See insert_header_config below.
    redirect_config RuleRuleActionRedirectConfig
    The configuration of the external redirect action. See redirect_config below.
    remove_header_config RuleRuleActionRemoveHeaderConfig
    The configuration of the inserted header field. See remove_header_config below.
    rewrite_config RuleRuleActionRewriteConfig
    The redirect action within ALB. See rewrite_config below.
    traffic_limit_config RuleRuleActionTrafficLimitConfig
    The Flow speed limit. See traffic_limit_config below.
    traffic_mirror_config RuleRuleActionTrafficMirrorConfig
    The Traffic mirroring. See traffic_mirror_config below.
    order Number
    The order of the forwarding rule actions. Valid values: 1 to 50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
    type String
    The action type. Valid values: ForwardGroup, Redirect, FixedResponse, Rewrite, InsertHeader, RemoveHeader, TrafficLimit, TrafficMirror and Cors. Note: The preceding actions can be classified into two types: FinalType: A forwarding rule can contain only one FinalType action, which is executed last. This type of action can contain only one ForwardGroup, Redirect or FixedResponse action. ExtType: A forwarding rule can contain one or more ExtType actions, which are executed before FinalType actions and need to coexist with the FinalType actions. This type of action can contain multiple InsertHeader actions or one Rewrite action. NOTE: The TrafficLimit and TrafficMirror option is available since 1.162.0. NOTE: From version 1.205.0, type can be set to Cors.
    corsConfig Property Map
    Request forwarding based on CORS. See cors_config below.
    fixedResponseConfig Property Map
    The configuration of the fixed response. See fixed_response_config below.
    forwardGroupConfig Property Map
    The forward response action within ALB. See forward_group_config below.
    insertHeaderConfig Property Map
    The configuration of the inserted header field. See insert_header_config below.
    redirectConfig Property Map
    The configuration of the external redirect action. See redirect_config below.
    removeHeaderConfig Property Map
    The configuration of the inserted header field. See remove_header_config below.
    rewriteConfig Property Map
    The redirect action within ALB. See rewrite_config below.
    trafficLimitConfig Property Map
    The Flow speed limit. See traffic_limit_config below.
    trafficMirrorConfig Property Map
    The Traffic mirroring. See traffic_mirror_config below.

    RuleRuleActionCorsConfig, RuleRuleActionCorsConfigArgs

    AllowCredentials string
    AllowHeaders List<string>
    AllowMethods List<string>
    AllowOrigins List<string>
    ExposeHeaders List<string>
    MaxAge int
    allowCredentials String
    allowHeaders List<String>
    allowMethods List<String>
    allowOrigins List<String>
    exposeHeaders List<String>
    maxAge Integer
    allowCredentials string
    allowHeaders string[]
    allowMethods string[]
    allowOrigins string[]
    exposeHeaders string[]
    maxAge number
    allow_credentials str
    allow_headers Sequence[str]
    allow_methods Sequence[str]
    allow_origins Sequence[str]
    expose_headers Sequence[str]
    max_age int
    allowCredentials String
    allowHeaders List<String>
    allowMethods List<String>
    allowOrigins List<String>
    exposeHeaders List<String>
    maxAge Number

    RuleRuleActionFixedResponseConfig, RuleRuleActionFixedResponseConfigArgs

    Content string
    ContentType string
    HttpCode string
    Content string
    ContentType string
    HttpCode string
    content String
    contentType String
    httpCode String
    content string
    contentType string
    httpCode string
    content String
    contentType String
    httpCode String

    RuleRuleActionForwardGroupConfig, RuleRuleActionForwardGroupConfigArgs

    RuleRuleActionForwardGroupConfigServerGroupStickySession, RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs

    enabled Boolean
    timeout Integer
    enabled boolean
    timeout number
    enabled Boolean
    timeout Number

    RuleRuleActionForwardGroupConfigServerGroupTuple, RuleRuleActionForwardGroupConfigServerGroupTupleArgs

    serverGroupId String
    weight Integer
    serverGroupId string
    weight number
    serverGroupId String
    weight Number

    RuleRuleActionInsertHeaderConfig, RuleRuleActionInsertHeaderConfigArgs

    Key string
    Value string
    ValueType string
    Key string
    Value string
    ValueType string
    key String
    value String
    valueType String
    key string
    value string
    valueType string
    key str
    value str
    value_type str
    key String
    value String
    valueType String

    RuleRuleActionRedirectConfig, RuleRuleActionRedirectConfigArgs

    Host string
    HttpCode string
    Path string
    Port string
    Protocol string
    Query string
    Host string
    HttpCode string
    Path string
    Port string
    Protocol string
    Query string
    host String
    httpCode String
    path String
    port String
    protocol String
    query String
    host string
    httpCode string
    path string
    port string
    protocol string
    query string
    host str
    http_code str
    path str
    port str
    protocol str
    query str
    host String
    httpCode String
    path String
    port String
    protocol String
    query String

    RuleRuleActionRemoveHeaderConfig, RuleRuleActionRemoveHeaderConfigArgs

    Key string
    Key string
    key String
    key string
    key str
    key String

    RuleRuleActionRewriteConfig, RuleRuleActionRewriteConfigArgs

    Host string
    Path string
    Query string
    Host string
    Path string
    Query string
    host String
    path String
    query String
    host string
    path string
    query string
    host str
    path str
    query str
    host String
    path String
    query String

    RuleRuleActionTrafficLimitConfig, RuleRuleActionTrafficLimitConfigArgs

    PerIpQps int
    Qps int
    PerIpQps int
    Qps int
    perIpQps Integer
    qps Integer
    perIpQps number
    qps number
    perIpQps Number
    qps Number

    RuleRuleActionTrafficMirrorConfig, RuleRuleActionTrafficMirrorConfigArgs

    RuleRuleActionTrafficMirrorConfigMirrorGroupConfig, RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs

    RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTuple, RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs

    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 SourceIp option is available since 1.162.0.
    • ResponseHeader: Response header. NOTE: The SourceIp option is available since 1.213.1.
    • ResponseStatusCode: Response status code. NOTE: The SourceIp option is available since 1.213.1.
    CookieConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionCookieConfig
    The configuration of the cookie. See See cookie_config below.
    HeaderConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionHeaderConfig
    The configuration of the header field. See header_config below.
    HostConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionHostConfig
    The configuration of the host field. See host_config below.
    MethodConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionMethodConfig
    The configuration of the request method. See method_config below.
    PathConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionPathConfig
    The configuration of the path for the request to be forwarded. See path_config below.
    QueryStringConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionQueryStringConfig
    The configuration of the query string. See query_string_config below.
    ResponseHeaderConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionResponseHeaderConfig
    The configuration of the header field. See response_header_config below.
    ResponseStatusCodeConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionResponseStatusCodeConfig
    The configuration of the header field. See response_status_code_config below.
    SourceIpConfig Pulumi.AliCloud.Alb.Inputs.RuleRuleConditionSourceIpConfig
    The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_config below.
    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 SourceIp option is available since 1.162.0.
    • ResponseHeader: Response header. NOTE: The SourceIp option is available since 1.213.1.
    • ResponseStatusCode: Response status code. NOTE: The SourceIp option is available since 1.213.1.
    CookieConfig RuleRuleConditionCookieConfig
    The configuration of the cookie. See See cookie_config below.
    HeaderConfig RuleRuleConditionHeaderConfig
    The configuration of the header field. See header_config below.
    HostConfig RuleRuleConditionHostConfig
    The configuration of the host field. See host_config below.
    MethodConfig RuleRuleConditionMethodConfig
    The configuration of the request method. See method_config below.
    PathConfig RuleRuleConditionPathConfig
    The configuration of the path for the request to be forwarded. See path_config below.
    QueryStringConfig RuleRuleConditionQueryStringConfig
    The configuration of the query string. See query_string_config below.
    ResponseHeaderConfig RuleRuleConditionResponseHeaderConfig
    The configuration of the header field. See response_header_config below.
    ResponseStatusCodeConfig RuleRuleConditionResponseStatusCodeConfig
    The configuration of the header field. See response_status_code_config below.
    SourceIpConfig RuleRuleConditionSourceIpConfig
    The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_config below.
    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 SourceIp option is available since 1.162.0.
    • ResponseHeader: Response header. NOTE: The SourceIp option is available since 1.213.1.
    • ResponseStatusCode: Response status code. NOTE: The SourceIp option is available since 1.213.1.
    cookieConfig RuleRuleConditionCookieConfig
    The configuration of the cookie. See See cookie_config below.
    headerConfig RuleRuleConditionHeaderConfig
    The configuration of the header field. See header_config below.
    hostConfig RuleRuleConditionHostConfig
    The configuration of the host field. See host_config below.
    methodConfig RuleRuleConditionMethodConfig
    The configuration of the request method. See method_config below.
    pathConfig RuleRuleConditionPathConfig
    The configuration of the path for the request to be forwarded. See path_config below.
    queryStringConfig RuleRuleConditionQueryStringConfig
    The configuration of the query string. See query_string_config below.
    responseHeaderConfig RuleRuleConditionResponseHeaderConfig
    The configuration of the header field. See response_header_config below.
    responseStatusCodeConfig RuleRuleConditionResponseStatusCodeConfig
    The configuration of the header field. See response_status_code_config below.
    sourceIpConfig RuleRuleConditionSourceIpConfig
    The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_config below.
    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 SourceIp option is available since 1.162.0.
    • ResponseHeader: Response header. NOTE: The SourceIp option is available since 1.213.1.
    • ResponseStatusCode: Response status code. NOTE: The SourceIp option is available since 1.213.1.
    cookieConfig RuleRuleConditionCookieConfig
    The configuration of the cookie. See See cookie_config below.
    headerConfig RuleRuleConditionHeaderConfig
    The configuration of the header field. See header_config below.
    hostConfig RuleRuleConditionHostConfig
    The configuration of the host field. See host_config below.
    methodConfig RuleRuleConditionMethodConfig
    The configuration of the request method. See method_config below.
    pathConfig RuleRuleConditionPathConfig
    The configuration of the path for the request to be forwarded. See path_config below.
    queryStringConfig RuleRuleConditionQueryStringConfig
    The configuration of the query string. See query_string_config below.
    responseHeaderConfig RuleRuleConditionResponseHeaderConfig
    The configuration of the header field. See response_header_config below.
    responseStatusCodeConfig RuleRuleConditionResponseStatusCodeConfig
    The configuration of the header field. See response_status_code_config below.
    sourceIpConfig RuleRuleConditionSourceIpConfig
    The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_config below.
    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 SourceIp option is available since 1.162.0.
    • ResponseHeader: Response header. NOTE: The SourceIp option is available since 1.213.1.
    • ResponseStatusCode: Response status code. NOTE: The SourceIp option is available since 1.213.1.
    cookie_config RuleRuleConditionCookieConfig
    The configuration of the cookie. See See cookie_config below.
    header_config RuleRuleConditionHeaderConfig
    The configuration of the header field. See header_config below.
    host_config RuleRuleConditionHostConfig
    The configuration of the host field. See host_config below.
    method_config RuleRuleConditionMethodConfig
    The configuration of the request method. See method_config below.
    path_config RuleRuleConditionPathConfig
    The configuration of the path for the request to be forwarded. See path_config below.
    query_string_config RuleRuleConditionQueryStringConfig
    The configuration of the query string. See query_string_config below.
    response_header_config RuleRuleConditionResponseHeaderConfig
    The configuration of the header field. See response_header_config below.
    response_status_code_config RuleRuleConditionResponseStatusCodeConfig
    The configuration of the header field. See response_status_code_config below.
    source_ip_config RuleRuleConditionSourceIpConfig
    The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_config below.
    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 SourceIp option is available since 1.162.0.
    • ResponseHeader: Response header. NOTE: The SourceIp option is available since 1.213.1.
    • ResponseStatusCode: Response status code. NOTE: The SourceIp option is available since 1.213.1.
    cookieConfig Property Map
    The configuration of the cookie. See See cookie_config below.
    headerConfig Property Map
    The configuration of the header field. See header_config below.
    hostConfig Property Map
    The configuration of the host field. See host_config below.
    methodConfig Property Map
    The configuration of the request method. See method_config below.
    pathConfig Property Map
    The configuration of the path for the request to be forwarded. See path_config below.
    queryStringConfig Property Map
    The configuration of the query string. See query_string_config below.
    responseHeaderConfig Property Map
    The configuration of the header field. See response_header_config below.
    responseStatusCodeConfig Property Map
    The configuration of the header field. See response_status_code_config below.
    sourceIpConfig Property Map
    The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_config below.

    RuleRuleConditionCookieConfig, RuleRuleConditionCookieConfigArgs

    RuleRuleConditionCookieConfigValue, RuleRuleConditionCookieConfigValueArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    RuleRuleConditionHeaderConfig, RuleRuleConditionHeaderConfigArgs

    Key string
    Values List<string>
    Key string
    Values []string
    key String
    values List<String>
    key string
    values string[]
    key str
    values Sequence[str]
    key String
    values List<String>

    RuleRuleConditionHostConfig, RuleRuleConditionHostConfigArgs

    Values List<string>
    Values []string
    values List<String>
    values string[]
    values Sequence[str]
    values List<String>

    RuleRuleConditionMethodConfig, RuleRuleConditionMethodConfigArgs

    Values List<string>
    Values []string
    values List<String>
    values string[]
    values Sequence[str]
    values List<String>

    RuleRuleConditionPathConfig, RuleRuleConditionPathConfigArgs

    Values List<string>
    Values []string
    values List<String>
    values string[]
    values Sequence[str]
    values List<String>

    RuleRuleConditionQueryStringConfig, RuleRuleConditionQueryStringConfigArgs

    RuleRuleConditionQueryStringConfigValue, RuleRuleConditionQueryStringConfigValueArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    RuleRuleConditionResponseHeaderConfig, RuleRuleConditionResponseHeaderConfigArgs

    Key string
    Values List<string>
    Key string
    Values []string
    key String
    values List<String>
    key string
    values string[]
    key str
    values Sequence[str]
    key String
    values List<String>

    RuleRuleConditionResponseStatusCodeConfig, RuleRuleConditionResponseStatusCodeConfigArgs

    Values List<string>
    Values []string
    values List<String>
    values string[]
    values Sequence[str]
    values List<String>

    RuleRuleConditionSourceIpConfig, RuleRuleConditionSourceIpConfigArgs

    Values List<string>
    Values []string
    values List<String>
    values string[]
    values Sequence[str]
    values List<String>

    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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi