1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. slb
  5. Rule
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.slb.Rule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Lindorm Instance resource.

    For information about Load Balancer Forwarding Rule and how to use it, see What is Rule.

    NOTE: Available since v1.6.0.

    A forwarding rule is configured in HTTP/HTTPS listener and it used to listen a list of backend servers which in one specified virtual backend server group. You can add forwarding rules to a listener to forward requests based on the domain names or the URL in the request.

    NOTE: One virtual backend server group can be attached in multiple forwarding rules.

    NOTE: At least one “Domain” or “Url” must be specified when creating a new rule.

    NOTE: Having the same ‘Domain’ and ‘Url’ rule can not be created repeatedly in the one listener.

    NOTE: Rule only be created in the HTTP or HTTPS listener.

    NOTE: Only rule’s virtual server group can be modified.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const slbRuleName = config.get("slbRuleName") || "terraform-example";
    const ruleZones = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const ruleNetwork = new alicloud.vpc.Network("ruleNetwork", {
        vpcName: slbRuleName,
        cidrBlock: "172.16.0.0/16",
    });
    const ruleSwitch = new alicloud.vpc.Switch("ruleSwitch", {
        vpcId: ruleNetwork.id,
        cidrBlock: "172.16.0.0/16",
        zoneId: ruleZones.then(ruleZones => ruleZones.zones?.[0]?.id),
        vswitchName: slbRuleName,
    });
    const ruleApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("ruleApplicationLoadBalancer", {
        loadBalancerName: slbRuleName,
        vswitchId: ruleSwitch.id,
        instanceChargeType: "PayByCLCU",
    });
    const ruleListener = new alicloud.slb.Listener("ruleListener", {
        loadBalancerId: ruleApplicationLoadBalancer.id,
        backendPort: 22,
        frontendPort: 22,
        protocol: "http",
        bandwidth: 5,
        healthCheckConnectPort: 20,
    });
    const ruleServerGroup = new alicloud.slb.ServerGroup("ruleServerGroup", {loadBalancerId: ruleApplicationLoadBalancer.id});
    const ruleRule = new alicloud.slb.Rule("ruleRule", {
        loadBalancerId: ruleApplicationLoadBalancer.id,
        frontendPort: ruleListener.frontendPort,
        domain: "*.aliyun.com",
        url: "/image",
        serverGroupId: ruleServerGroup.id,
        cookie: "23ffsa",
        cookieTimeout: 100,
        healthCheckHttpCode: "http_2xx",
        healthCheckInterval: 10,
        healthCheckUri: "/test",
        healthCheckConnectPort: 80,
        healthCheckTimeout: 30,
        healthyThreshold: 3,
        unhealthyThreshold: 5,
        stickySession: "on",
        stickySessionType: "server",
        listenerSync: "off",
        scheduler: "rr",
        healthCheckDomain: "test",
        healthCheck: "on",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    slb_rule_name = config.get("slbRuleName")
    if slb_rule_name is None:
        slb_rule_name = "terraform-example"
    rule_zones = alicloud.get_zones(available_resource_creation="VSwitch")
    rule_network = alicloud.vpc.Network("ruleNetwork",
        vpc_name=slb_rule_name,
        cidr_block="172.16.0.0/16")
    rule_switch = alicloud.vpc.Switch("ruleSwitch",
        vpc_id=rule_network.id,
        cidr_block="172.16.0.0/16",
        zone_id=rule_zones.zones[0].id,
        vswitch_name=slb_rule_name)
    rule_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("ruleApplicationLoadBalancer",
        load_balancer_name=slb_rule_name,
        vswitch_id=rule_switch.id,
        instance_charge_type="PayByCLCU")
    rule_listener = alicloud.slb.Listener("ruleListener",
        load_balancer_id=rule_application_load_balancer.id,
        backend_port=22,
        frontend_port=22,
        protocol="http",
        bandwidth=5,
        health_check_connect_port=20)
    rule_server_group = alicloud.slb.ServerGroup("ruleServerGroup", load_balancer_id=rule_application_load_balancer.id)
    rule_rule = alicloud.slb.Rule("ruleRule",
        load_balancer_id=rule_application_load_balancer.id,
        frontend_port=rule_listener.frontend_port,
        domain="*.aliyun.com",
        url="/image",
        server_group_id=rule_server_group.id,
        cookie="23ffsa",
        cookie_timeout=100,
        health_check_http_code="http_2xx",
        health_check_interval=10,
        health_check_uri="/test",
        health_check_connect_port=80,
        health_check_timeout=30,
        healthy_threshold=3,
        unhealthy_threshold=5,
        sticky_session="on",
        sticky_session_type="server",
        listener_sync="off",
        scheduler="rr",
        health_check_domain="test",
        health_check="on")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		slbRuleName := "terraform-example"
    		if param := cfg.Get("slbRuleName"); param != "" {
    			slbRuleName = param
    		}
    		ruleZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ruleNetwork, err := vpc.NewNetwork(ctx, "ruleNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(slbRuleName),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		ruleSwitch, err := vpc.NewSwitch(ctx, "ruleSwitch", &vpc.SwitchArgs{
    			VpcId:       ruleNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/16"),
    			ZoneId:      pulumi.String(ruleZones.Zones[0].Id),
    			VswitchName: pulumi.String(slbRuleName),
    		})
    		if err != nil {
    			return err
    		}
    		ruleApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "ruleApplicationLoadBalancer", &slb.ApplicationLoadBalancerArgs{
    			LoadBalancerName:   pulumi.String(slbRuleName),
    			VswitchId:          ruleSwitch.ID(),
    			InstanceChargeType: pulumi.String("PayByCLCU"),
    		})
    		if err != nil {
    			return err
    		}
    		ruleListener, err := slb.NewListener(ctx, "ruleListener", &slb.ListenerArgs{
    			LoadBalancerId:         ruleApplicationLoadBalancer.ID(),
    			BackendPort:            pulumi.Int(22),
    			FrontendPort:           pulumi.Int(22),
    			Protocol:               pulumi.String("http"),
    			Bandwidth:              pulumi.Int(5),
    			HealthCheckConnectPort: pulumi.Int(20),
    		})
    		if err != nil {
    			return err
    		}
    		ruleServerGroup, err := slb.NewServerGroup(ctx, "ruleServerGroup", &slb.ServerGroupArgs{
    			LoadBalancerId: ruleApplicationLoadBalancer.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = slb.NewRule(ctx, "ruleRule", &slb.RuleArgs{
    			LoadBalancerId:         ruleApplicationLoadBalancer.ID(),
    			FrontendPort:           ruleListener.FrontendPort,
    			Domain:                 pulumi.String("*.aliyun.com"),
    			Url:                    pulumi.String("/image"),
    			ServerGroupId:          ruleServerGroup.ID(),
    			Cookie:                 pulumi.String("23ffsa"),
    			CookieTimeout:          pulumi.Int(100),
    			HealthCheckHttpCode:    pulumi.String("http_2xx"),
    			HealthCheckInterval:    pulumi.Int(10),
    			HealthCheckUri:         pulumi.String("/test"),
    			HealthCheckConnectPort: pulumi.Int(80),
    			HealthCheckTimeout:     pulumi.Int(30),
    			HealthyThreshold:       pulumi.Int(3),
    			UnhealthyThreshold:     pulumi.Int(5),
    			StickySession:          pulumi.String("on"),
    			StickySessionType:      pulumi.String("server"),
    			ListenerSync:           pulumi.String("off"),
    			Scheduler:              pulumi.String("rr"),
    			HealthCheckDomain:      pulumi.String("test"),
    			HealthCheck:            pulumi.String("on"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var slbRuleName = config.Get("slbRuleName") ?? "terraform-example";
        var ruleZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var ruleNetwork = new AliCloud.Vpc.Network("ruleNetwork", new()
        {
            VpcName = slbRuleName,
            CidrBlock = "172.16.0.0/16",
        });
    
        var ruleSwitch = new AliCloud.Vpc.Switch("ruleSwitch", new()
        {
            VpcId = ruleNetwork.Id,
            CidrBlock = "172.16.0.0/16",
            ZoneId = ruleZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VswitchName = slbRuleName,
        });
    
        var ruleApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("ruleApplicationLoadBalancer", new()
        {
            LoadBalancerName = slbRuleName,
            VswitchId = ruleSwitch.Id,
            InstanceChargeType = "PayByCLCU",
        });
    
        var ruleListener = new AliCloud.Slb.Listener("ruleListener", new()
        {
            LoadBalancerId = ruleApplicationLoadBalancer.Id,
            BackendPort = 22,
            FrontendPort = 22,
            Protocol = "http",
            Bandwidth = 5,
            HealthCheckConnectPort = 20,
        });
    
        var ruleServerGroup = new AliCloud.Slb.ServerGroup("ruleServerGroup", new()
        {
            LoadBalancerId = ruleApplicationLoadBalancer.Id,
        });
    
        var ruleRule = new AliCloud.Slb.Rule("ruleRule", new()
        {
            LoadBalancerId = ruleApplicationLoadBalancer.Id,
            FrontendPort = ruleListener.FrontendPort,
            Domain = "*.aliyun.com",
            Url = "/image",
            ServerGroupId = ruleServerGroup.Id,
            Cookie = "23ffsa",
            CookieTimeout = 100,
            HealthCheckHttpCode = "http_2xx",
            HealthCheckInterval = 10,
            HealthCheckUri = "/test",
            HealthCheckConnectPort = 80,
            HealthCheckTimeout = 30,
            HealthyThreshold = 3,
            UnhealthyThreshold = 5,
            StickySession = "on",
            StickySessionType = "server",
            ListenerSync = "off",
            Scheduler = "rr",
            HealthCheckDomain = "test",
            HealthCheck = "on",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
    import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
    import com.pulumi.alicloud.slb.Listener;
    import com.pulumi.alicloud.slb.ListenerArgs;
    import com.pulumi.alicloud.slb.ServerGroup;
    import com.pulumi.alicloud.slb.ServerGroupArgs;
    import com.pulumi.alicloud.slb.Rule;
    import com.pulumi.alicloud.slb.RuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var slbRuleName = config.get("slbRuleName").orElse("terraform-example");
            final var ruleZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            var ruleNetwork = new Network("ruleNetwork", NetworkArgs.builder()        
                .vpcName(slbRuleName)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var ruleSwitch = new Switch("ruleSwitch", SwitchArgs.builder()        
                .vpcId(ruleNetwork.id())
                .cidrBlock("172.16.0.0/16")
                .zoneId(ruleZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vswitchName(slbRuleName)
                .build());
    
            var ruleApplicationLoadBalancer = new ApplicationLoadBalancer("ruleApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()        
                .loadBalancerName(slbRuleName)
                .vswitchId(ruleSwitch.id())
                .instanceChargeType("PayByCLCU")
                .build());
    
            var ruleListener = new Listener("ruleListener", ListenerArgs.builder()        
                .loadBalancerId(ruleApplicationLoadBalancer.id())
                .backendPort(22)
                .frontendPort(22)
                .protocol("http")
                .bandwidth(5)
                .healthCheckConnectPort("20")
                .build());
    
            var ruleServerGroup = new ServerGroup("ruleServerGroup", ServerGroupArgs.builder()        
                .loadBalancerId(ruleApplicationLoadBalancer.id())
                .build());
    
            var ruleRule = new Rule("ruleRule", RuleArgs.builder()        
                .loadBalancerId(ruleApplicationLoadBalancer.id())
                .frontendPort(ruleListener.frontendPort())
                .domain("*.aliyun.com")
                .url("/image")
                .serverGroupId(ruleServerGroup.id())
                .cookie("23ffsa")
                .cookieTimeout(100)
                .healthCheckHttpCode("http_2xx")
                .healthCheckInterval(10)
                .healthCheckUri("/test")
                .healthCheckConnectPort(80)
                .healthCheckTimeout(30)
                .healthyThreshold(3)
                .unhealthyThreshold(5)
                .stickySession("on")
                .stickySessionType("server")
                .listenerSync("off")
                .scheduler("rr")
                .healthCheckDomain("test")
                .healthCheck("on")
                .build());
    
        }
    }
    
    configuration:
      slbRuleName:
        type: string
        default: terraform-example
    resources:
      ruleNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${slbRuleName}
          cidrBlock: 172.16.0.0/16
      ruleSwitch:
        type: alicloud:vpc:Switch
        properties:
          vpcId: ${ruleNetwork.id}
          cidrBlock: 172.16.0.0/16
          zoneId: ${ruleZones.zones[0].id}
          vswitchName: ${slbRuleName}
      ruleApplicationLoadBalancer:
        type: alicloud:slb:ApplicationLoadBalancer
        properties:
          loadBalancerName: ${slbRuleName}
          vswitchId: ${ruleSwitch.id}
          instanceChargeType: PayByCLCU
      ruleListener:
        type: alicloud:slb:Listener
        properties:
          loadBalancerId: ${ruleApplicationLoadBalancer.id}
          backendPort: 22
          frontendPort: 22
          protocol: http
          bandwidth: 5
          healthCheckConnectPort: '20'
      ruleServerGroup:
        type: alicloud:slb:ServerGroup
        properties:
          loadBalancerId: ${ruleApplicationLoadBalancer.id}
      ruleRule:
        type: alicloud:slb:Rule
        properties:
          loadBalancerId: ${ruleApplicationLoadBalancer.id}
          frontendPort: ${ruleListener.frontendPort}
          domain: '*.aliyun.com'
          url: /image
          serverGroupId: ${ruleServerGroup.id}
          cookie: 23ffsa
          cookieTimeout: 100
          healthCheckHttpCode: http_2xx
          healthCheckInterval: 10
          healthCheckUri: /test
          healthCheckConnectPort: 80
          healthCheckTimeout: 30
          healthyThreshold: 3
          unhealthyThreshold: 5
          stickySession: on
          stickySessionType: server
          listenerSync: off
          scheduler: rr
          healthCheckDomain: test
          healthCheck: on
    variables:
      ruleZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
    

    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,
             frontend_port: Optional[int] = None,
             server_group_id: Optional[str] = None,
             load_balancer_id: Optional[str] = None,
             health_check_timeout: Optional[int] = None,
             healthy_threshold: Optional[int] = None,
             health_check: Optional[str] = None,
             health_check_connect_port: Optional[int] = None,
             health_check_domain: Optional[str] = None,
             health_check_http_code: Optional[str] = None,
             health_check_interval: Optional[int] = None,
             cookie: Optional[str] = None,
             health_check_uri: Optional[str] = None,
             domain: Optional[str] = None,
             listener_sync: Optional[str] = None,
             delete_protection_validation: Optional[bool] = None,
             name: Optional[str] = None,
             scheduler: Optional[str] = None,
             cookie_timeout: Optional[int] = None,
             sticky_session: Optional[str] = None,
             sticky_session_type: Optional[str] = None,
             unhealthy_threshold: 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: alicloud:slb: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.

    Example

    The following reference example uses placeholder values for all input properties.

    var exampleruleResourceResourceFromSlbrule = new AliCloud.Slb.Rule("exampleruleResourceResourceFromSlbrule", new()
    {
        FrontendPort = 0,
        ServerGroupId = "string",
        LoadBalancerId = "string",
        HealthCheckTimeout = 0,
        HealthyThreshold = 0,
        HealthCheck = "string",
        HealthCheckConnectPort = 0,
        HealthCheckDomain = "string",
        HealthCheckHttpCode = "string",
        HealthCheckInterval = 0,
        Cookie = "string",
        HealthCheckUri = "string",
        Domain = "string",
        ListenerSync = "string",
        DeleteProtectionValidation = false,
        Name = "string",
        Scheduler = "string",
        CookieTimeout = 0,
        StickySession = "string",
        StickySessionType = "string",
        UnhealthyThreshold = 0,
        Url = "string",
    });
    
    example, err := slb.NewRule(ctx, "exampleruleResourceResourceFromSlbrule", &slb.RuleArgs{
    	FrontendPort:               pulumi.Int(0),
    	ServerGroupId:              pulumi.String("string"),
    	LoadBalancerId:             pulumi.String("string"),
    	HealthCheckTimeout:         pulumi.Int(0),
    	HealthyThreshold:           pulumi.Int(0),
    	HealthCheck:                pulumi.String("string"),
    	HealthCheckConnectPort:     pulumi.Int(0),
    	HealthCheckDomain:          pulumi.String("string"),
    	HealthCheckHttpCode:        pulumi.String("string"),
    	HealthCheckInterval:        pulumi.Int(0),
    	Cookie:                     pulumi.String("string"),
    	HealthCheckUri:             pulumi.String("string"),
    	Domain:                     pulumi.String("string"),
    	ListenerSync:               pulumi.String("string"),
    	DeleteProtectionValidation: pulumi.Bool(false),
    	Name:                       pulumi.String("string"),
    	Scheduler:                  pulumi.String("string"),
    	CookieTimeout:              pulumi.Int(0),
    	StickySession:              pulumi.String("string"),
    	StickySessionType:          pulumi.String("string"),
    	UnhealthyThreshold:         pulumi.Int(0),
    	Url:                        pulumi.String("string"),
    })
    
    var exampleruleResourceResourceFromSlbrule = new Rule("exampleruleResourceResourceFromSlbrule", RuleArgs.builder()        
        .frontendPort(0)
        .serverGroupId("string")
        .loadBalancerId("string")
        .healthCheckTimeout(0)
        .healthyThreshold(0)
        .healthCheck("string")
        .healthCheckConnectPort(0)
        .healthCheckDomain("string")
        .healthCheckHttpCode("string")
        .healthCheckInterval(0)
        .cookie("string")
        .healthCheckUri("string")
        .domain("string")
        .listenerSync("string")
        .deleteProtectionValidation(false)
        .name("string")
        .scheduler("string")
        .cookieTimeout(0)
        .stickySession("string")
        .stickySessionType("string")
        .unhealthyThreshold(0)
        .url("string")
        .build());
    
    examplerule_resource_resource_from_slbrule = alicloud.slb.Rule("exampleruleResourceResourceFromSlbrule",
        frontend_port=0,
        server_group_id="string",
        load_balancer_id="string",
        health_check_timeout=0,
        healthy_threshold=0,
        health_check="string",
        health_check_connect_port=0,
        health_check_domain="string",
        health_check_http_code="string",
        health_check_interval=0,
        cookie="string",
        health_check_uri="string",
        domain="string",
        listener_sync="string",
        delete_protection_validation=False,
        name="string",
        scheduler="string",
        cookie_timeout=0,
        sticky_session="string",
        sticky_session_type="string",
        unhealthy_threshold=0,
        url="string")
    
    const exampleruleResourceResourceFromSlbrule = new alicloud.slb.Rule("exampleruleResourceResourceFromSlbrule", {
        frontendPort: 0,
        serverGroupId: "string",
        loadBalancerId: "string",
        healthCheckTimeout: 0,
        healthyThreshold: 0,
        healthCheck: "string",
        healthCheckConnectPort: 0,
        healthCheckDomain: "string",
        healthCheckHttpCode: "string",
        healthCheckInterval: 0,
        cookie: "string",
        healthCheckUri: "string",
        domain: "string",
        listenerSync: "string",
        deleteProtectionValidation: false,
        name: "string",
        scheduler: "string",
        cookieTimeout: 0,
        stickySession: "string",
        stickySessionType: "string",
        unhealthyThreshold: 0,
        url: "string",
    });
    
    type: alicloud:slb:Rule
    properties:
        cookie: string
        cookieTimeout: 0
        deleteProtectionValidation: false
        domain: string
        frontendPort: 0
        healthCheck: string
        healthCheckConnectPort: 0
        healthCheckDomain: string
        healthCheckHttpCode: string
        healthCheckInterval: 0
        healthCheckTimeout: 0
        healthCheckUri: string
        healthyThreshold: 0
        listenerSync: string
        loadBalancerId: string
        name: string
        scheduler: string
        serverGroupId: string
        stickySession: string
        stickySessionType: string
        unhealthyThreshold: 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

    The Rule resource accepts the following input properties:

    FrontendPort int
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    LoadBalancerId string
    The Load Balancer ID which is used to launch the new forwarding rule.
    ServerGroupId string
    ID of a virtual server group that will be forwarded.
    Cookie string
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    CookieTimeout int
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    Domain string
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    HealthCheck string
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    HealthCheckConnectPort int
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    HealthCheckDomain string
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    HealthCheckHttpCode string
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    HealthCheckInterval int
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    HealthCheckTimeout int
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    HealthCheckUri string
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    HealthyThreshold int
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    ListenerSync string
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    Name string
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    Scheduler string
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    StickySession string
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    StickySessionType string
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    UnhealthyThreshold int
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    Url string
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    FrontendPort int
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    LoadBalancerId string
    The Load Balancer ID which is used to launch the new forwarding rule.
    ServerGroupId string
    ID of a virtual server group that will be forwarded.
    Cookie string
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    CookieTimeout int
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    Domain string
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    HealthCheck string
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    HealthCheckConnectPort int
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    HealthCheckDomain string
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    HealthCheckHttpCode string
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    HealthCheckInterval int
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    HealthCheckTimeout int
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    HealthCheckUri string
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    HealthyThreshold int
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    ListenerSync string
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    Name string
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    Scheduler string
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    StickySession string
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    StickySessionType string
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    UnhealthyThreshold int
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    Url string
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    frontendPort Integer
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    loadBalancerId String
    The Load Balancer ID which is used to launch the new forwarding rule.
    serverGroupId String
    ID of a virtual server group that will be forwarded.
    cookie String
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    cookieTimeout Integer
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    domain String
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    healthCheck String
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    healthCheckConnectPort Integer
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    healthCheckDomain String
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    healthCheckHttpCode String
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    healthCheckInterval Integer
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    healthCheckTimeout Integer
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    healthCheckUri String
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    healthyThreshold Integer
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    listenerSync String
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    name String
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    scheduler String
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    stickySession String
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    stickySessionType String
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    unhealthyThreshold Integer
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    url String
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    frontendPort number
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    loadBalancerId string
    The Load Balancer ID which is used to launch the new forwarding rule.
    serverGroupId string
    ID of a virtual server group that will be forwarded.
    cookie string
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    cookieTimeout number
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    deleteProtectionValidation boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    domain string
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    healthCheck string
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    healthCheckConnectPort number
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    healthCheckDomain string
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    healthCheckHttpCode string
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    healthCheckInterval number
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    healthCheckTimeout number
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    healthCheckUri string
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    healthyThreshold number
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    listenerSync string
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    name string
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    scheduler string
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    stickySession string
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    stickySessionType string
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    unhealthyThreshold number
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    url string
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    frontend_port int
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    load_balancer_id str
    The Load Balancer ID which is used to launch the new forwarding rule.
    server_group_id str
    ID of a virtual server group that will be forwarded.
    cookie str
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    cookie_timeout int
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    delete_protection_validation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    domain str
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    health_check str
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    health_check_connect_port int
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    health_check_domain str
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    health_check_http_code str
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    health_check_interval int
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    health_check_timeout int
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    health_check_uri str
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    healthy_threshold int
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    listener_sync str
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    name str
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    scheduler str
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    sticky_session str
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    sticky_session_type str
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    unhealthy_threshold int
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    url str
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    frontendPort Number
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    loadBalancerId String
    The Load Balancer ID which is used to launch the new forwarding rule.
    serverGroupId String
    ID of a virtual server group that will be forwarded.
    cookie String
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    cookieTimeout Number
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    domain String
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    healthCheck String
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    healthCheckConnectPort Number
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    healthCheckDomain String
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    healthCheckHttpCode String
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    healthCheckInterval Number
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    healthCheckTimeout Number
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    healthCheckUri String
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    healthyThreshold Number
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    listenerSync String
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    name String
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    scheduler String
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    stickySession String
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    stickySessionType String
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    unhealthyThreshold Number
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    url String
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed 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,
            cookie: Optional[str] = None,
            cookie_timeout: Optional[int] = None,
            delete_protection_validation: Optional[bool] = None,
            domain: Optional[str] = None,
            frontend_port: Optional[int] = None,
            health_check: Optional[str] = None,
            health_check_connect_port: Optional[int] = None,
            health_check_domain: Optional[str] = None,
            health_check_http_code: Optional[str] = None,
            health_check_interval: Optional[int] = None,
            health_check_timeout: Optional[int] = None,
            health_check_uri: Optional[str] = None,
            healthy_threshold: Optional[int] = None,
            listener_sync: Optional[str] = None,
            load_balancer_id: Optional[str] = None,
            name: Optional[str] = None,
            scheduler: Optional[str] = None,
            server_group_id: Optional[str] = None,
            sticky_session: Optional[str] = None,
            sticky_session_type: Optional[str] = None,
            unhealthy_threshold: 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)
    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:
    Cookie string
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    CookieTimeout int
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    Domain string
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    FrontendPort int
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    HealthCheck string
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    HealthCheckConnectPort int
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    HealthCheckDomain string
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    HealthCheckHttpCode string
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    HealthCheckInterval int
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    HealthCheckTimeout int
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    HealthCheckUri string
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    HealthyThreshold int
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    ListenerSync string
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    LoadBalancerId string
    The Load Balancer ID which is used to launch the new forwarding rule.
    Name string
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    Scheduler string
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    ServerGroupId string
    ID of a virtual server group that will be forwarded.
    StickySession string
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    StickySessionType string
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    UnhealthyThreshold int
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    Url string
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    Cookie string
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    CookieTimeout int
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    Domain string
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    FrontendPort int
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    HealthCheck string
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    HealthCheckConnectPort int
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    HealthCheckDomain string
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    HealthCheckHttpCode string
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    HealthCheckInterval int
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    HealthCheckTimeout int
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    HealthCheckUri string
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    HealthyThreshold int
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    ListenerSync string
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    LoadBalancerId string
    The Load Balancer ID which is used to launch the new forwarding rule.
    Name string
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    Scheduler string
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    ServerGroupId string
    ID of a virtual server group that will be forwarded.
    StickySession string
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    StickySessionType string
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    UnhealthyThreshold int
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    Url string
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    cookie String
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    cookieTimeout Integer
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    domain String
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    frontendPort Integer
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    healthCheck String
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    healthCheckConnectPort Integer
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    healthCheckDomain String
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    healthCheckHttpCode String
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    healthCheckInterval Integer
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    healthCheckTimeout Integer
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    healthCheckUri String
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    healthyThreshold Integer
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    listenerSync String
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    loadBalancerId String
    The Load Balancer ID which is used to launch the new forwarding rule.
    name String
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    scheduler String
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    serverGroupId String
    ID of a virtual server group that will be forwarded.
    stickySession String
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    stickySessionType String
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    unhealthyThreshold Integer
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    url String
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    cookie string
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    cookieTimeout number
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    deleteProtectionValidation boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    domain string
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    frontendPort number
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    healthCheck string
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    healthCheckConnectPort number
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    healthCheckDomain string
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    healthCheckHttpCode string
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    healthCheckInterval number
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    healthCheckTimeout number
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    healthCheckUri string
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    healthyThreshold number
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    listenerSync string
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    loadBalancerId string
    The Load Balancer ID which is used to launch the new forwarding rule.
    name string
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    scheduler string
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    serverGroupId string
    ID of a virtual server group that will be forwarded.
    stickySession string
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    stickySessionType string
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    unhealthyThreshold number
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    url string
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    cookie str
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    cookie_timeout int
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    delete_protection_validation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    domain str
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    frontend_port int
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    health_check str
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    health_check_connect_port int
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    health_check_domain str
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    health_check_http_code str
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    health_check_interval int
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    health_check_timeout int
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    health_check_uri str
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    healthy_threshold int
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    listener_sync str
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    load_balancer_id str
    The Load Balancer ID which is used to launch the new forwarding rule.
    name str
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    scheduler str
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    server_group_id str
    ID of a virtual server group that will be forwarded.
    sticky_session str
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    sticky_session_type str
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    unhealthy_threshold int
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    url str
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.
    cookie String
    The cookie configured on the server. It is mandatory when sticky_session is on and sticky_session_type is server. Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1 - 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.
    cookieTimeout Number
    Cookie timeout. It is mandatory when sticky_session is on and sticky_session_type is insert. Otherwise, it will be ignored. Valid values: [1-86400] in seconds.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    domain String
    Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

    • Standard domain name: www.test.com
    • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
    frontendPort Number
    The listener frontend port which is used to launch the new forwarding rule. Valid values: [1-65535].
    healthCheck String
    Whether to enable health check. Valid values: on and off. TCP and UDP listener's health_check is always on, so it will be ignore when launching TCP or UDP listener. NOTE: health_check is required and takes effect only when listener_sync is set to off.
    healthCheckConnectPort Number
    Port used for health check. Valid values: [1-65535]. Default value: None means the backend server port is used.
    healthCheckDomain String
    Domain name used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
    healthCheckHttpCode String
    Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx.
    healthCheckInterval Number
    Time interval of health checks. It is required when health_check is on. Valid values: [1-50] in seconds. Default value: 2.
    healthCheckTimeout Number
    Maximum timeout of each health check response. It is required when health_check is on. Valid values: [1-300] in seconds. Default value: 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.
    healthCheckUri String
    URI used for health check. When it used to launch TCP listener, health_check_type must be http. Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
    healthyThreshold Number
    Threshold determining the result of the health check is success. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    listenerSync String
    Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default value: on. Valid values: on and off.
    loadBalancerId String
    The Load Balancer ID which is used to launch the new forwarding rule.
    name String
    Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".
    scheduler String
    Scheduling algorithm. Valid values: wrr, rr and wlc. Default value: wrr. NOTE: scheduler is required and takes effect only when listener_sync is set to off.
    serverGroupId String
    ID of a virtual server group that will be forwarded.
    stickySession String
    Whether to enable session persistence. Valid values: on and off. Default value: off. NOTE: sticky_session is required and takes effect only when listener_sync is set to off.
    stickySessionType String
    Mode for handling the cookie. If sticky_session is on, it is mandatory. Otherwise, it will be ignored. Valid values: insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.
    unhealthyThreshold Number
    Threshold determining the result of the health check is fail. It is required when health_check is on. Valid values: [1-10] in seconds. Default value: 3.
    url String
    Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

    Import

    Load balancer forwarding rule can be imported using the id, e.g.

    $ pulumi import alicloud:slb/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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi