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

alicloud.nlb.LoadBalancer

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 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=[
            alicloud.nlb.LoadBalancerZoneMappingArgs(
                vswitch_id=default_switch.id,
                zone_id=default_get_zones.zones[0].id,
            ),
            alicloud.nlb.LoadBalancerZoneMappingArgs(
                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, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetZones, err := nlb.GetZones(ctx, nil, 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.Map{
    				"Created": pulumi.Any("TF"),
    				"For":     pulumi.Any("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: {}
    

    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, Any]] = 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", "any" },
        },
        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.Map{
    		"string": pulumi.Any("any"),
    	},
    	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", "any"))
        .crossZoneEnabled(false)
        .bandwidthPackageId("string")
        .build());
    
    exampleload_balancer_resource_resource_from_nlbload_balancer = alicloud.nlb.LoadBalancer("exampleloadBalancerResourceResourceFromNlbloadBalancer",
        vpc_id="string",
        address_type="string",
        zone_mappings=[alicloud.nlb.LoadBalancerZoneMappingArgs(
            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=alicloud.nlb.LoadBalancerModificationProtectionConfigArgs(
            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=alicloud.nlb.LoadBalancerDeletionProtectionConfigArgs(
            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": "any",
        },
        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: "any",
        },
        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: any
        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

    The LoadBalancer resource accepts the following input properties:

    AddressType string
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    VpcId string
    The ID of the network-based SLB instance.
    ZoneMappings List<Pulumi.AliCloud.Nlb.Inputs.LoadBalancerZoneMapping>
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    AddressIpVersion string
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    BandwidthPackageId string
    The ID of the shared bandwidth package associated with the public network instance.
    CrossZoneEnabled bool
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    DeletionProtectionConfig Pulumi.AliCloud.Nlb.Inputs.LoadBalancerDeletionProtectionConfig
    Delete protection. See deletion_protection_config below.
    DeletionProtectionEnabled bool
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    DeletionProtectionReason string
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    Ipv6AddressType string
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    LoadBalancerName string
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    LoadBalancerType string
    Load balancing type. Only value: network, which indicates network-based load balancing.
    ModificationProtectionConfig Pulumi.AliCloud.Nlb.Inputs.LoadBalancerModificationProtectionConfig
    Modify protection. See modification_protection_config below.
    ModificationProtectionReason string
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    ModificationProtectionStatus string
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    ResourceGroupId string
    The ID of the resource group.
    SecurityGroupIds List<string>
    The security group to which the network-based SLB instance belongs.
    Tags Dictionary<string, object>
    List of labels.
    AddressType string
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    VpcId string
    The ID of the network-based SLB instance.
    ZoneMappings []LoadBalancerZoneMappingArgs
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    AddressIpVersion string
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    BandwidthPackageId string
    The ID of the shared bandwidth package associated with the public network instance.
    CrossZoneEnabled bool
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    DeletionProtectionConfig LoadBalancerDeletionProtectionConfigArgs
    Delete protection. See deletion_protection_config below.
    DeletionProtectionEnabled bool
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    DeletionProtectionReason string
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    Ipv6AddressType string
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    LoadBalancerName string
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    LoadBalancerType string
    Load balancing type. Only value: network, which indicates network-based load balancing.
    ModificationProtectionConfig LoadBalancerModificationProtectionConfigArgs
    Modify protection. See modification_protection_config below.
    ModificationProtectionReason string
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    ModificationProtectionStatus string
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    ResourceGroupId string
    The ID of the resource group.
    SecurityGroupIds []string
    The security group to which the network-based SLB instance belongs.
    Tags map[string]interface{}
    List of labels.
    addressType String
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    vpcId String
    The ID of the network-based SLB instance.
    zoneMappings List<LoadBalancerZoneMapping>
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    addressIpVersion String
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    bandwidthPackageId String
    The ID of the shared bandwidth package associated with the public network instance.
    crossZoneEnabled Boolean
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    deletionProtectionConfig LoadBalancerDeletionProtectionConfig
    Delete protection. See deletion_protection_config below.
    deletionProtectionEnabled Boolean
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    deletionProtectionReason String
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    ipv6AddressType String
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    loadBalancerName String
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    loadBalancerType String
    Load balancing type. Only value: network, which indicates network-based load balancing.
    modificationProtectionConfig LoadBalancerModificationProtectionConfig
    Modify protection. See modification_protection_config below.
    modificationProtectionReason String
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    modificationProtectionStatus String
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    resourceGroupId String
    The ID of the resource group.
    securityGroupIds List<String>
    The security group to which the network-based SLB instance belongs.
    tags Map<String,Object>
    List of labels.
    addressType string
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    vpcId string
    The ID of the network-based SLB instance.
    zoneMappings LoadBalancerZoneMapping[]
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    addressIpVersion string
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    bandwidthPackageId string
    The ID of the shared bandwidth package associated with the public network instance.
    crossZoneEnabled boolean
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    deletionProtectionConfig LoadBalancerDeletionProtectionConfig
    Delete protection. See deletion_protection_config below.
    deletionProtectionEnabled boolean
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    deletionProtectionReason string
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    ipv6AddressType string
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    loadBalancerName string
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    loadBalancerType string
    Load balancing type. Only value: network, which indicates network-based load balancing.
    modificationProtectionConfig LoadBalancerModificationProtectionConfig
    Modify protection. See modification_protection_config below.
    modificationProtectionReason string
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    modificationProtectionStatus string
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    resourceGroupId string
    The ID of the resource group.
    securityGroupIds string[]
    The security group to which the network-based SLB instance belongs.
    tags {[key: string]: any}
    List of labels.
    address_type str
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    vpc_id str
    The ID of the network-based SLB instance.
    zone_mappings Sequence[LoadBalancerZoneMappingArgs]
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    address_ip_version str
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    bandwidth_package_id str
    The ID of the shared bandwidth package associated with the public network instance.
    cross_zone_enabled bool
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    deletion_protection_config LoadBalancerDeletionProtectionConfigArgs
    Delete protection. See deletion_protection_config below.
    deletion_protection_enabled bool
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    deletion_protection_reason str
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    ipv6_address_type str
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    load_balancer_name str
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    load_balancer_type str
    Load balancing type. Only value: network, which indicates network-based load balancing.
    modification_protection_config LoadBalancerModificationProtectionConfigArgs
    Modify protection. See modification_protection_config below.
    modification_protection_reason str
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    modification_protection_status str
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    resource_group_id str
    The ID of the resource group.
    security_group_ids Sequence[str]
    The security group to which the network-based SLB instance belongs.
    tags Mapping[str, Any]
    List of labels.
    addressType String
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    vpcId String
    The ID of the network-based SLB instance.
    zoneMappings List<Property Map>
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    addressIpVersion String
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    bandwidthPackageId String
    The ID of the shared bandwidth package associated with the public network instance.
    crossZoneEnabled Boolean
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    deletionProtectionConfig Property Map
    Delete protection. See deletion_protection_config below.
    deletionProtectionEnabled Boolean
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    deletionProtectionReason String
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    ipv6AddressType String
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    loadBalancerName String
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    loadBalancerType String
    Load balancing type. Only value: network, which indicates network-based load balancing.
    modificationProtectionConfig Property Map
    Modify protection. See modification_protection_config below.
    modificationProtectionReason String
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    modificationProtectionStatus String
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    resourceGroupId String
    The ID of the resource group.
    securityGroupIds List<String>
    The security group to which the network-based SLB instance belongs.
    tags Map<Any>
    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 resource.
    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 resource.
    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 resource.
    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 resource.
    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 resource.
    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 resource.

    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, Any]] = 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
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    AddressType string
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    BandwidthPackageId string
    The ID of the shared bandwidth package associated with the public network instance.
    CreateTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    CrossZoneEnabled bool
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    DeletionProtectionConfig Pulumi.AliCloud.Nlb.Inputs.LoadBalancerDeletionProtectionConfig
    Delete protection. See deletion_protection_config below.
    DeletionProtectionEnabled bool
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    DeletionProtectionReason string
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    DnsName string
    The domain name of the NLB instance.
    Ipv6AddressType string
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    LoadBalancerBusinessStatus string
    The business status of the NLB instance.
    LoadBalancerName string
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    LoadBalancerType string
    Load balancing type. Only value: network, which indicates network-based load balancing.
    ModificationProtectionConfig Pulumi.AliCloud.Nlb.Inputs.LoadBalancerModificationProtectionConfig
    Modify protection. See modification_protection_config below.
    ModificationProtectionReason string
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    ModificationProtectionStatus string
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    ResourceGroupId string
    The ID of the resource group.
    SecurityGroupIds List<string>
    The security group to which the network-based SLB instance belongs.
    Status string
    The status of the resource.
    Tags Dictionary<string, object>
    List of labels.
    VpcId string
    The ID of the network-based SLB instance.
    ZoneMappings List<Pulumi.AliCloud.Nlb.Inputs.LoadBalancerZoneMapping>
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    AddressIpVersion string
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    AddressType string
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    BandwidthPackageId string
    The ID of the shared bandwidth package associated with the public network instance.
    CreateTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    CrossZoneEnabled bool
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    DeletionProtectionConfig LoadBalancerDeletionProtectionConfigArgs
    Delete protection. See deletion_protection_config below.
    DeletionProtectionEnabled bool
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    DeletionProtectionReason string
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    DnsName string
    The domain name of the NLB instance.
    Ipv6AddressType string
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    LoadBalancerBusinessStatus string
    The business status of the NLB instance.
    LoadBalancerName string
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    LoadBalancerType string
    Load balancing type. Only value: network, which indicates network-based load balancing.
    ModificationProtectionConfig LoadBalancerModificationProtectionConfigArgs
    Modify protection. See modification_protection_config below.
    ModificationProtectionReason string
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    ModificationProtectionStatus string
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    ResourceGroupId string
    The ID of the resource group.
    SecurityGroupIds []string
    The security group to which the network-based SLB instance belongs.
    Status string
    The status of the resource.
    Tags map[string]interface{}
    List of labels.
    VpcId string
    The ID of the network-based SLB instance.
    ZoneMappings []LoadBalancerZoneMappingArgs
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    addressIpVersion String
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    addressType String
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    bandwidthPackageId String
    The ID of the shared bandwidth package associated with the public network instance.
    createTime String
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    crossZoneEnabled Boolean
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    deletionProtectionConfig LoadBalancerDeletionProtectionConfig
    Delete protection. See deletion_protection_config below.
    deletionProtectionEnabled Boolean
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    deletionProtectionReason String
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    dnsName String
    The domain name of the NLB instance.
    ipv6AddressType String
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    loadBalancerBusinessStatus String
    The business status of the NLB instance.
    loadBalancerName String
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    loadBalancerType String
    Load balancing type. Only value: network, which indicates network-based load balancing.
    modificationProtectionConfig LoadBalancerModificationProtectionConfig
    Modify protection. See modification_protection_config below.
    modificationProtectionReason String
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    modificationProtectionStatus String
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    resourceGroupId String
    The ID of the resource group.
    securityGroupIds List<String>
    The security group to which the network-based SLB instance belongs.
    status String
    The status of the resource.
    tags Map<String,Object>
    List of labels.
    vpcId String
    The ID of the network-based SLB instance.
    zoneMappings List<LoadBalancerZoneMapping>
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    addressIpVersion string
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    addressType string
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    bandwidthPackageId string
    The ID of the shared bandwidth package associated with the public network instance.
    createTime string
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    crossZoneEnabled boolean
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    deletionProtectionConfig LoadBalancerDeletionProtectionConfig
    Delete protection. See deletion_protection_config below.
    deletionProtectionEnabled boolean
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    deletionProtectionReason string
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    dnsName string
    The domain name of the NLB instance.
    ipv6AddressType string
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    loadBalancerBusinessStatus string
    The business status of the NLB instance.
    loadBalancerName string
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    loadBalancerType string
    Load balancing type. Only value: network, which indicates network-based load balancing.
    modificationProtectionConfig LoadBalancerModificationProtectionConfig
    Modify protection. See modification_protection_config below.
    modificationProtectionReason string
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    modificationProtectionStatus string
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    resourceGroupId string
    The ID of the resource group.
    securityGroupIds string[]
    The security group to which the network-based SLB instance belongs.
    status string
    The status of the resource.
    tags {[key: string]: any}
    List of labels.
    vpcId string
    The ID of the network-based SLB instance.
    zoneMappings LoadBalancerZoneMapping[]
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    address_ip_version str
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    address_type str
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    bandwidth_package_id str
    The ID of the shared bandwidth package associated with the public network instance.
    create_time str
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    cross_zone_enabled bool
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    deletion_protection_config LoadBalancerDeletionProtectionConfigArgs
    Delete protection. See deletion_protection_config below.
    deletion_protection_enabled bool
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    deletion_protection_reason str
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    dns_name str
    The domain name of the NLB instance.
    ipv6_address_type str
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    load_balancer_business_status str
    The business status of the NLB instance.
    load_balancer_name str
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    load_balancer_type str
    Load balancing type. Only value: network, which indicates network-based load balancing.
    modification_protection_config LoadBalancerModificationProtectionConfigArgs
    Modify protection. See modification_protection_config below.
    modification_protection_reason str
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    modification_protection_status str
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    resource_group_id str
    The ID of the resource group.
    security_group_ids Sequence[str]
    The security group to which the network-based SLB instance belongs.
    status str
    The status of the resource.
    tags Mapping[str, Any]
    List of labels.
    vpc_id str
    The ID of the network-based SLB instance.
    zone_mappings Sequence[LoadBalancerZoneMappingArgs]
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.
    addressIpVersion String
    Protocol version. Value:

    • Ipv4:IPv4 type.
    • DualStack: Double Stack type.
    addressType String
    The network address type of IPv4 for network load balancing. Value:

    • Internet: public network. Load balancer has a public network IP address, and the DNS domain name is resolved to a public network IP address, so it can be accessed in a public network environment.
    • Intranet: private network. The server load balancer only has a private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the intranet environment of the VPC where the server load balancer is located.
    bandwidthPackageId String
    The ID of the shared bandwidth package associated with the public network instance.
    createTime String
    Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
    crossZoneEnabled Boolean
    Whether cross-zone is enabled for a network-based load balancing instance. Value:

    • true: on.
    • false: closed.
    deletionProtectionConfig Property Map
    Delete protection. See deletion_protection_config below.
    deletionProtectionEnabled Boolean
    Specifies whether to enable deletion protection. Default value: false. Valid values:
    deletionProtectionReason String
    The reason why the deletion protection feature is enabled or disabled. The deletion_protection_reason takes effect only when deletion_protection_enabled is set to true.
    dnsName String
    The domain name of the NLB instance.
    ipv6AddressType String
    The IPv6 address type of network load balancing. Value:

    • Internet: Server Load Balancer has a public IP address, and the DNS domain name is resolved to a public IP address, so it can be accessed in a public network environment.
    • Intranet: SLB only has the private IP address, and the DNS domain name is resolved to the private IP address, so it can only be accessed by the Intranet environment of the VPC where SLB is located.
    loadBalancerBusinessStatus String
    The business status of the NLB instance.
    loadBalancerName String
    The name of the network-based load balancing instance. 2 to 128 English or Chinese characters in length, which must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_), and dashes (-).
    loadBalancerType String
    Load balancing type. Only value: network, which indicates network-based load balancing.
    modificationProtectionConfig Property Map
    Modify protection. See modification_protection_config below.
    modificationProtectionReason String
    The reason why the configuration read-only mode is enabled. The modification_protection_reason takes effect only when modification_protection_status is set to ConsoleProtection.
    modificationProtectionStatus String
    Specifies whether to enable the configuration read-only mode. Default value: NonProtection. Valid values:

    • NonProtection: Does not enable the configuration read-only mode. You cannot set the modification_protection_reason. If the modification_protection_reason is set, the value is cleared.
    • ConsoleProtection: Enables the configuration read-only mode. You can set the modification_protection_reason.
    resourceGroupId String
    The ID of the resource group.
    securityGroupIds List<String>
    The security group to which the network-based SLB instance belongs.
    status String
    The status of the resource.
    tags Map<Any>
    List of labels.
    vpcId String
    The ID of the network-based SLB instance.
    zoneMappings List<Property Map>
    The list of zones and vSwitch mappings. You must add at least two zones and a maximum of 10 zones. See zone_mappings below.

    Supporting Types

    LoadBalancerDeletionProtectionConfig, LoadBalancerDeletionProtectionConfigArgs

    Enabled bool
    Delete protection enable.
    EnabledTime string
    Opening time.
    Reason string
    Reason for opening.
    Enabled bool
    Delete protection enable.
    EnabledTime string
    Opening time.
    Reason string
    Reason for opening.
    enabled Boolean
    Delete protection enable.
    enabledTime String
    Opening time.
    reason String
    Reason for opening.
    enabled boolean
    Delete protection enable.
    enabledTime string
    Opening time.
    reason string
    Reason for opening.
    enabled bool
    Delete protection enable.
    enabled_time str
    Opening time.
    reason str
    Reason for opening.
    enabled Boolean
    Delete protection enable.
    enabledTime String
    Opening time.
    reason String
    Reason for opening.

    LoadBalancerModificationProtectionConfig, LoadBalancerModificationProtectionConfigArgs

    EnabledTime string
    Opening time.
    Reason string
    Reason for opening.
    Status string
    ON.
    EnabledTime string
    Opening time.
    Reason string
    Reason for opening.
    Status string
    ON.
    enabledTime String
    Opening time.
    reason String
    Reason for opening.
    status String
    ON.
    enabledTime string
    Opening time.
    reason string
    Reason for opening.
    status string
    ON.
    enabled_time str
    Opening time.
    reason str
    Reason for opening.
    status str
    ON.
    enabledTime String
    Opening time.
    reason String
    Reason for opening.
    status String
    ON.

    LoadBalancerZoneMapping, LoadBalancerZoneMappingArgs

    VswitchId string
    The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
    ZoneId string
    The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
    AllocationId string
    The ID of the elastic IP address.
    EniId string
    The ID of ENI.
    Ipv6Address string
    The IPv6 address of a network-based server load balancer instance.
    PrivateIpv4Address string
    The private IPv4 address of a network-based server load balancer instance.
    PublicIpv4Address string
    Public IPv4 address of a network-based server load balancer instance.
    Status string
    Zone Status.
    VswitchId string
    The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
    ZoneId string
    The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
    AllocationId string
    The ID of the elastic IP address.
    EniId string
    The ID of ENI.
    Ipv6Address string
    The IPv6 address of a network-based server load balancer instance.
    PrivateIpv4Address string
    The private IPv4 address of a network-based server load balancer instance.
    PublicIpv4Address string
    Public IPv4 address of a network-based server load balancer instance.
    Status string
    Zone Status.
    vswitchId String
    The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
    zoneId String
    The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
    allocationId String
    The ID of the elastic IP address.
    eniId String
    The ID of ENI.
    ipv6Address String
    The IPv6 address of a network-based server load balancer instance.
    privateIpv4Address String
    The private IPv4 address of a network-based server load balancer instance.
    publicIpv4Address String
    Public IPv4 address of a network-based server load balancer instance.
    status String
    Zone Status.
    vswitchId string
    The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
    zoneId string
    The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
    allocationId string
    The ID of the elastic IP address.
    eniId string
    The ID of ENI.
    ipv6Address string
    The IPv6 address of a network-based server load balancer instance.
    privateIpv4Address string
    The private IPv4 address of a network-based server load balancer instance.
    publicIpv4Address string
    Public IPv4 address of a network-based server load balancer instance.
    status string
    Zone Status.
    vswitch_id str
    The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
    zone_id str
    The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
    allocation_id str
    The ID of the elastic IP address.
    eni_id str
    The ID of ENI.
    ipv6_address str
    The IPv6 address of a network-based server load balancer instance.
    private_ipv4_address str
    The private IPv4 address of a network-based server load balancer instance.
    public_ipv4_address str
    Public IPv4 address of a network-based server load balancer instance.
    status str
    Zone Status.
    vswitchId String
    The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
    zoneId String
    The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
    allocationId String
    The ID of the elastic IP address.
    eniId String
    The ID of ENI.
    ipv6Address String
    The IPv6 address of a network-based server load balancer instance.
    privateIpv4Address String
    The private IPv4 address of a network-based server load balancer instance.
    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi