1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. esa
  5. LoadBalancer
Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi

alicloud.esa.LoadBalancer

Get Started
alicloud logo
Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi

    Provides a ESA Load Balancer resource.

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

    NOTE: Available since v1.262.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = alicloud.esa.getSites({
        planSubscribeType: "enterpriseplan",
    });
    const defaultInteger = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const resourceSiteOriginPool = new alicloud.esa.Site("resource_Site_OriginPool", {
        siteName: `${name}${defaultInteger.result}.com`,
        instanceId: _default.then(_default => _default.sites?.[0]?.instanceId),
        coverage: "overseas",
        accessType: "NS",
    });
    const resourceOriginPoolLoadBalancer11 = new alicloud.esa.OriginPool("resource_OriginPool_LoadBalancer_1_1", {
        origins: [{
            type: "ip_domain",
            address: "www.example.com",
            header: "{\"Host\":[\"www.example.com\"]}",
            enabled: true,
            weight: 30,
            name: "origin1",
        }],
        siteId: resourceSiteOriginPool.id,
        originPoolName: "originpool1",
        enabled: true,
    });
    const defaultLoadBalancer = new alicloud.esa.LoadBalancer("default", {
        loadBalancerName: "lb.exampleloadbalancer.top",
        fallbackPool: resourceOriginPoolLoadBalancer11.originPoolId,
        siteId: resourceSiteOriginPool.id,
        description: name,
        defaultPools: [resourceOriginPoolLoadBalancer11.originPoolId],
        steeringPolicy: "geo",
        monitor: {
            type: "ICMP Ping",
            timeout: 5,
            monitoringRegion: "ChineseMainland",
            consecutiveUp: 3,
            consecutiveDown: 5,
            interval: 60,
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan")
    default_integer = random.index.Integer("default",
        min=10000,
        max=99999)
    resource_site_origin_pool = alicloud.esa.Site("resource_Site_OriginPool",
        site_name=f"{name}{default_integer['result']}.com",
        instance_id=default.sites[0].instance_id,
        coverage="overseas",
        access_type="NS")
    resource_origin_pool_load_balancer11 = alicloud.esa.OriginPool("resource_OriginPool_LoadBalancer_1_1",
        origins=[{
            "type": "ip_domain",
            "address": "www.example.com",
            "header": "{\"Host\":[\"www.example.com\"]}",
            "enabled": True,
            "weight": 30,
            "name": "origin1",
        }],
        site_id=resource_site_origin_pool.id,
        origin_pool_name="originpool1",
        enabled=True)
    default_load_balancer = alicloud.esa.LoadBalancer("default",
        load_balancer_name="lb.exampleloadbalancer.top",
        fallback_pool=resource_origin_pool_load_balancer11.origin_pool_id,
        site_id=resource_site_origin_pool.id,
        description=name,
        default_pools=[resource_origin_pool_load_balancer11.origin_pool_id],
        steering_policy="geo",
        monitor={
            "type": "ICMP Ping",
            "timeout": 5,
            "monitoring_region": "ChineseMainland",
            "consecutive_up": 3,
            "consecutive_down": 5,
            "interval": 60,
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := esa.GetSites(ctx, &esa.GetSitesArgs{
    			PlanSubscribeType: pulumi.StringRef("enterpriseplan"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		resourceSiteOriginPool, err := esa.NewSite(ctx, "resource_Site_OriginPool", &esa.SiteArgs{
    			SiteName:   pulumi.Sprintf("%v%v.com", name, defaultInteger.Result),
    			InstanceId: pulumi.String(_default.Sites[0].InstanceId),
    			Coverage:   pulumi.String("overseas"),
    			AccessType: pulumi.String("NS"),
    		})
    		if err != nil {
    			return err
    		}
    		resourceOriginPoolLoadBalancer11, err := esa.NewOriginPool(ctx, "resource_OriginPool_LoadBalancer_1_1", &esa.OriginPoolArgs{
    			Origins: esa.OriginPoolOriginArray{
    				&esa.OriginPoolOriginArgs{
    					Type:    pulumi.String("ip_domain"),
    					Address: pulumi.String("www.example.com"),
    					Header:  pulumi.String("{\"Host\":[\"www.example.com\"]}"),
    					Enabled: pulumi.Bool(true),
    					Weight:  pulumi.Int(30),
    					Name:    pulumi.String("origin1"),
    				},
    			},
    			SiteId:         resourceSiteOriginPool.ID(),
    			OriginPoolName: pulumi.String("originpool1"),
    			Enabled:        pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = esa.NewLoadBalancer(ctx, "default", &esa.LoadBalancerArgs{
    			LoadBalancerName: pulumi.String("lb.exampleloadbalancer.top"),
    			FallbackPool:     resourceOriginPoolLoadBalancer11.OriginPoolId,
    			SiteId:           resourceSiteOriginPool.ID(),
    			Description:      pulumi.String(name),
    			DefaultPools: pulumi.IntArray{
    				resourceOriginPoolLoadBalancer11.OriginPoolId,
    			},
    			SteeringPolicy: pulumi.String("geo"),
    			Monitor: &esa.LoadBalancerMonitorArgs{
    				Type:             pulumi.String("ICMP Ping"),
    				Timeout:          pulumi.Int(5),
    				MonitoringRegion: pulumi.String("ChineseMainland"),
    				ConsecutiveUp:    pulumi.Int(3),
    				ConsecutiveDown:  pulumi.Int(5),
    				Interval:         pulumi.Int(60),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.Esa.GetSites.Invoke(new()
        {
            PlanSubscribeType = "enterpriseplan",
        });
    
        var defaultInteger = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var resourceSiteOriginPool = new AliCloud.Esa.Site("resource_Site_OriginPool", new()
        {
            SiteName = $"{name}{defaultInteger.Result}.com",
            InstanceId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.InstanceId)),
            Coverage = "overseas",
            AccessType = "NS",
        });
    
        var resourceOriginPoolLoadBalancer11 = new AliCloud.Esa.OriginPool("resource_OriginPool_LoadBalancer_1_1", new()
        {
            Origins = new[]
            {
                new AliCloud.Esa.Inputs.OriginPoolOriginArgs
                {
                    Type = "ip_domain",
                    Address = "www.example.com",
                    Header = "{\"Host\":[\"www.example.com\"]}",
                    Enabled = true,
                    Weight = 30,
                    Name = "origin1",
                },
            },
            SiteId = resourceSiteOriginPool.Id,
            OriginPoolName = "originpool1",
            Enabled = true,
        });
    
        var defaultLoadBalancer = new AliCloud.Esa.LoadBalancer("default", new()
        {
            LoadBalancerName = "lb.exampleloadbalancer.top",
            FallbackPool = resourceOriginPoolLoadBalancer11.OriginPoolId,
            SiteId = resourceSiteOriginPool.Id,
            Description = name,
            DefaultPools = new[]
            {
                resourceOriginPoolLoadBalancer11.OriginPoolId,
            },
            SteeringPolicy = "geo",
            Monitor = new AliCloud.Esa.Inputs.LoadBalancerMonitorArgs
            {
                Type = "ICMP Ping",
                Timeout = 5,
                MonitoringRegion = "ChineseMainland",
                ConsecutiveUp = 3,
                ConsecutiveDown = 5,
                Interval = 60,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.esa.EsaFunctions;
    import com.pulumi.alicloud.esa.inputs.GetSitesArgs;
    import com.pulumi.random.Integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.esa.Site;
    import com.pulumi.alicloud.esa.SiteArgs;
    import com.pulumi.alicloud.esa.OriginPool;
    import com.pulumi.alicloud.esa.OriginPoolArgs;
    import com.pulumi.alicloud.esa.inputs.OriginPoolOriginArgs;
    import com.pulumi.alicloud.esa.LoadBalancer;
    import com.pulumi.alicloud.esa.LoadBalancerArgs;
    import com.pulumi.alicloud.esa.inputs.LoadBalancerMonitorArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var default = EsaFunctions.getSites(GetSitesArgs.builder()
                .planSubscribeType("enterpriseplan")
                .build());
    
            var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var resourceSiteOriginPool = new Site("resourceSiteOriginPool", SiteArgs.builder()
                .siteName(String.format("%s%s.com", name,defaultInteger.result()))
                .instanceId(default_.sites()[0].instanceId())
                .coverage("overseas")
                .accessType("NS")
                .build());
    
            var resourceOriginPoolLoadBalancer11 = new OriginPool("resourceOriginPoolLoadBalancer11", OriginPoolArgs.builder()
                .origins(OriginPoolOriginArgs.builder()
                    .type("ip_domain")
                    .address("www.example.com")
                    .header("{\"Host\":[\"www.example.com\"]}")
                    .enabled(true)
                    .weight(30)
                    .name("origin1")
                    .build())
                .siteId(resourceSiteOriginPool.id())
                .originPoolName("originpool1")
                .enabled(true)
                .build());
    
            var defaultLoadBalancer = new LoadBalancer("defaultLoadBalancer", LoadBalancerArgs.builder()
                .loadBalancerName("lb.exampleloadbalancer.top")
                .fallbackPool(resourceOriginPoolLoadBalancer11.originPoolId())
                .siteId(resourceSiteOriginPool.id())
                .description(name)
                .defaultPools(resourceOriginPoolLoadBalancer11.originPoolId())
                .steeringPolicy("geo")
                .monitor(LoadBalancerMonitorArgs.builder()
                    .type("ICMP Ping")
                    .timeout(5)
                    .monitoringRegion("ChineseMainland")
                    .consecutiveUp(3)
                    .consecutiveDown(5)
                    .interval(60)
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultInteger:
        type: random:Integer
        name: default
        properties:
          min: 10000
          max: 99999
      resourceSiteOriginPool:
        type: alicloud:esa:Site
        name: resource_Site_OriginPool
        properties:
          siteName: ${name}${defaultInteger.result}.com
          instanceId: ${default.sites[0].instanceId}
          coverage: overseas
          accessType: NS
      resourceOriginPoolLoadBalancer11:
        type: alicloud:esa:OriginPool
        name: resource_OriginPool_LoadBalancer_1_1
        properties:
          origins:
            - type: ip_domain
              address: www.example.com
              header: '{"Host":["www.example.com"]}'
              enabled: true
              weight: '30'
              name: origin1
          siteId: ${resourceSiteOriginPool.id}
          originPoolName: originpool1
          enabled: true
      defaultLoadBalancer:
        type: alicloud:esa:LoadBalancer
        name: default
        properties:
          loadBalancerName: lb.exampleloadbalancer.top
          fallbackPool: ${resourceOriginPoolLoadBalancer11.originPoolId}
          siteId: ${resourceSiteOriginPool.id}
          description: ${name}
          defaultPools:
            - ${resourceOriginPoolLoadBalancer11.originPoolId}
          steeringPolicy: geo
          monitor:
            type: ICMP Ping
            timeout: 5
            monitoringRegion: ChineseMainland
            consecutiveUp: 3
            consecutiveDown: 5
            interval: 60
    variables:
      default:
        fn::invoke:
          function: alicloud:esa:getSites
          arguments:
            planSubscribeType: enterpriseplan
    

    Create LoadBalancer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);
    @overload
    def LoadBalancer(resource_name: str,
                     args: LoadBalancerArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def LoadBalancer(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     monitor: Optional[LoadBalancerMonitorArgs] = None,
                     default_pools: Optional[Sequence[int]] = None,
                     steering_policy: Optional[str] = None,
                     site_id: Optional[int] = None,
                     fallback_pool: Optional[int] = None,
                     load_balancer_name: Optional[str] = None,
                     enabled: Optional[bool] = None,
                     random_steering: Optional[LoadBalancerRandomSteeringArgs] = None,
                     region_pools: Optional[str] = None,
                     rules: Optional[Sequence[LoadBalancerRuleArgs]] = None,
                     session_affinity: Optional[str] = None,
                     adaptive_routing: Optional[LoadBalancerAdaptiveRoutingArgs] = None,
                     description: Optional[str] = None,
                     sub_region_pools: Optional[str] = None,
                     ttl: Optional[int] = None)
    func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)
    public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
    public LoadBalancer(String name, LoadBalancerArgs args)
    public LoadBalancer(String name, LoadBalancerArgs args, CustomResourceOptions options)
    
    type: alicloud:esa:LoadBalancer
    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 LoadBalancerArgs
    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 LoadBalancerArgs
    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 LoadBalancerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LoadBalancerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LoadBalancerArgs
    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 exampleloadBalancerResourceResourceFromEsaloadBalancer = new AliCloud.Esa.LoadBalancer("exampleloadBalancerResourceResourceFromEsaloadBalancer", new()
    {
        Monitor = new AliCloud.Esa.Inputs.LoadBalancerMonitorArgs
        {
            ConsecutiveDown = 0,
            ConsecutiveUp = 0,
            ExpectedCodes = "string",
            FollowRedirects = false,
            Header = "string",
            Interval = 0,
            Method = "string",
            MonitoringRegion = "string",
            Path = "string",
            Port = 0,
            Timeout = 0,
            Type = "string",
        },
        DefaultPools = new[]
        {
            0,
        },
        SteeringPolicy = "string",
        SiteId = 0,
        FallbackPool = 0,
        LoadBalancerName = "string",
        Enabled = false,
        RandomSteering = new AliCloud.Esa.Inputs.LoadBalancerRandomSteeringArgs
        {
            DefaultWeight = 0,
            PoolWeights = 
            {
                { "string", "string" },
            },
        },
        RegionPools = "string",
        Rules = new[]
        {
            new AliCloud.Esa.Inputs.LoadBalancerRuleArgs
            {
                FixedResponse = new AliCloud.Esa.Inputs.LoadBalancerRuleFixedResponseArgs
                {
                    ContentType = "string",
                    Location = "string",
                    MessageBody = "string",
                    StatusCode = 0,
                },
                Overrides = "string",
                Rule = "string",
                RuleEnable = "string",
                RuleName = "string",
                Sequence = 0,
                Terminates = false,
            },
        },
        SessionAffinity = "string",
        AdaptiveRouting = new AliCloud.Esa.Inputs.LoadBalancerAdaptiveRoutingArgs
        {
            FailoverAcrossPools = false,
        },
        Description = "string",
        SubRegionPools = "string",
        Ttl = 0,
    });
    
    example, err := esa.NewLoadBalancer(ctx, "exampleloadBalancerResourceResourceFromEsaloadBalancer", &esa.LoadBalancerArgs{
    	Monitor: &esa.LoadBalancerMonitorArgs{
    		ConsecutiveDown:  pulumi.Int(0),
    		ConsecutiveUp:    pulumi.Int(0),
    		ExpectedCodes:    pulumi.String("string"),
    		FollowRedirects:  pulumi.Bool(false),
    		Header:           pulumi.String("string"),
    		Interval:         pulumi.Int(0),
    		Method:           pulumi.String("string"),
    		MonitoringRegion: pulumi.String("string"),
    		Path:             pulumi.String("string"),
    		Port:             pulumi.Int(0),
    		Timeout:          pulumi.Int(0),
    		Type:             pulumi.String("string"),
    	},
    	DefaultPools: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	SteeringPolicy:   pulumi.String("string"),
    	SiteId:           pulumi.Int(0),
    	FallbackPool:     pulumi.Int(0),
    	LoadBalancerName: pulumi.String("string"),
    	Enabled:          pulumi.Bool(false),
    	RandomSteering: &esa.LoadBalancerRandomSteeringArgs{
    		DefaultWeight: pulumi.Int(0),
    		PoolWeights: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	RegionPools: pulumi.String("string"),
    	Rules: esa.LoadBalancerRuleArray{
    		&esa.LoadBalancerRuleArgs{
    			FixedResponse: &esa.LoadBalancerRuleFixedResponseArgs{
    				ContentType: pulumi.String("string"),
    				Location:    pulumi.String("string"),
    				MessageBody: pulumi.String("string"),
    				StatusCode:  pulumi.Int(0),
    			},
    			Overrides:  pulumi.String("string"),
    			Rule:       pulumi.String("string"),
    			RuleEnable: pulumi.String("string"),
    			RuleName:   pulumi.String("string"),
    			Sequence:   pulumi.Int(0),
    			Terminates: pulumi.Bool(false),
    		},
    	},
    	SessionAffinity: pulumi.String("string"),
    	AdaptiveRouting: &esa.LoadBalancerAdaptiveRoutingArgs{
    		FailoverAcrossPools: pulumi.Bool(false),
    	},
    	Description:    pulumi.String("string"),
    	SubRegionPools: pulumi.String("string"),
    	Ttl:            pulumi.Int(0),
    })
    
    var exampleloadBalancerResourceResourceFromEsaloadBalancer = new com.pulumi.alicloud.esa.LoadBalancer("exampleloadBalancerResourceResourceFromEsaloadBalancer", com.pulumi.alicloud.esa.LoadBalancerArgs.builder()
        .monitor(LoadBalancerMonitorArgs.builder()
            .consecutiveDown(0)
            .consecutiveUp(0)
            .expectedCodes("string")
            .followRedirects(false)
            .header("string")
            .interval(0)
            .method("string")
            .monitoringRegion("string")
            .path("string")
            .port(0)
            .timeout(0)
            .type("string")
            .build())
        .defaultPools(0)
        .steeringPolicy("string")
        .siteId(0)
        .fallbackPool(0)
        .loadBalancerName("string")
        .enabled(false)
        .randomSteering(LoadBalancerRandomSteeringArgs.builder()
            .defaultWeight(0)
            .poolWeights(Map.of("string", "string"))
            .build())
        .regionPools("string")
        .rules(LoadBalancerRuleArgs.builder()
            .fixedResponse(LoadBalancerRuleFixedResponseArgs.builder()
                .contentType("string")
                .location("string")
                .messageBody("string")
                .statusCode(0)
                .build())
            .overrides("string")
            .rule("string")
            .ruleEnable("string")
            .ruleName("string")
            .sequence(0)
            .terminates(false)
            .build())
        .sessionAffinity("string")
        .adaptiveRouting(LoadBalancerAdaptiveRoutingArgs.builder()
            .failoverAcrossPools(false)
            .build())
        .description("string")
        .subRegionPools("string")
        .ttl(0)
        .build());
    
    exampleload_balancer_resource_resource_from_esaload_balancer = alicloud.esa.LoadBalancer("exampleloadBalancerResourceResourceFromEsaloadBalancer",
        monitor={
            "consecutive_down": 0,
            "consecutive_up": 0,
            "expected_codes": "string",
            "follow_redirects": False,
            "header": "string",
            "interval": 0,
            "method": "string",
            "monitoring_region": "string",
            "path": "string",
            "port": 0,
            "timeout": 0,
            "type": "string",
        },
        default_pools=[0],
        steering_policy="string",
        site_id=0,
        fallback_pool=0,
        load_balancer_name="string",
        enabled=False,
        random_steering={
            "default_weight": 0,
            "pool_weights": {
                "string": "string",
            },
        },
        region_pools="string",
        rules=[{
            "fixed_response": {
                "content_type": "string",
                "location": "string",
                "message_body": "string",
                "status_code": 0,
            },
            "overrides": "string",
            "rule": "string",
            "rule_enable": "string",
            "rule_name": "string",
            "sequence": 0,
            "terminates": False,
        }],
        session_affinity="string",
        adaptive_routing={
            "failover_across_pools": False,
        },
        description="string",
        sub_region_pools="string",
        ttl=0)
    
    const exampleloadBalancerResourceResourceFromEsaloadBalancer = new alicloud.esa.LoadBalancer("exampleloadBalancerResourceResourceFromEsaloadBalancer", {
        monitor: {
            consecutiveDown: 0,
            consecutiveUp: 0,
            expectedCodes: "string",
            followRedirects: false,
            header: "string",
            interval: 0,
            method: "string",
            monitoringRegion: "string",
            path: "string",
            port: 0,
            timeout: 0,
            type: "string",
        },
        defaultPools: [0],
        steeringPolicy: "string",
        siteId: 0,
        fallbackPool: 0,
        loadBalancerName: "string",
        enabled: false,
        randomSteering: {
            defaultWeight: 0,
            poolWeights: {
                string: "string",
            },
        },
        regionPools: "string",
        rules: [{
            fixedResponse: {
                contentType: "string",
                location: "string",
                messageBody: "string",
                statusCode: 0,
            },
            overrides: "string",
            rule: "string",
            ruleEnable: "string",
            ruleName: "string",
            sequence: 0,
            terminates: false,
        }],
        sessionAffinity: "string",
        adaptiveRouting: {
            failoverAcrossPools: false,
        },
        description: "string",
        subRegionPools: "string",
        ttl: 0,
    });
    
    type: alicloud:esa:LoadBalancer
    properties:
        adaptiveRouting:
            failoverAcrossPools: false
        defaultPools:
            - 0
        description: string
        enabled: false
        fallbackPool: 0
        loadBalancerName: string
        monitor:
            consecutiveDown: 0
            consecutiveUp: 0
            expectedCodes: string
            followRedirects: false
            header: string
            interval: 0
            method: string
            monitoringRegion: string
            path: string
            port: 0
            timeout: 0
            type: string
        randomSteering:
            defaultWeight: 0
            poolWeights:
                string: string
        regionPools: string
        rules:
            - fixedResponse:
                contentType: string
                location: string
                messageBody: string
                statusCode: 0
              overrides: string
              rule: string
              ruleEnable: string
              ruleName: string
              sequence: 0
              terminates: false
        sessionAffinity: string
        siteId: 0
        steeringPolicy: string
        subRegionPools: string
        ttl: 0
    

    LoadBalancer Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The LoadBalancer resource accepts the following input properties:

    DefaultPools List<int>
    List of default pool IDs.
    FallbackPool int
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    LoadBalancerName string
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    Monitor Pulumi.AliCloud.Esa.Inputs.LoadBalancerMonitor
    Monitor configuration for health check. See monitor below.
    SiteId int
    The site ID.
    SteeringPolicy string
    Load balancing policy.
    AdaptiveRouting Pulumi.AliCloud.Esa.Inputs.LoadBalancerAdaptiveRouting
    Cross-pool origin configuration. See adaptive_routing below.
    Description string
    The detailed description of the load balancer for easy management and identification.
    Enabled bool
    Whether the load balancer is enabled.
    RandomSteering Pulumi.AliCloud.Esa.Inputs.LoadBalancerRandomSteering
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    RegionPools string
    Address pools corresponding to primary regions.
    Rules List<Pulumi.AliCloud.Esa.Inputs.LoadBalancerRule>
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    SessionAffinity string
    Session persistence. Valid values:
    SubRegionPools string
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    Ttl int
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    DefaultPools []int
    List of default pool IDs.
    FallbackPool int
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    LoadBalancerName string
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    Monitor LoadBalancerMonitorArgs
    Monitor configuration for health check. See monitor below.
    SiteId int
    The site ID.
    SteeringPolicy string
    Load balancing policy.
    AdaptiveRouting LoadBalancerAdaptiveRoutingArgs
    Cross-pool origin configuration. See adaptive_routing below.
    Description string
    The detailed description of the load balancer for easy management and identification.
    Enabled bool
    Whether the load balancer is enabled.
    RandomSteering LoadBalancerRandomSteeringArgs
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    RegionPools string
    Address pools corresponding to primary regions.
    Rules []LoadBalancerRuleArgs
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    SessionAffinity string
    Session persistence. Valid values:
    SubRegionPools string
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    Ttl int
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    defaultPools List<Integer>
    List of default pool IDs.
    fallbackPool Integer
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    loadBalancerName String
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    monitor LoadBalancerMonitor
    Monitor configuration for health check. See monitor below.
    siteId Integer
    The site ID.
    steeringPolicy String
    Load balancing policy.
    adaptiveRouting LoadBalancerAdaptiveRouting
    Cross-pool origin configuration. See adaptive_routing below.
    description String
    The detailed description of the load balancer for easy management and identification.
    enabled Boolean
    Whether the load balancer is enabled.
    randomSteering LoadBalancerRandomSteering
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    regionPools String
    Address pools corresponding to primary regions.
    rules List<LoadBalancerRule>
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    sessionAffinity String
    Session persistence. Valid values:
    subRegionPools String
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    ttl Integer
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    defaultPools number[]
    List of default pool IDs.
    fallbackPool number
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    loadBalancerName string
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    monitor LoadBalancerMonitor
    Monitor configuration for health check. See monitor below.
    siteId number
    The site ID.
    steeringPolicy string
    Load balancing policy.
    adaptiveRouting LoadBalancerAdaptiveRouting
    Cross-pool origin configuration. See adaptive_routing below.
    description string
    The detailed description of the load balancer for easy management and identification.
    enabled boolean
    Whether the load balancer is enabled.
    randomSteering LoadBalancerRandomSteering
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    regionPools string
    Address pools corresponding to primary regions.
    rules LoadBalancerRule[]
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    sessionAffinity string
    Session persistence. Valid values:
    subRegionPools string
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    ttl number
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    default_pools Sequence[int]
    List of default pool IDs.
    fallback_pool int
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    load_balancer_name str
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    monitor LoadBalancerMonitorArgs
    Monitor configuration for health check. See monitor below.
    site_id int
    The site ID.
    steering_policy str
    Load balancing policy.
    adaptive_routing LoadBalancerAdaptiveRoutingArgs
    Cross-pool origin configuration. See adaptive_routing below.
    description str
    The detailed description of the load balancer for easy management and identification.
    enabled bool
    Whether the load balancer is enabled.
    random_steering LoadBalancerRandomSteeringArgs
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    region_pools str
    Address pools corresponding to primary regions.
    rules Sequence[LoadBalancerRuleArgs]
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    session_affinity str
    Session persistence. Valid values:
    sub_region_pools str
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    ttl int
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    defaultPools List<Number>
    List of default pool IDs.
    fallbackPool Number
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    loadBalancerName String
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    monitor Property Map
    Monitor configuration for health check. See monitor below.
    siteId Number
    The site ID.
    steeringPolicy String
    Load balancing policy.
    adaptiveRouting Property Map
    Cross-pool origin configuration. See adaptive_routing below.
    description String
    The detailed description of the load balancer for easy management and identification.
    enabled Boolean
    Whether the load balancer is enabled.
    randomSteering Property Map
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    regionPools String
    Address pools corresponding to primary regions.
    rules List<Property Map>
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    sessionAffinity String
    Session persistence. Valid values:
    subRegionPools String
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    ttl Number
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    LoadBalancerId int
    The unique identifier ID of the load balancer.
    Status string
    The status of the load balancer.
    Id string
    The provider-assigned unique ID for this managed resource.
    LoadBalancerId int
    The unique identifier ID of the load balancer.
    Status string
    The status of the load balancer.
    id String
    The provider-assigned unique ID for this managed resource.
    loadBalancerId Integer
    The unique identifier ID of the load balancer.
    status String
    The status of the load balancer.
    id string
    The provider-assigned unique ID for this managed resource.
    loadBalancerId number
    The unique identifier ID of the load balancer.
    status string
    The status of the load balancer.
    id str
    The provider-assigned unique ID for this managed resource.
    load_balancer_id int
    The unique identifier ID of the load balancer.
    status str
    The status of the load balancer.
    id String
    The provider-assigned unique ID for this managed resource.
    loadBalancerId Number
    The unique identifier ID of the load balancer.
    status String
    The status of the load balancer.

    Look up Existing LoadBalancer Resource

    Get an existing LoadBalancer 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?: LoadBalancerState, opts?: CustomResourceOptions): LoadBalancer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            adaptive_routing: Optional[LoadBalancerAdaptiveRoutingArgs] = None,
            default_pools: Optional[Sequence[int]] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            fallback_pool: Optional[int] = None,
            load_balancer_id: Optional[int] = None,
            load_balancer_name: Optional[str] = None,
            monitor: Optional[LoadBalancerMonitorArgs] = None,
            random_steering: Optional[LoadBalancerRandomSteeringArgs] = None,
            region_pools: Optional[str] = None,
            rules: Optional[Sequence[LoadBalancerRuleArgs]] = None,
            session_affinity: Optional[str] = None,
            site_id: Optional[int] = None,
            status: Optional[str] = None,
            steering_policy: Optional[str] = None,
            sub_region_pools: Optional[str] = None,
            ttl: Optional[int] = None) -> LoadBalancer
    func GetLoadBalancer(ctx *Context, name string, id IDInput, state *LoadBalancerState, opts ...ResourceOption) (*LoadBalancer, error)
    public static LoadBalancer Get(string name, Input<string> id, LoadBalancerState? state, CustomResourceOptions? opts = null)
    public static LoadBalancer get(String name, Output<String> id, LoadBalancerState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:esa:LoadBalancer    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AdaptiveRouting Pulumi.AliCloud.Esa.Inputs.LoadBalancerAdaptiveRouting
    Cross-pool origin configuration. See adaptive_routing below.
    DefaultPools List<int>
    List of default pool IDs.
    Description string
    The detailed description of the load balancer for easy management and identification.
    Enabled bool
    Whether the load balancer is enabled.
    FallbackPool int
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    LoadBalancerId int
    The unique identifier ID of the load balancer.
    LoadBalancerName string
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    Monitor Pulumi.AliCloud.Esa.Inputs.LoadBalancerMonitor
    Monitor configuration for health check. See monitor below.
    RandomSteering Pulumi.AliCloud.Esa.Inputs.LoadBalancerRandomSteering
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    RegionPools string
    Address pools corresponding to primary regions.
    Rules List<Pulumi.AliCloud.Esa.Inputs.LoadBalancerRule>
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    SessionAffinity string
    Session persistence. Valid values:
    SiteId int
    The site ID.
    Status string
    The status of the load balancer.
    SteeringPolicy string
    Load balancing policy.
    SubRegionPools string
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    Ttl int
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    AdaptiveRouting LoadBalancerAdaptiveRoutingArgs
    Cross-pool origin configuration. See adaptive_routing below.
    DefaultPools []int
    List of default pool IDs.
    Description string
    The detailed description of the load balancer for easy management and identification.
    Enabled bool
    Whether the load balancer is enabled.
    FallbackPool int
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    LoadBalancerId int
    The unique identifier ID of the load balancer.
    LoadBalancerName string
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    Monitor LoadBalancerMonitorArgs
    Monitor configuration for health check. See monitor below.
    RandomSteering LoadBalancerRandomSteeringArgs
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    RegionPools string
    Address pools corresponding to primary regions.
    Rules []LoadBalancerRuleArgs
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    SessionAffinity string
    Session persistence. Valid values:
    SiteId int
    The site ID.
    Status string
    The status of the load balancer.
    SteeringPolicy string
    Load balancing policy.
    SubRegionPools string
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    Ttl int
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    adaptiveRouting LoadBalancerAdaptiveRouting
    Cross-pool origin configuration. See adaptive_routing below.
    defaultPools List<Integer>
    List of default pool IDs.
    description String
    The detailed description of the load balancer for easy management and identification.
    enabled Boolean
    Whether the load balancer is enabled.
    fallbackPool Integer
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    loadBalancerId Integer
    The unique identifier ID of the load balancer.
    loadBalancerName String
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    monitor LoadBalancerMonitor
    Monitor configuration for health check. See monitor below.
    randomSteering LoadBalancerRandomSteering
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    regionPools String
    Address pools corresponding to primary regions.
    rules List<LoadBalancerRule>
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    sessionAffinity String
    Session persistence. Valid values:
    siteId Integer
    The site ID.
    status String
    The status of the load balancer.
    steeringPolicy String
    Load balancing policy.
    subRegionPools String
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    ttl Integer
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    adaptiveRouting LoadBalancerAdaptiveRouting
    Cross-pool origin configuration. See adaptive_routing below.
    defaultPools number[]
    List of default pool IDs.
    description string
    The detailed description of the load balancer for easy management and identification.
    enabled boolean
    Whether the load balancer is enabled.
    fallbackPool number
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    loadBalancerId number
    The unique identifier ID of the load balancer.
    loadBalancerName string
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    monitor LoadBalancerMonitor
    Monitor configuration for health check. See monitor below.
    randomSteering LoadBalancerRandomSteering
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    regionPools string
    Address pools corresponding to primary regions.
    rules LoadBalancerRule[]
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    sessionAffinity string
    Session persistence. Valid values:
    siteId number
    The site ID.
    status string
    The status of the load balancer.
    steeringPolicy string
    Load balancing policy.
    subRegionPools string
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    ttl number
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    adaptive_routing LoadBalancerAdaptiveRoutingArgs
    Cross-pool origin configuration. See adaptive_routing below.
    default_pools Sequence[int]
    List of default pool IDs.
    description str
    The detailed description of the load balancer for easy management and identification.
    enabled bool
    Whether the load balancer is enabled.
    fallback_pool int
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    load_balancer_id int
    The unique identifier ID of the load balancer.
    load_balancer_name str
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    monitor LoadBalancerMonitorArgs
    Monitor configuration for health check. See monitor below.
    random_steering LoadBalancerRandomSteeringArgs
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    region_pools str
    Address pools corresponding to primary regions.
    rules Sequence[LoadBalancerRuleArgs]
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    session_affinity str
    Session persistence. Valid values:
    site_id int
    The site ID.
    status str
    The status of the load balancer.
    steering_policy str
    Load balancing policy.
    sub_region_pools str
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    ttl int
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.
    adaptiveRouting Property Map
    Cross-pool origin configuration. See adaptive_routing below.
    defaultPools List<Number>
    List of default pool IDs.
    description String
    The detailed description of the load balancer for easy management and identification.
    enabled Boolean
    Whether the load balancer is enabled.
    fallbackPool Number
    The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.
    loadBalancerId Number
    The unique identifier ID of the load balancer.
    loadBalancerName String
    The name of the load balancer must meet the domain name format verification and be a subdomain name under the site.
    monitor Property Map
    Monitor configuration for health check. See monitor below.
    randomSteering Property Map
    Weighted round-robin configuration, used to control the traffic distribution weights among different pools. See random_steering below.
    regionPools String
    Address pools corresponding to primary regions.
    rules List<Property Map>
    Rule configuration list, used to define behavior under specific conditions. See rules below.
    sessionAffinity String
    Session persistence. Valid values:
    siteId Number
    The site ID.
    status String
    The status of the load balancer.
    steeringPolicy String
    Load balancing policy.
    subRegionPools String
    Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.
    ttl Number
    TTL value, the time-to-live for DNS records. The default value is 30. The value range is 10-600.

    Supporting Types

    LoadBalancerAdaptiveRouting, LoadBalancerAdaptiveRoutingArgs

    FailoverAcrossPools bool
    Whether to failover across pools.
    FailoverAcrossPools bool
    Whether to failover across pools.
    failoverAcrossPools Boolean
    Whether to failover across pools.
    failoverAcrossPools boolean
    Whether to failover across pools.
    failover_across_pools bool
    Whether to failover across pools.
    failoverAcrossPools Boolean
    Whether to failover across pools.

    LoadBalancerMonitor, LoadBalancerMonitorArgs

    ConsecutiveDown int
    The number of consecutive failed health checks before the backend is considered down, for example, 5.
    ConsecutiveUp int
    The number of consecutive successful probes required to consider the target as up, e.g., 3.
    ExpectedCodes string
    Expected status code, such as 200,202, successful HTTP response.
    FollowRedirects bool
    Whether to follow the redirect.
    Header string
    The HTTP headers to be included in the health check request.
    Interval int
    The monitoring interval, such as 60 seconds, checks the frequency.
    Method string
    Monitor request methods, such as GET, methods in the HTTP protocol.
    MonitoringRegion string
    Probe Point Region, default to Global

    • Global: Global.
    • ChineseMainland: Chinese mainland.
    • OutsideChineseMainland: Global (excluding the Chinese mainland).
    Path string
    The monitor checks the path, such as/healthcheck, the HTTP request path.
    Port int
    The target port.
    Timeout int
    The timeout for the health check, in seconds. The value range is 1-10.
    Type string
    The type of monitor protocol, such as HTTP, used for health checks. When the value is off, it indicates that no check is performed.
    ConsecutiveDown int
    The number of consecutive failed health checks before the backend is considered down, for example, 5.
    ConsecutiveUp int
    The number of consecutive successful probes required to consider the target as up, e.g., 3.
    ExpectedCodes string
    Expected status code, such as 200,202, successful HTTP response.
    FollowRedirects bool
    Whether to follow the redirect.
    Header string
    The HTTP headers to be included in the health check request.
    Interval int
    The monitoring interval, such as 60 seconds, checks the frequency.
    Method string
    Monitor request methods, such as GET, methods in the HTTP protocol.
    MonitoringRegion string
    Probe Point Region, default to Global

    • Global: Global.
    • ChineseMainland: Chinese mainland.
    • OutsideChineseMainland: Global (excluding the Chinese mainland).
    Path string
    The monitor checks the path, such as/healthcheck, the HTTP request path.
    Port int
    The target port.
    Timeout int
    The timeout for the health check, in seconds. The value range is 1-10.
    Type string
    The type of monitor protocol, such as HTTP, used for health checks. When the value is off, it indicates that no check is performed.
    consecutiveDown Integer
    The number of consecutive failed health checks before the backend is considered down, for example, 5.
    consecutiveUp Integer
    The number of consecutive successful probes required to consider the target as up, e.g., 3.
    expectedCodes String
    Expected status code, such as 200,202, successful HTTP response.
    followRedirects Boolean
    Whether to follow the redirect.
    header String
    The HTTP headers to be included in the health check request.
    interval Integer
    The monitoring interval, such as 60 seconds, checks the frequency.
    method String
    Monitor request methods, such as GET, methods in the HTTP protocol.
    monitoringRegion String
    Probe Point Region, default to Global

    • Global: Global.
    • ChineseMainland: Chinese mainland.
    • OutsideChineseMainland: Global (excluding the Chinese mainland).
    path String
    The monitor checks the path, such as/healthcheck, the HTTP request path.
    port Integer
    The target port.
    timeout Integer
    The timeout for the health check, in seconds. The value range is 1-10.
    type String
    The type of monitor protocol, such as HTTP, used for health checks. When the value is off, it indicates that no check is performed.
    consecutiveDown number
    The number of consecutive failed health checks before the backend is considered down, for example, 5.
    consecutiveUp number
    The number of consecutive successful probes required to consider the target as up, e.g., 3.
    expectedCodes string
    Expected status code, such as 200,202, successful HTTP response.
    followRedirects boolean
    Whether to follow the redirect.
    header string
    The HTTP headers to be included in the health check request.
    interval number
    The monitoring interval, such as 60 seconds, checks the frequency.
    method string
    Monitor request methods, such as GET, methods in the HTTP protocol.
    monitoringRegion string
    Probe Point Region, default to Global

    • Global: Global.
    • ChineseMainland: Chinese mainland.
    • OutsideChineseMainland: Global (excluding the Chinese mainland).
    path string
    The monitor checks the path, such as/healthcheck, the HTTP request path.
    port number
    The target port.
    timeout number
    The timeout for the health check, in seconds. The value range is 1-10.
    type string
    The type of monitor protocol, such as HTTP, used for health checks. When the value is off, it indicates that no check is performed.
    consecutive_down int
    The number of consecutive failed health checks before the backend is considered down, for example, 5.
    consecutive_up int
    The number of consecutive successful probes required to consider the target as up, e.g., 3.
    expected_codes str
    Expected status code, such as 200,202, successful HTTP response.
    follow_redirects bool
    Whether to follow the redirect.
    header str
    The HTTP headers to be included in the health check request.
    interval int
    The monitoring interval, such as 60 seconds, checks the frequency.
    method str
    Monitor request methods, such as GET, methods in the HTTP protocol.
    monitoring_region str
    Probe Point Region, default to Global

    • Global: Global.
    • ChineseMainland: Chinese mainland.
    • OutsideChineseMainland: Global (excluding the Chinese mainland).
    path str
    The monitor checks the path, such as/healthcheck, the HTTP request path.
    port int
    The target port.
    timeout int
    The timeout for the health check, in seconds. The value range is 1-10.
    type str
    The type of monitor protocol, such as HTTP, used for health checks. When the value is off, it indicates that no check is performed.
    consecutiveDown Number
    The number of consecutive failed health checks before the backend is considered down, for example, 5.
    consecutiveUp Number
    The number of consecutive successful probes required to consider the target as up, e.g., 3.
    expectedCodes String
    Expected status code, such as 200,202, successful HTTP response.
    followRedirects Boolean
    Whether to follow the redirect.
    header String
    The HTTP headers to be included in the health check request.
    interval Number
    The monitoring interval, such as 60 seconds, checks the frequency.
    method String
    Monitor request methods, such as GET, methods in the HTTP protocol.
    monitoringRegion String
    Probe Point Region, default to Global

    • Global: Global.
    • ChineseMainland: Chinese mainland.
    • OutsideChineseMainland: Global (excluding the Chinese mainland).
    path String
    The monitor checks the path, such as/healthcheck, the HTTP request path.
    port Number
    The target port.
    timeout Number
    The timeout for the health check, in seconds. The value range is 1-10.
    type String
    The type of monitor protocol, such as HTTP, used for health checks. When the value is off, it indicates that no check is performed.

    LoadBalancerRandomSteering, LoadBalancerRandomSteeringArgs

    DefaultWeight int
    The default round-robin weight, used for all pools that do not have individually specified weights. The value range is 0-100.
    PoolWeights Dictionary<string, string>
    Weight configuration for each backend server pool, where the key is the pool ID and the value is the weight coefficient. The weight coefficient represents the proportion of relative traffic distribution.
    DefaultWeight int
    The default round-robin weight, used for all pools that do not have individually specified weights. The value range is 0-100.
    PoolWeights map[string]string
    Weight configuration for each backend server pool, where the key is the pool ID and the value is the weight coefficient. The weight coefficient represents the proportion of relative traffic distribution.
    defaultWeight Integer
    The default round-robin weight, used for all pools that do not have individually specified weights. The value range is 0-100.
    poolWeights Map<String,String>
    Weight configuration for each backend server pool, where the key is the pool ID and the value is the weight coefficient. The weight coefficient represents the proportion of relative traffic distribution.
    defaultWeight number
    The default round-robin weight, used for all pools that do not have individually specified weights. The value range is 0-100.
    poolWeights {[key: string]: string}
    Weight configuration for each backend server pool, where the key is the pool ID and the value is the weight coefficient. The weight coefficient represents the proportion of relative traffic distribution.
    default_weight int
    The default round-robin weight, used for all pools that do not have individually specified weights. The value range is 0-100.
    pool_weights Mapping[str, str]
    Weight configuration for each backend server pool, where the key is the pool ID and the value is the weight coefficient. The weight coefficient represents the proportion of relative traffic distribution.
    defaultWeight Number
    The default round-robin weight, used for all pools that do not have individually specified weights. The value range is 0-100.
    poolWeights Map<String>
    Weight configuration for each backend server pool, where the key is the pool ID and the value is the weight coefficient. The weight coefficient represents the proportion of relative traffic distribution.

    LoadBalancerRule, LoadBalancerRuleArgs

    FixedResponse Pulumi.AliCloud.Esa.Inputs.LoadBalancerRuleFixedResponse
    Executes a specified response after matching the rule. See fixed_response below.
    Overrides string
    Modifies the load balancer configuration for the corresponding request after matching the rule. The fields in this configuration will override the corresponding fields in the load balancer configuration.
    Rule string
    Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

    • Match all incoming requests: value set to true
    • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
    RuleEnable string
    Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

    • on: open.
    • off: close.
    RuleName string
    Rule name. When adding global configuration, this parameter does not need to be set.
    Sequence int
    Order of rule execution. The smaller the value, the higher the priority for execution.
    Terminates bool
    Whether to terminate the execution of subsequent rules.
    FixedResponse LoadBalancerRuleFixedResponse
    Executes a specified response after matching the rule. See fixed_response below.
    Overrides string
    Modifies the load balancer configuration for the corresponding request after matching the rule. The fields in this configuration will override the corresponding fields in the load balancer configuration.
    Rule string
    Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

    • Match all incoming requests: value set to true
    • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
    RuleEnable string
    Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

    • on: open.
    • off: close.
    RuleName string
    Rule name. When adding global configuration, this parameter does not need to be set.
    Sequence int
    Order of rule execution. The smaller the value, the higher the priority for execution.
    Terminates bool
    Whether to terminate the execution of subsequent rules.
    fixedResponse LoadBalancerRuleFixedResponse
    Executes a specified response after matching the rule. See fixed_response below.
    overrides String
    Modifies the load balancer configuration for the corresponding request after matching the rule. The fields in this configuration will override the corresponding fields in the load balancer configuration.
    rule String
    Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

    • Match all incoming requests: value set to true
    • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
    ruleEnable String
    Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

    • on: open.
    • off: close.
    ruleName String
    Rule name. When adding global configuration, this parameter does not need to be set.
    sequence Integer
    Order of rule execution. The smaller the value, the higher the priority for execution.
    terminates Boolean
    Whether to terminate the execution of subsequent rules.
    fixedResponse LoadBalancerRuleFixedResponse
    Executes a specified response after matching the rule. See fixed_response below.
    overrides string
    Modifies the load balancer configuration for the corresponding request after matching the rule. The fields in this configuration will override the corresponding fields in the load balancer configuration.
    rule string
    Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

    • Match all incoming requests: value set to true
    • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
    ruleEnable string
    Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

    • on: open.
    • off: close.
    ruleName string
    Rule name. When adding global configuration, this parameter does not need to be set.
    sequence number
    Order of rule execution. The smaller the value, the higher the priority for execution.
    terminates boolean
    Whether to terminate the execution of subsequent rules.
    fixed_response LoadBalancerRuleFixedResponse
    Executes a specified response after matching the rule. See fixed_response below.
    overrides str
    Modifies the load balancer configuration for the corresponding request after matching the rule. The fields in this configuration will override the corresponding fields in the load balancer configuration.
    rule str
    Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

    • Match all incoming requests: value set to true
    • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
    rule_enable str
    Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

    • on: open.
    • off: close.
    rule_name str
    Rule name. When adding global configuration, this parameter does not need to be set.
    sequence int
    Order of rule execution. The smaller the value, the higher the priority for execution.
    terminates bool
    Whether to terminate the execution of subsequent rules.
    fixedResponse Property Map
    Executes a specified response after matching the rule. See fixed_response below.
    overrides String
    Modifies the load balancer configuration for the corresponding request after matching the rule. The fields in this configuration will override the corresponding fields in the load balancer configuration.
    rule String
    Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

    • Match all incoming requests: value set to true
    • Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com")
    ruleEnable String
    Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

    • on: open.
    • off: close.
    ruleName String
    Rule name. When adding global configuration, this parameter does not need to be set.
    sequence Number
    Order of rule execution. The smaller the value, the higher the priority for execution.
    terminates Boolean
    Whether to terminate the execution of subsequent rules.

    LoadBalancerRuleFixedResponse, LoadBalancerRuleFixedResponseArgs

    ContentType string
    The Content-Type field in the HTTP Header.
    Location string
    The location field in the http return.
    MessageBody string
    The body value of the response.
    StatusCode int
    Status Code.
    ContentType string
    The Content-Type field in the HTTP Header.
    Location string
    The location field in the http return.
    MessageBody string
    The body value of the response.
    StatusCode int
    Status Code.
    contentType String
    The Content-Type field in the HTTP Header.
    location String
    The location field in the http return.
    messageBody String
    The body value of the response.
    statusCode Integer
    Status Code.
    contentType string
    The Content-Type field in the HTTP Header.
    location string
    The location field in the http return.
    messageBody string
    The body value of the response.
    statusCode number
    Status Code.
    content_type str
    The Content-Type field in the HTTP Header.
    location str
    The location field in the http return.
    message_body str
    The body value of the response.
    status_code int
    Status Code.
    contentType String
    The Content-Type field in the HTTP Header.
    location String
    The location field in the http return.
    messageBody String
    The body value of the response.
    statusCode Number
    Status Code.

    Import

    ESA Load Balancer can be imported using the id, e.g.

    $ pulumi import alicloud:esa/loadBalancer:LoadBalancer example <site_id>:<load_balancer_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.88.0 published on Saturday, Nov 1, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate