1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. nlb
  5. LoadBalancer
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.nlb.LoadBalancer

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a NLB Load Balancer resource.

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

    NOTE: Available since v1.191.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const default = alicloud.resourcemanager.getResourceGroups({});
    const defaultGetZones = alicloud.nlb.getZones({});
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
    });
    const default1 = new alicloud.vpc.Switch("default1", {
        vswitchName: name,
        cidrBlock: "10.4.1.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[1]?.id),
    });
    const defaultLoadBalancer = new alicloud.nlb.LoadBalancer("default", {
        loadBalancerName: name,
        resourceGroupId: _default.then(_default => _default.ids?.[0]),
        loadBalancerType: "Network",
        addressType: "Internet",
        addressIpVersion: "Ipv4",
        vpcId: defaultNetwork.id,
        tags: {
            Created: "TF",
            For: "example",
        },
        zoneMappings: [
            {
                vswitchId: defaultSwitch.id,
                zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
            },
            {
                vswitchId: default1.id,
                zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[1]?.id),
            },
        ],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.resourcemanager.get_resource_groups()
    default_get_zones = alicloud.nlb.get_zones()
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default_get_zones.zones[0].id)
    default1 = alicloud.vpc.Switch("default1",
        vswitch_name=name,
        cidr_block="10.4.1.0/24",
        vpc_id=default_network.id,
        zone_id=default_get_zones.zones[1].id)
    default_load_balancer = alicloud.nlb.LoadBalancer("default",
        load_balancer_name=name,
        resource_group_id=default.ids[0],
        load_balancer_type="Network",
        address_type="Internet",
        address_ip_version="Ipv4",
        vpc_id=default_network.id,
        tags={
            "Created": "TF",
            "For": "example",
        },
        zone_mappings=[
            {
                "vswitch_id": default_switch.id,
                "zone_id": default_get_zones.zones[0].id,
            },
            {
                "vswitch_id": default1.id,
                "zone_id": default_get_zones.zones[1].id,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nlb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"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, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetZones, err := nlb.GetZones(ctx, &nlb.GetZonesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultGetZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		default1, err := vpc.NewSwitch(ctx, "default1", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.1.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultGetZones.Zones[1].Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nlb.NewLoadBalancer(ctx, "default", &nlb.LoadBalancerArgs{
    			LoadBalancerName: pulumi.String(name),
    			ResourceGroupId:  pulumi.String(_default.Ids[0]),
    			LoadBalancerType: pulumi.String("Network"),
    			AddressType:      pulumi.String("Internet"),
    			AddressIpVersion: pulumi.String("Ipv4"),
    			VpcId:            defaultNetwork.ID(),
    			Tags: pulumi.StringMap{
    				"Created": pulumi.String("TF"),
    				"For":     pulumi.String("example"),
    			},
    			ZoneMappings: nlb.LoadBalancerZoneMappingArray{
    				&nlb.LoadBalancerZoneMappingArgs{
    					VswitchId: defaultSwitch.ID(),
    					ZoneId:    pulumi.String(defaultGetZones.Zones[0].Id),
    				},
    				&nlb.LoadBalancerZoneMappingArgs{
    					VswitchId: default1.ID(),
    					ZoneId:    pulumi.String(defaultGetZones.Zones[1].Id),
    				},
    			},
    		})
    		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 name = config.Get("name") ?? "tf-example";
        var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    
        var defaultGetZones = AliCloud.Nlb.GetZones.Invoke();
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var default1 = new AliCloud.Vpc.Switch("default1", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.1.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[1]?.Id),
        });
    
        var defaultLoadBalancer = new AliCloud.Nlb.LoadBalancer("default", new()
        {
            LoadBalancerName = name,
            ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
            LoadBalancerType = "Network",
            AddressType = "Internet",
            AddressIpVersion = "Ipv4",
            VpcId = defaultNetwork.Id,
            Tags = 
            {
                { "Created", "TF" },
                { "For", "example" },
            },
            ZoneMappings = new[]
            {
                new AliCloud.Nlb.Inputs.LoadBalancerZoneMappingArgs
                {
                    VswitchId = defaultSwitch.Id,
                    ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
                },
                new AliCloud.Nlb.Inputs.LoadBalancerZoneMappingArgs
                {
                    VswitchId = default1.Id,
                    ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[1]?.Id),
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
    import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
    import com.pulumi.alicloud.nlb.NlbFunctions;
    import com.pulumi.alicloud.nlb.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.nlb.LoadBalancer;
    import com.pulumi.alicloud.nlb.LoadBalancerArgs;
    import com.pulumi.alicloud.nlb.inputs.LoadBalancerZoneMappingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var default = ResourcemanagerFunctions.getResourceGroups();
    
            final var defaultGetZones = NlbFunctions.getZones();
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var default1 = new Switch("default1", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.1.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[1].id()))
                .build());
    
            var defaultLoadBalancer = new LoadBalancer("defaultLoadBalancer", LoadBalancerArgs.builder()
                .loadBalancerName(name)
                .resourceGroupId(default_.ids()[0])
                .loadBalancerType("Network")
                .addressType("Internet")
                .addressIpVersion("Ipv4")
                .vpcId(defaultNetwork.id())
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "example")
                ))
                .zoneMappings(            
                    LoadBalancerZoneMappingArgs.builder()
                        .vswitchId(defaultSwitch.id())
                        .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                        .build(),
                    LoadBalancerZoneMappingArgs.builder()
                        .vswitchId(default1.id())
                        .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[1].id()))
                        .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultGetZones.zones[0].id}
      default1:
        type: alicloud:vpc:Switch
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.1.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultGetZones.zones[1].id}
      defaultLoadBalancer:
        type: alicloud:nlb:LoadBalancer
        name: default
        properties:
          loadBalancerName: ${name}
          resourceGroupId: ${default.ids[0]}
          loadBalancerType: Network
          addressType: Internet
          addressIpVersion: Ipv4
          vpcId: ${defaultNetwork.id}
          tags:
            Created: TF
            For: example
          zoneMappings:
            - vswitchId: ${defaultSwitch.id}
              zoneId: ${defaultGetZones.zones[0].id}
            - vswitchId: ${default1.id}
              zoneId: ${defaultGetZones.zones[1].id}
    variables:
      default:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments: {}
      defaultGetZones:
        fn::invoke:
          Function: alicloud:nlb:getZones
          Arguments: {}
    

    DualStack Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const zone = config.getObject("zone") || [
        "cn-beijing-i",
        "cn-beijing-k",
        "cn-beijing-l",
    ];
    const vpc = new alicloud.vpc.Network("vpc", {
        vpcName: name,
        cidrBlock: "10.2.0.0/16",
        enableIpv6: true,
    });
    const vsw: alicloud.vpc.Switch[] = [];
    for (const range = {value: 0}; range.value < 2; range.value++) {
        vsw.push(new alicloud.vpc.Switch(`vsw-${range.value}`, {
            enableIpv6: true,
            ipv6CidrBlockMask: `1${range.value}`,
            vswitchName: `vsw-${range.value}-for-nlb`,
            vpcId: vpc.id,
            cidrBlock: `10.2.1${range.value}.0/24`,
            zoneId: zone[range.value],
        }));
    }
    const _default = new alicloud.vpc.Ipv6Gateway("default", {
        ipv6GatewayName: name,
        vpcId: vpc.id,
    });
    const nlb = new alicloud.nlb.LoadBalancer("nlb", {
        loadBalancerName: name,
        loadBalancerType: "Network",
        addressType: "Intranet",
        addressIpVersion: "DualStack",
        ipv6AddressType: "Internet",
        vpcId: vpc.id,
        crossZoneEnabled: false,
        tags: {
            Created: "TF",
            For: "example",
        },
        zoneMappings: [
            {
                vswitchId: vsw[0].id,
                zoneId: zone[0],
            },
            {
                vswitchId: vsw[1].id,
                zoneId: zone[1],
            },
        ],
    }, {
        dependsOn: [_default],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    zone = config.get_object("zone")
    if zone is None:
        zone = [
            "cn-beijing-i",
            "cn-beijing-k",
            "cn-beijing-l",
        ]
    vpc = alicloud.vpc.Network("vpc",
        vpc_name=name,
        cidr_block="10.2.0.0/16",
        enable_ipv6=True)
    vsw = []
    for range in [{"value": i} for i in range(0, 2)]:
        vsw.append(alicloud.vpc.Switch(f"vsw-{range['value']}",
            enable_ipv6=True,
            ipv6_cidr_block_mask=f"1{range['value']}",
            vswitch_name=f"vsw-{range['value']}-for-nlb",
            vpc_id=vpc.id,
            cidr_block=f"10.2.1{range['value']}.0/24",
            zone_id=zone[range["value"]]))
    default = alicloud.vpc.Ipv6Gateway("default",
        ipv6_gateway_name=name,
        vpc_id=vpc.id)
    nlb = alicloud.nlb.LoadBalancer("nlb",
        load_balancer_name=name,
        load_balancer_type="Network",
        address_type="Intranet",
        address_ip_version="DualStack",
        ipv6_address_type="Internet",
        vpc_id=vpc.id,
        cross_zone_enabled=False,
        tags={
            "Created": "TF",
            "For": "example",
        },
        zone_mappings=[
            {
                "vswitch_id": vsw[0].id,
                "zone_id": zone[0],
            },
            {
                "vswitch_id": vsw[1].id,
                "zone_id": zone[1],
            },
        ],
        opts = pulumi.ResourceOptions(depends_on=[default]))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nlb"
    	"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, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		zone := []string{
    			"cn-beijing-i",
    			"cn-beijing-k",
    			"cn-beijing-l",
    		}
    		if param := cfg.GetObject("zone"); param != nil {
    			zone = param
    		}
    		vpc, err := vpc.NewNetwork(ctx, "vpc", &vpc.NetworkArgs{
    			VpcName:    pulumi.String(name),
    			CidrBlock:  pulumi.String("10.2.0.0/16"),
    			EnableIpv6: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		var vsw []*vpc.Switch
    		for index := 0; index < 2; index++ {
    			key0 := index
    			val0 := index
    			__res, err := vpc.NewSwitch(ctx, fmt.Sprintf("vsw-%v", key0), &vpc.SwitchArgs{
    				EnableIpv6:        pulumi.Bool(true),
    				Ipv6CidrBlockMask: pulumi.Int(fmt.Sprintf("1%v", val0)),
    				VswitchName:       pulumi.Sprintf("vsw-%v-for-nlb", val0),
    				VpcId:             vpc.ID(),
    				CidrBlock:         pulumi.Sprintf("10.2.1%v.0/24", val0),
    				ZoneId:            zone[val0],
    			})
    			if err != nil {
    				return err
    			}
    			vsw = append(vsw, __res)
    		}
    		_, err = vpc.NewIpv6Gateway(ctx, "default", &vpc.Ipv6GatewayArgs{
    			Ipv6GatewayName: pulumi.String(name),
    			VpcId:           vpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nlb.NewLoadBalancer(ctx, "nlb", &nlb.LoadBalancerArgs{
    			LoadBalancerName: pulumi.String(name),
    			LoadBalancerType: pulumi.String("Network"),
    			AddressType:      pulumi.String("Intranet"),
    			AddressIpVersion: pulumi.String("DualStack"),
    			Ipv6AddressType:  pulumi.String("Internet"),
    			VpcId:            vpc.ID(),
    			CrossZoneEnabled: pulumi.Bool(false),
    			Tags: pulumi.StringMap{
    				"Created": pulumi.String("TF"),
    				"For":     pulumi.String("example"),
    			},
    			ZoneMappings: nlb.LoadBalancerZoneMappingArray{
    				&nlb.LoadBalancerZoneMappingArgs{
    					VswitchId: vsw[0].ID(),
    					ZoneId:    pulumi.Any(zone[0]),
    				},
    				&nlb.LoadBalancerZoneMappingArgs{
    					VswitchId: vsw[1].ID(),
    					ZoneId:    pulumi.Any(zone[1]),
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			_default,
    		}))
    		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 name = config.Get("name") ?? "tf-example";
        var zone = config.GetObject<dynamic>("zone") ?? new[]
        {
            "cn-beijing-i",
            "cn-beijing-k",
            "cn-beijing-l",
        };
        var vpc = new AliCloud.Vpc.Network("vpc", new()
        {
            VpcName = name,
            CidrBlock = "10.2.0.0/16",
            EnableIpv6 = true,
        });
    
        var vsw = new List<AliCloud.Vpc.Switch>();
        for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            vsw.Add(new AliCloud.Vpc.Switch($"vsw-{range.Value}", new()
            {
                EnableIpv6 = true,
                Ipv6CidrBlockMask = $"1{range.Value}",
                VswitchName = $"vsw-{range.Value}-for-nlb",
                VpcId = vpc.Id,
                CidrBlock = $"10.2.1{range.Value}.0/24",
                ZoneId = zone[range.Value],
            }));
        }
        var @default = new AliCloud.Vpc.Ipv6Gateway("default", new()
        {
            Ipv6GatewayName = name,
            VpcId = vpc.Id,
        });
    
        var nlb = new AliCloud.Nlb.LoadBalancer("nlb", new()
        {
            LoadBalancerName = name,
            LoadBalancerType = "Network",
            AddressType = "Intranet",
            AddressIpVersion = "DualStack",
            Ipv6AddressType = "Internet",
            VpcId = vpc.Id,
            CrossZoneEnabled = false,
            Tags = 
            {
                { "Created", "TF" },
                { "For", "example" },
            },
            ZoneMappings = new[]
            {
                new AliCloud.Nlb.Inputs.LoadBalancerZoneMappingArgs
                {
                    VswitchId = vsw[0].Id,
                    ZoneId = zone[0],
                },
                new AliCloud.Nlb.Inputs.LoadBalancerZoneMappingArgs
                {
                    VswitchId = vsw[1].Id,
                    ZoneId = zone[1],
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                @default,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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.vpc.Ipv6Gateway;
    import com.pulumi.alicloud.vpc.Ipv6GatewayArgs;
    import com.pulumi.alicloud.nlb.LoadBalancer;
    import com.pulumi.alicloud.nlb.LoadBalancerArgs;
    import com.pulumi.alicloud.nlb.inputs.LoadBalancerZoneMappingArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var zone = config.get("zone").orElse(        
                "cn-beijing-i",
                "cn-beijing-k",
                "cn-beijing-l");
            var vpc = new Network("vpc", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.2.0.0/16")
                .enableIpv6(true)
                .build());
    
            for (var i = 0; i < 2; i++) {
                new Switch("vsw-" + i, SwitchArgs.builder()
                    .enableIpv6(true)
                    .ipv6CidrBlockMask(String.format("1%s", range.value()))
                    .vswitchName(String.format("vsw-%s-for-nlb", range.value()))
                    .vpcId(vpc.id())
                    .cidrBlock(String.format("10.2.1%s.0/24", range.value()))
                    .zoneId(zone[range.value()])
                    .build());
    
            
    }
            var default_ = new Ipv6Gateway("default", Ipv6GatewayArgs.builder()
                .ipv6GatewayName(name)
                .vpcId(vpc.id())
                .build());
    
            var nlb = new LoadBalancer("nlb", LoadBalancerArgs.builder()
                .loadBalancerName(name)
                .loadBalancerType("Network")
                .addressType("Intranet")
                .addressIpVersion("DualStack")
                .ipv6AddressType("Internet")
                .vpcId(vpc.id())
                .crossZoneEnabled(false)
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "example")
                ))
                .zoneMappings(            
                    LoadBalancerZoneMappingArgs.builder()
                        .vswitchId(vsw[0].id())
                        .zoneId(zone[0])
                        .build(),
                    LoadBalancerZoneMappingArgs.builder()
                        .vswitchId(vsw[1].id())
                        .zoneId(zone[1])
                        .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(default_)
                    .build());
    
        }
    }
    
    Coming soon!
    

    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,
                     vpc_id: Optional[str] = None,
                     address_type: Optional[str] = None,
                     zone_mappings: Optional[Sequence[LoadBalancerZoneMappingArgs]] = None,
                     load_balancer_name: Optional[str] = None,
                     modification_protection_config: Optional[LoadBalancerModificationProtectionConfigArgs] = None,
                     deletion_protection_enabled: Optional[bool] = None,
                     deletion_protection_reason: Optional[str] = None,
                     ipv6_address_type: Optional[str] = None,
                     address_ip_version: Optional[str] = None,
                     load_balancer_type: Optional[str] = None,
                     deletion_protection_config: Optional[LoadBalancerDeletionProtectionConfigArgs] = None,
                     modification_protection_reason: Optional[str] = None,
                     modification_protection_status: Optional[str] = None,
                     resource_group_id: Optional[str] = None,
                     security_group_ids: Optional[Sequence[str]] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     cross_zone_enabled: Optional[bool] = None,
                     bandwidth_package_id: Optional[str] = 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:nlb: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 exampleloadBalancerResourceResourceFromNlbloadBalancer = new AliCloud.Nlb.LoadBalancer("exampleloadBalancerResourceResourceFromNlbloadBalancer", new()
    {
        VpcId = "string",
        AddressType = "string",
        ZoneMappings = new[]
        {
            new AliCloud.Nlb.Inputs.LoadBalancerZoneMappingArgs
            {
                VswitchId = "string",
                ZoneId = "string",
                AllocationId = "string",
                EniId = "string",
                Ipv6Address = "string",
                PrivateIpv4Address = "string",
                PublicIpv4Address = "string",
                Status = "string",
            },
        },
        LoadBalancerName = "string",
        ModificationProtectionConfig = new AliCloud.Nlb.Inputs.LoadBalancerModificationProtectionConfigArgs
        {
            EnabledTime = "string",
            Reason = "string",
            Status = "string",
        },
        DeletionProtectionEnabled = false,
        DeletionProtectionReason = "string",
        Ipv6AddressType = "string",
        AddressIpVersion = "string",
        LoadBalancerType = "string",
        DeletionProtectionConfig = new AliCloud.Nlb.Inputs.LoadBalancerDeletionProtectionConfigArgs
        {
            Enabled = false,
            EnabledTime = "string",
            Reason = "string",
        },
        ModificationProtectionReason = "string",
        ModificationProtectionStatus = "string",
        ResourceGroupId = "string",
        SecurityGroupIds = new[]
        {
            "string",
        },
        Tags = 
        {
            { "string", "string" },
        },
        CrossZoneEnabled = false,
        BandwidthPackageId = "string",
    });
    
    example, err := nlb.NewLoadBalancer(ctx, "exampleloadBalancerResourceResourceFromNlbloadBalancer", &nlb.LoadBalancerArgs{
    	VpcId:       pulumi.String("string"),
    	AddressType: pulumi.String("string"),
    	ZoneMappings: nlb.LoadBalancerZoneMappingArray{
    		&nlb.LoadBalancerZoneMappingArgs{
    			VswitchId:          pulumi.String("string"),
    			ZoneId:             pulumi.String("string"),
    			AllocationId:       pulumi.String("string"),
    			EniId:              pulumi.String("string"),
    			Ipv6Address:        pulumi.String("string"),
    			PrivateIpv4Address: pulumi.String("string"),
    			PublicIpv4Address:  pulumi.String("string"),
    			Status:             pulumi.String("string"),
    		},
    	},
    	LoadBalancerName: pulumi.String("string"),
    	ModificationProtectionConfig: &nlb.LoadBalancerModificationProtectionConfigArgs{
    		EnabledTime: pulumi.String("string"),
    		Reason:      pulumi.String("string"),
    		Status:      pulumi.String("string"),
    	},
    	DeletionProtectionEnabled: pulumi.Bool(false),
    	DeletionProtectionReason:  pulumi.String("string"),
    	Ipv6AddressType:           pulumi.String("string"),
    	AddressIpVersion:          pulumi.String("string"),
    	LoadBalancerType:          pulumi.String("string"),
    	DeletionProtectionConfig: &nlb.LoadBalancerDeletionProtectionConfigArgs{
    		Enabled:     pulumi.Bool(false),
    		EnabledTime: pulumi.String("string"),
    		Reason:      pulumi.String("string"),
    	},
    	ModificationProtectionReason: pulumi.String("string"),
    	ModificationProtectionStatus: pulumi.String("string"),
    	ResourceGroupId:              pulumi.String("string"),
    	SecurityGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	CrossZoneEnabled:   pulumi.Bool(false),
    	BandwidthPackageId: pulumi.String("string"),
    })
    
    var exampleloadBalancerResourceResourceFromNlbloadBalancer = new LoadBalancer("exampleloadBalancerResourceResourceFromNlbloadBalancer", LoadBalancerArgs.builder()
        .vpcId("string")
        .addressType("string")
        .zoneMappings(LoadBalancerZoneMappingArgs.builder()
            .vswitchId("string")
            .zoneId("string")
            .allocationId("string")
            .eniId("string")
            .ipv6Address("string")
            .privateIpv4Address("string")
            .publicIpv4Address("string")
            .status("string")
            .build())
        .loadBalancerName("string")
        .modificationProtectionConfig(LoadBalancerModificationProtectionConfigArgs.builder()
            .enabledTime("string")
            .reason("string")
            .status("string")
            .build())
        .deletionProtectionEnabled(false)
        .deletionProtectionReason("string")
        .ipv6AddressType("string")
        .addressIpVersion("string")
        .loadBalancerType("string")
        .deletionProtectionConfig(LoadBalancerDeletionProtectionConfigArgs.builder()
            .enabled(false)
            .enabledTime("string")
            .reason("string")
            .build())
        .modificationProtectionReason("string")
        .modificationProtectionStatus("string")
        .resourceGroupId("string")
        .securityGroupIds("string")
        .tags(Map.of("string", "string"))
        .crossZoneEnabled(false)
        .bandwidthPackageId("string")
        .build());
    
    exampleload_balancer_resource_resource_from_nlbload_balancer = alicloud.nlb.LoadBalancer("exampleloadBalancerResourceResourceFromNlbloadBalancer",
        vpc_id="string",
        address_type="string",
        zone_mappings=[{
            "vswitch_id": "string",
            "zone_id": "string",
            "allocation_id": "string",
            "eni_id": "string",
            "ipv6_address": "string",
            "private_ipv4_address": "string",
            "public_ipv4_address": "string",
            "status": "string",
        }],
        load_balancer_name="string",
        modification_protection_config={
            "enabled_time": "string",
            "reason": "string",
            "status": "string",
        },
        deletion_protection_enabled=False,
        deletion_protection_reason="string",
        ipv6_address_type="string",
        address_ip_version="string",
        load_balancer_type="string",
        deletion_protection_config={
            "enabled": False,
            "enabled_time": "string",
            "reason": "string",
        },
        modification_protection_reason="string",
        modification_protection_status="string",
        resource_group_id="string",
        security_group_ids=["string"],
        tags={
            "string": "string",
        },
        cross_zone_enabled=False,
        bandwidth_package_id="string")
    
    const exampleloadBalancerResourceResourceFromNlbloadBalancer = new alicloud.nlb.LoadBalancer("exampleloadBalancerResourceResourceFromNlbloadBalancer", {
        vpcId: "string",
        addressType: "string",
        zoneMappings: [{
            vswitchId: "string",
            zoneId: "string",
            allocationId: "string",
            eniId: "string",
            ipv6Address: "string",
            privateIpv4Address: "string",
            publicIpv4Address: "string",
            status: "string",
        }],
        loadBalancerName: "string",
        modificationProtectionConfig: {
            enabledTime: "string",
            reason: "string",
            status: "string",
        },
        deletionProtectionEnabled: false,
        deletionProtectionReason: "string",
        ipv6AddressType: "string",
        addressIpVersion: "string",
        loadBalancerType: "string",
        deletionProtectionConfig: {
            enabled: false,
            enabledTime: "string",
            reason: "string",
        },
        modificationProtectionReason: "string",
        modificationProtectionStatus: "string",
        resourceGroupId: "string",
        securityGroupIds: ["string"],
        tags: {
            string: "string",
        },
        crossZoneEnabled: false,
        bandwidthPackageId: "string",
    });
    
    type: alicloud:nlb:LoadBalancer
    properties:
        addressIpVersion: string
        addressType: string
        bandwidthPackageId: string
        crossZoneEnabled: false
        deletionProtectionConfig:
            enabled: false
            enabledTime: string
            reason: string
        deletionProtectionEnabled: false
        deletionProtectionReason: string
        ipv6AddressType: string
        loadBalancerName: string
        loadBalancerType: string
        modificationProtectionConfig:
            enabledTime: string
            reason: string
            status: string
        modificationProtectionReason: string
        modificationProtectionStatus: string
        resourceGroupId: string
        securityGroupIds:
            - string
        tags:
            string: string
        vpcId: string
        zoneMappings:
            - allocationId: string
              eniId: string
              ipv6Address: string
              privateIpv4Address: string
              publicIpv4Address: string
              status: string
              vswitchId: string
              zoneId: string
    

    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:

    AddressType string

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    VpcId string
    The ID of the VPC where the NLB instance is deployed.
    ZoneMappings List<Pulumi.AliCloud.Nlb.Inputs.LoadBalancerZoneMapping>
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    AddressIpVersion string
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    BandwidthPackageId string
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    CrossZoneEnabled bool
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    DeletionProtectionConfig Pulumi.AliCloud.Nlb.Inputs.LoadBalancerDeletionProtectionConfig
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    DeletionProtectionEnabled bool
    DeletionProtectionReason string
    Ipv6AddressType string
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    LoadBalancerName string

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    LoadBalancerType string
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    ModificationProtectionConfig Pulumi.AliCloud.Nlb.Inputs.LoadBalancerModificationProtectionConfig
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    ModificationProtectionReason string
    ModificationProtectionStatus string
    ResourceGroupId string

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    SecurityGroupIds List<string>
    The security group to which the network-based SLB instance belongs.
    Tags Dictionary<string, string>
    List of labels.
    AddressType string

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    VpcId string
    The ID of the VPC where the NLB instance is deployed.
    ZoneMappings []LoadBalancerZoneMappingArgs
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    AddressIpVersion string
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    BandwidthPackageId string
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    CrossZoneEnabled bool
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    DeletionProtectionConfig LoadBalancerDeletionProtectionConfigArgs
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    DeletionProtectionEnabled bool
    DeletionProtectionReason string
    Ipv6AddressType string
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    LoadBalancerName string

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    LoadBalancerType string
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    ModificationProtectionConfig LoadBalancerModificationProtectionConfigArgs
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    ModificationProtectionReason string
    ModificationProtectionStatus string
    ResourceGroupId string

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    SecurityGroupIds []string
    The security group to which the network-based SLB instance belongs.
    Tags map[string]string
    List of labels.
    addressType String

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    vpcId String
    The ID of the VPC where the NLB instance is deployed.
    zoneMappings List<LoadBalancerZoneMapping>
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    addressIpVersion String
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    bandwidthPackageId String
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    crossZoneEnabled Boolean
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    deletionProtectionConfig LoadBalancerDeletionProtectionConfig
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    deletionProtectionEnabled Boolean
    deletionProtectionReason String
    ipv6AddressType String
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    loadBalancerName String

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    loadBalancerType String
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    modificationProtectionConfig LoadBalancerModificationProtectionConfig
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    modificationProtectionReason String
    modificationProtectionStatus String
    resourceGroupId String

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    securityGroupIds List<String>
    The security group to which the network-based SLB instance belongs.
    tags Map<String,String>
    List of labels.
    addressType string

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    vpcId string
    The ID of the VPC where the NLB instance is deployed.
    zoneMappings LoadBalancerZoneMapping[]
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    addressIpVersion string
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    bandwidthPackageId string
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    crossZoneEnabled boolean
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    deletionProtectionConfig LoadBalancerDeletionProtectionConfig
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    deletionProtectionEnabled boolean
    deletionProtectionReason string
    ipv6AddressType string
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    loadBalancerName string

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    loadBalancerType string
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    modificationProtectionConfig LoadBalancerModificationProtectionConfig
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    modificationProtectionReason string
    modificationProtectionStatus string
    resourceGroupId string

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    securityGroupIds string[]
    The security group to which the network-based SLB instance belongs.
    tags {[key: string]: string}
    List of labels.
    address_type str

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    vpc_id str
    The ID of the VPC where the NLB instance is deployed.
    zone_mappings Sequence[LoadBalancerZoneMappingArgs]
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    address_ip_version str
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    bandwidth_package_id str
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    cross_zone_enabled bool
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    deletion_protection_config LoadBalancerDeletionProtectionConfigArgs
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    deletion_protection_enabled bool
    deletion_protection_reason str
    ipv6_address_type str
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    load_balancer_name str

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    load_balancer_type str
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    modification_protection_config LoadBalancerModificationProtectionConfigArgs
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    modification_protection_reason str
    modification_protection_status str
    resource_group_id str

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    security_group_ids Sequence[str]
    The security group to which the network-based SLB instance belongs.
    tags Mapping[str, str]
    List of labels.
    addressType String

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    vpcId String
    The ID of the VPC where the NLB instance is deployed.
    zoneMappings List<Property Map>
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    addressIpVersion String
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    bandwidthPackageId String
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    crossZoneEnabled Boolean
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    deletionProtectionConfig Property Map
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    deletionProtectionEnabled Boolean
    deletionProtectionReason String
    ipv6AddressType String
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    loadBalancerName String

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    loadBalancerType String
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    modificationProtectionConfig Property Map
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    modificationProtectionReason String
    modificationProtectionStatus String
    resourceGroupId String

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    securityGroupIds List<String>
    The security group to which the network-based SLB instance belongs.
    tags Map<String>
    List of labels.

    Outputs

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

    CreateTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    DnsName string
    The domain name of the NLB instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    LoadBalancerBusinessStatus string
    The business status of the NLB instance.
    Status string
    The status of the NLB instance.
    CreateTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    DnsName string
    The domain name of the NLB instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    LoadBalancerBusinessStatus string
    The business status of the NLB instance.
    Status string
    The status of the NLB instance.
    createTime String
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    dnsName String
    The domain name of the NLB instance.
    id String
    The provider-assigned unique ID for this managed resource.
    loadBalancerBusinessStatus String
    The business status of the NLB instance.
    status String
    The status of the NLB instance.
    createTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    dnsName string
    The domain name of the NLB instance.
    id string
    The provider-assigned unique ID for this managed resource.
    loadBalancerBusinessStatus string
    The business status of the NLB instance.
    status string
    The status of the NLB instance.
    create_time str
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    dns_name str
    The domain name of the NLB instance.
    id str
    The provider-assigned unique ID for this managed resource.
    load_balancer_business_status str
    The business status of the NLB instance.
    status str
    The status of the NLB instance.
    createTime String
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    dnsName String
    The domain name of the NLB instance.
    id String
    The provider-assigned unique ID for this managed resource.
    loadBalancerBusinessStatus String
    The business status of the NLB instance.
    status String
    The status of the NLB instance.

    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,
            address_ip_version: Optional[str] = None,
            address_type: Optional[str] = None,
            bandwidth_package_id: Optional[str] = None,
            create_time: Optional[str] = None,
            cross_zone_enabled: Optional[bool] = None,
            deletion_protection_config: Optional[LoadBalancerDeletionProtectionConfigArgs] = None,
            deletion_protection_enabled: Optional[bool] = None,
            deletion_protection_reason: Optional[str] = None,
            dns_name: Optional[str] = None,
            ipv6_address_type: Optional[str] = None,
            load_balancer_business_status: Optional[str] = None,
            load_balancer_name: Optional[str] = None,
            load_balancer_type: Optional[str] = None,
            modification_protection_config: Optional[LoadBalancerModificationProtectionConfigArgs] = None,
            modification_protection_reason: Optional[str] = None,
            modification_protection_status: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vpc_id: Optional[str] = None,
            zone_mappings: Optional[Sequence[LoadBalancerZoneMappingArgs]] = 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)
    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:
    AddressIpVersion string
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    AddressType string

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    BandwidthPackageId string
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    CreateTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    CrossZoneEnabled bool
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    DeletionProtectionConfig Pulumi.AliCloud.Nlb.Inputs.LoadBalancerDeletionProtectionConfig
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    DeletionProtectionEnabled bool
    DeletionProtectionReason string
    DnsName string
    The domain name of the NLB instance.
    Ipv6AddressType string
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    LoadBalancerBusinessStatus string
    The business status of the NLB instance.
    LoadBalancerName string

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    LoadBalancerType string
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    ModificationProtectionConfig Pulumi.AliCloud.Nlb.Inputs.LoadBalancerModificationProtectionConfig
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    ModificationProtectionReason string
    ModificationProtectionStatus string
    ResourceGroupId string

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    SecurityGroupIds List<string>
    The security group to which the network-based SLB instance belongs.
    Status string
    The status of the NLB instance.
    Tags Dictionary<string, string>
    List of labels.
    VpcId string
    The ID of the VPC where the NLB instance is deployed.
    ZoneMappings List<Pulumi.AliCloud.Nlb.Inputs.LoadBalancerZoneMapping>
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    AddressIpVersion string
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    AddressType string

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    BandwidthPackageId string
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    CreateTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    CrossZoneEnabled bool
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    DeletionProtectionConfig LoadBalancerDeletionProtectionConfigArgs
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    DeletionProtectionEnabled bool
    DeletionProtectionReason string
    DnsName string
    The domain name of the NLB instance.
    Ipv6AddressType string
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    LoadBalancerBusinessStatus string
    The business status of the NLB instance.
    LoadBalancerName string

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    LoadBalancerType string
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    ModificationProtectionConfig LoadBalancerModificationProtectionConfigArgs
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    ModificationProtectionReason string
    ModificationProtectionStatus string
    ResourceGroupId string

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    SecurityGroupIds []string
    The security group to which the network-based SLB instance belongs.
    Status string
    The status of the NLB instance.
    Tags map[string]string
    List of labels.
    VpcId string
    The ID of the VPC where the NLB instance is deployed.
    ZoneMappings []LoadBalancerZoneMappingArgs
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    addressIpVersion String
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    addressType String

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    bandwidthPackageId String
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    createTime String
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    crossZoneEnabled Boolean
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    deletionProtectionConfig LoadBalancerDeletionProtectionConfig
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    deletionProtectionEnabled Boolean
    deletionProtectionReason String
    dnsName String
    The domain name of the NLB instance.
    ipv6AddressType String
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    loadBalancerBusinessStatus String
    The business status of the NLB instance.
    loadBalancerName String

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    loadBalancerType String
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    modificationProtectionConfig LoadBalancerModificationProtectionConfig
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    modificationProtectionReason String
    modificationProtectionStatus String
    resourceGroupId String

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    securityGroupIds List<String>
    The security group to which the network-based SLB instance belongs.
    status String
    The status of the NLB instance.
    tags Map<String,String>
    List of labels.
    vpcId String
    The ID of the VPC where the NLB instance is deployed.
    zoneMappings List<LoadBalancerZoneMapping>
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    addressIpVersion string
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    addressType string

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    bandwidthPackageId string
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    createTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    crossZoneEnabled boolean
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    deletionProtectionConfig LoadBalancerDeletionProtectionConfig
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    deletionProtectionEnabled boolean
    deletionProtectionReason string
    dnsName string
    The domain name of the NLB instance.
    ipv6AddressType string
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    loadBalancerBusinessStatus string
    The business status of the NLB instance.
    loadBalancerName string

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    loadBalancerType string
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    modificationProtectionConfig LoadBalancerModificationProtectionConfig
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    modificationProtectionReason string
    modificationProtectionStatus string
    resourceGroupId string

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    securityGroupIds string[]
    The security group to which the network-based SLB instance belongs.
    status string
    The status of the NLB instance.
    tags {[key: string]: string}
    List of labels.
    vpcId string
    The ID of the VPC where the NLB instance is deployed.
    zoneMappings LoadBalancerZoneMapping[]
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    address_ip_version str
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    address_type str

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    bandwidth_package_id str
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    create_time str
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    cross_zone_enabled bool
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    deletion_protection_config LoadBalancerDeletionProtectionConfigArgs
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    deletion_protection_enabled bool
    deletion_protection_reason str
    dns_name str
    The domain name of the NLB instance.
    ipv6_address_type str
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    load_balancer_business_status str
    The business status of the NLB instance.
    load_balancer_name str

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    load_balancer_type str
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    modification_protection_config LoadBalancerModificationProtectionConfigArgs
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    modification_protection_reason str
    modification_protection_status str
    resource_group_id str

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    security_group_ids Sequence[str]
    The security group to which the network-based SLB instance belongs.
    status str
    The status of the NLB instance.
    tags Mapping[str, str]
    List of labels.
    vpc_id str
    The ID of the VPC where the NLB instance is deployed.
    zone_mappings Sequence[LoadBalancerZoneMappingArgs]
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.
    addressIpVersion String
    The protocol version. Valid values:

    • ipv4: IPv4. This is the default value.
    • DualStack: dual stack.
    addressType String

    The type of IPv4 address used by the NLB instance. Valid values:

    • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.

    NOTE: To enable a public IPv6 address for an NLB instance, call the EnableLoadBalancerIpv6Internet operation.

    bandwidthPackageId String
    The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
    createTime String
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    crossZoneEnabled Boolean
    Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
    deletionProtectionConfig Property Map
    Specifies whether to enable deletion protection. Default value: false. See deletion_protection_config below.
    deletionProtectionEnabled Boolean
    deletionProtectionReason String
    dnsName String
    The domain name of the NLB instance.
    ipv6AddressType String
    The type of IPv6 address used by the NLB instance. Valid values:

    • Internet: a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
    • Intranet: a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
    loadBalancerBusinessStatus String
    The business status of the NLB instance.
    loadBalancerName String

    The name of the NLB instance.

    The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    loadBalancerType String
    The type of the Server Load Balancer (SLB) instance. Set the value to network, which specifies NLB.
    modificationProtectionConfig Property Map
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. See modification_protection_config below.
    modificationProtectionReason String
    modificationProtectionStatus String
    resourceGroupId String

    The ID of the new resource group.

    You can log on to the Resource Management console to view resource group IDs.

    securityGroupIds List<String>
    The security group to which the network-based SLB instance belongs.
    status String
    The status of the NLB instance.
    tags Map<String>
    List of labels.
    vpcId String
    The ID of the VPC where the NLB instance is deployed.
    zoneMappings List<Property Map>
    Available Area Configuration List. You must add at least two zones. You can add a maximum of 10 zones. See zone_mappings below.

    Supporting Types

    LoadBalancerDeletionProtectionConfig, LoadBalancerDeletionProtectionConfigArgs

    Enabled bool
    Specifies whether to enable deletion protection. Valid values:
    EnabledTime string
    Opening time of the configuration read-only mode.
    Reason string

    The reason why deletion protection is enabled. The reason must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The reason must start with a letter.

    NOTE: This parameter takes effect only when DeletionProtectionEnabled is set to true.

    Enabled bool
    Specifies whether to enable deletion protection. Valid values:
    EnabledTime string
    Opening time of the configuration read-only mode.
    Reason string

    The reason why deletion protection is enabled. The reason must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The reason must start with a letter.

    NOTE: This parameter takes effect only when DeletionProtectionEnabled is set to true.

    enabled Boolean
    Specifies whether to enable deletion protection. Valid values:
    enabledTime String
    Opening time of the configuration read-only mode.
    reason String

    The reason why deletion protection is enabled. The reason must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The reason must start with a letter.

    NOTE: This parameter takes effect only when DeletionProtectionEnabled is set to true.

    enabled boolean
    Specifies whether to enable deletion protection. Valid values:
    enabledTime string
    Opening time of the configuration read-only mode.
    reason string

    The reason why deletion protection is enabled. The reason must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The reason must start with a letter.

    NOTE: This parameter takes effect only when DeletionProtectionEnabled is set to true.

    enabled bool
    Specifies whether to enable deletion protection. Valid values:
    enabled_time str
    Opening time of the configuration read-only mode.
    reason str

    The reason why deletion protection is enabled. The reason must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The reason must start with a letter.

    NOTE: This parameter takes effect only when DeletionProtectionEnabled is set to true.

    enabled Boolean
    Specifies whether to enable deletion protection. Valid values:
    enabledTime String
    Opening time of the configuration read-only mode.
    reason String

    The reason why deletion protection is enabled. The reason must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The reason must start with a letter.

    NOTE: This parameter takes effect only when DeletionProtectionEnabled is set to true.

    LoadBalancerModificationProtectionConfig, LoadBalancerModificationProtectionConfigArgs

    EnabledTime string
    Opening time of the configuration read-only mode.
    Reason string

    The reason why the configuration read-only mode is enabled. The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    NOTE: This parameter takes effect only if the status parameter is set to ConsoleProtection.

    Status string

    Specifies whether to enable the configuration read-only mode. Valid values:

    • NonProtection: disables the configuration read-only mode. In this case, you cannot set the ModificationProtectionReason parameter. If you specify ModificationProtectionReason, the value is cleared.
    • ConsoleProtection: enables the configuration read-only mode. In this case, you can specify ModificationProtectionReason.

    NOTE: If you set this parameter to ConsoleProtection, you cannot use the NLB console to modify instance configurations. However, you can call API operations to modify instance configurations.

    EnabledTime string
    Opening time of the configuration read-only mode.
    Reason string

    The reason why the configuration read-only mode is enabled. The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    NOTE: This parameter takes effect only if the status parameter is set to ConsoleProtection.

    Status string

    Specifies whether to enable the configuration read-only mode. Valid values:

    • NonProtection: disables the configuration read-only mode. In this case, you cannot set the ModificationProtectionReason parameter. If you specify ModificationProtectionReason, the value is cleared.
    • ConsoleProtection: enables the configuration read-only mode. In this case, you can specify ModificationProtectionReason.

    NOTE: If you set this parameter to ConsoleProtection, you cannot use the NLB console to modify instance configurations. However, you can call API operations to modify instance configurations.

    enabledTime String
    Opening time of the configuration read-only mode.
    reason String

    The reason why the configuration read-only mode is enabled. The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    NOTE: This parameter takes effect only if the status parameter is set to ConsoleProtection.

    status String

    Specifies whether to enable the configuration read-only mode. Valid values:

    • NonProtection: disables the configuration read-only mode. In this case, you cannot set the ModificationProtectionReason parameter. If you specify ModificationProtectionReason, the value is cleared.
    • ConsoleProtection: enables the configuration read-only mode. In this case, you can specify ModificationProtectionReason.

    NOTE: If you set this parameter to ConsoleProtection, you cannot use the NLB console to modify instance configurations. However, you can call API operations to modify instance configurations.

    enabledTime string
    Opening time of the configuration read-only mode.
    reason string

    The reason why the configuration read-only mode is enabled. The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    NOTE: This parameter takes effect only if the status parameter is set to ConsoleProtection.

    status string

    Specifies whether to enable the configuration read-only mode. Valid values:

    • NonProtection: disables the configuration read-only mode. In this case, you cannot set the ModificationProtectionReason parameter. If you specify ModificationProtectionReason, the value is cleared.
    • ConsoleProtection: enables the configuration read-only mode. In this case, you can specify ModificationProtectionReason.

    NOTE: If you set this parameter to ConsoleProtection, you cannot use the NLB console to modify instance configurations. However, you can call API operations to modify instance configurations.

    enabled_time str
    Opening time of the configuration read-only mode.
    reason str

    The reason why the configuration read-only mode is enabled. The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    NOTE: This parameter takes effect only if the status parameter is set to ConsoleProtection.

    status str

    Specifies whether to enable the configuration read-only mode. Valid values:

    • NonProtection: disables the configuration read-only mode. In this case, you cannot set the ModificationProtectionReason parameter. If you specify ModificationProtectionReason, the value is cleared.
    • ConsoleProtection: enables the configuration read-only mode. In this case, you can specify ModificationProtectionReason.

    NOTE: If you set this parameter to ConsoleProtection, you cannot use the NLB console to modify instance configurations. However, you can call API operations to modify instance configurations.

    enabledTime String
    Opening time of the configuration read-only mode.
    reason String

    The reason why the configuration read-only mode is enabled. The value must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The value must start with a letter.

    NOTE: This parameter takes effect only if the status parameter is set to ConsoleProtection.

    status String

    Specifies whether to enable the configuration read-only mode. Valid values:

    • NonProtection: disables the configuration read-only mode. In this case, you cannot set the ModificationProtectionReason parameter. If you specify ModificationProtectionReason, the value is cleared.
    • ConsoleProtection: enables the configuration read-only mode. In this case, you can specify ModificationProtectionReason.

    NOTE: If you set this parameter to ConsoleProtection, you cannot use the NLB console to modify instance configurations. However, you can call API operations to modify instance configurations.

    LoadBalancerZoneMapping, LoadBalancerZoneMappingArgs

    VswitchId string
    The vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of an NLB instance. You must add at least two zones. You can add a maximum of 10 zones.
    ZoneId string

    The ID of the zone of the NLB instance. You must add at least two zones. You can add a maximum of 10 zones.

    You can call the DescribeZones operation to query the most recent zone list.

    AllocationId string
    The ID of the elastic IP address (EIP) that is associated with the Internet-facing NLB instance. You can specify one EIP for each zone. You must add at least two zones. You can add a maximum of 10 zones.
    EniId string
    The ID of the elastic network interface (ENI).
    Ipv6Address string
    The IPv6 address of the NLB instance.
    PrivateIpv4Address string
    The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
    PublicIpv4Address string
    Public IPv4 address of a network-based server load balancer instance.
    Status string
    Zone Status
    VswitchId string
    The vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of an NLB instance. You must add at least two zones. You can add a maximum of 10 zones.
    ZoneId string

    The ID of the zone of the NLB instance. You must add at least two zones. You can add a maximum of 10 zones.

    You can call the DescribeZones operation to query the most recent zone list.

    AllocationId string
    The ID of the elastic IP address (EIP) that is associated with the Internet-facing NLB instance. You can specify one EIP for each zone. You must add at least two zones. You can add a maximum of 10 zones.
    EniId string
    The ID of the elastic network interface (ENI).
    Ipv6Address string
    The IPv6 address of the NLB instance.
    PrivateIpv4Address string
    The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
    PublicIpv4Address string
    Public IPv4 address of a network-based server load balancer instance.
    Status string
    Zone Status
    vswitchId String
    The vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of an NLB instance. You must add at least two zones. You can add a maximum of 10 zones.
    zoneId String

    The ID of the zone of the NLB instance. You must add at least two zones. You can add a maximum of 10 zones.

    You can call the DescribeZones operation to query the most recent zone list.

    allocationId String
    The ID of the elastic IP address (EIP) that is associated with the Internet-facing NLB instance. You can specify one EIP for each zone. You must add at least two zones. You can add a maximum of 10 zones.
    eniId String
    The ID of the elastic network interface (ENI).
    ipv6Address String
    The IPv6 address of the NLB instance.
    privateIpv4Address String
    The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
    publicIpv4Address String
    Public IPv4 address of a network-based server load balancer instance.
    status String
    Zone Status
    vswitchId string
    The vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of an NLB instance. You must add at least two zones. You can add a maximum of 10 zones.
    zoneId string

    The ID of the zone of the NLB instance. You must add at least two zones. You can add a maximum of 10 zones.

    You can call the DescribeZones operation to query the most recent zone list.

    allocationId string
    The ID of the elastic IP address (EIP) that is associated with the Internet-facing NLB instance. You can specify one EIP for each zone. You must add at least two zones. You can add a maximum of 10 zones.
    eniId string
    The ID of the elastic network interface (ENI).
    ipv6Address string
    The IPv6 address of the NLB instance.
    privateIpv4Address string
    The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
    publicIpv4Address string
    Public IPv4 address of a network-based server load balancer instance.
    status string
    Zone Status
    vswitch_id str
    The vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of an NLB instance. You must add at least two zones. You can add a maximum of 10 zones.
    zone_id str

    The ID of the zone of the NLB instance. You must add at least two zones. You can add a maximum of 10 zones.

    You can call the DescribeZones operation to query the most recent zone list.

    allocation_id str
    The ID of the elastic IP address (EIP) that is associated with the Internet-facing NLB instance. You can specify one EIP for each zone. You must add at least two zones. You can add a maximum of 10 zones.
    eni_id str
    The ID of the elastic network interface (ENI).
    ipv6_address str
    The IPv6 address of the NLB instance.
    private_ipv4_address str
    The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
    public_ipv4_address str
    Public IPv4 address of a network-based server load balancer instance.
    status str
    Zone Status
    vswitchId String
    The vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of an NLB instance. You must add at least two zones. You can add a maximum of 10 zones.
    zoneId String

    The ID of the zone of the NLB instance. You must add at least two zones. You can add a maximum of 10 zones.

    You can call the DescribeZones operation to query the most recent zone list.

    allocationId String
    The ID of the elastic IP address (EIP) that is associated with the Internet-facing NLB instance. You can specify one EIP for each zone. You must add at least two zones. You can add a maximum of 10 zones.
    eniId String
    The ID of the elastic network interface (ENI).
    ipv6Address String
    The IPv6 address of the NLB instance.
    privateIpv4Address String
    The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
    publicIpv4Address String
    Public IPv4 address of a network-based server load balancer instance.
    status String
    Zone Status

    Import

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

    $ pulumi import alicloud:nlb/loadBalancer:LoadBalancer 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.66.0 published on Friday, Nov 15, 2024 by Pulumi