alicloud.nlb.LoadBalancer
Explore with Pulumi AI
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:
- Address
Type 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.
- Vpc
Id string - The ID of the VPC where the NLB instance is deployed.
- Zone
Mappings List<Pulumi.Ali Cloud. Nlb. Inputs. Load Balancer Zone Mapping> - 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 stringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- Bandwidth
Package stringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- Cross
Zone boolEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- Deletion
Protection Pulumi.Config Ali Cloud. Nlb. Inputs. Load Balancer Deletion Protection Config - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - Deletion
Protection boolEnabled - Deletion
Protection stringReason - Ipv6Address
Type 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.
- Load
Balancer stringName 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 stringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - Modification
Protection Pulumi.Config Ali Cloud. Nlb. Inputs. Load Balancer Modification Protection Config - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - Modification
Protection stringReason - Modification
Protection stringStatus - Resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- Security
Group List<string>Ids - The security group to which the network-based SLB instance belongs.
- Dictionary<string, string>
- List of labels.
- Address
Type 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.
- Vpc
Id string - The ID of the VPC where the NLB instance is deployed.
- Zone
Mappings []LoadBalancer Zone Mapping Args - 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 stringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- Bandwidth
Package stringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- Cross
Zone boolEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- Deletion
Protection LoadConfig Balancer Deletion Protection Config Args - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - Deletion
Protection boolEnabled - Deletion
Protection stringReason - Ipv6Address
Type 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.
- Load
Balancer stringName 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 stringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - Modification
Protection LoadConfig Balancer Modification Protection Config Args - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - Modification
Protection stringReason - Modification
Protection stringStatus - Resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- Security
Group []stringIds - The security group to which the network-based SLB instance belongs.
- map[string]string
- List of labels.
- address
Type 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.
- vpc
Id String - The ID of the VPC where the NLB instance is deployed.
- zone
Mappings List<LoadBalancer Zone Mapping> - 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 StringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- bandwidth
Package StringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- cross
Zone BooleanEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- deletion
Protection LoadConfig Balancer Deletion Protection Config - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - deletion
Protection BooleanEnabled - deletion
Protection StringReason - ipv6Address
Type 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.
- load
Balancer StringName 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 StringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - modification
Protection LoadConfig Balancer Modification Protection Config - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - modification
Protection StringReason - modification
Protection StringStatus - resource
Group StringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- security
Group List<String>Ids - The security group to which the network-based SLB instance belongs.
- Map<String,String>
- List of labels.
- address
Type 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.
- vpc
Id string - The ID of the VPC where the NLB instance is deployed.
- zone
Mappings LoadBalancer Zone Mapping[] - 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 stringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- bandwidth
Package stringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- cross
Zone booleanEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- deletion
Protection LoadConfig Balancer Deletion Protection Config - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - deletion
Protection booleanEnabled - deletion
Protection stringReason - ipv6Address
Type 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.
- load
Balancer stringName 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 stringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - modification
Protection LoadConfig Balancer Modification Protection Config - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - modification
Protection stringReason - modification
Protection stringStatus - resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- security
Group string[]Ids - The security group to which the network-based SLB instance belongs.
- {[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[LoadBalancer Zone Mapping Args] - 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_ strversion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- bandwidth_
package_ strid - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- cross_
zone_ boolenabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- deletion_
protection_ Loadconfig Balancer Deletion Protection Config Args - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - deletion_
protection_ boolenabled - deletion_
protection_ strreason - ipv6_
address_ strtype - 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_ strname 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_ strtype - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - modification_
protection_ Loadconfig Balancer Modification Protection Config Args - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - modification_
protection_ strreason - modification_
protection_ strstatus - resource_
group_ strid The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- security_
group_ Sequence[str]ids - The security group to which the network-based SLB instance belongs.
- Mapping[str, str]
- List of labels.
- address
Type 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.
- vpc
Id String - The ID of the VPC where the NLB instance is deployed.
- zone
Mappings 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. - address
Ip StringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- bandwidth
Package StringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- cross
Zone BooleanEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- deletion
Protection Property MapConfig - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - deletion
Protection BooleanEnabled - deletion
Protection StringReason - ipv6Address
Type 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.
- load
Balancer StringName 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 StringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - modification
Protection Property MapConfig - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - modification
Protection StringReason - modification
Protection StringStatus - resource
Group StringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- security
Group List<String>Ids - The security group to which the network-based SLB instance belongs.
- Map<String>
- List of labels.
Outputs
All input properties are implicitly available as output properties. Additionally, the LoadBalancer resource produces the following output properties:
- Create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- Dns
Name string - The domain name of the NLB instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancer stringBusiness Status - The business status of the NLB instance.
- Status string
- The status of the NLB instance.
- Create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- Dns
Name string - The domain name of the NLB instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancer stringBusiness Status - The business status of the NLB instance.
- Status string
- The status of the NLB instance.
- create
Time String - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- dns
Name String - The domain name of the NLB instance.
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancer StringBusiness Status - The business status of the NLB instance.
- status String
- The status of the NLB instance.
- create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- dns
Name string - The domain name of the NLB instance.
- id string
- The provider-assigned unique ID for this managed resource.
- load
Balancer stringBusiness Status - 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_ strbusiness_ status - The business status of the NLB instance.
- status str
- The status of the NLB instance.
- create
Time String - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- dns
Name String - The domain name of the NLB instance.
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancer StringBusiness Status - 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.
- Address
Ip stringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- Address
Type 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.
- Bandwidth
Package stringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- Create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- Cross
Zone boolEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- Deletion
Protection Pulumi.Config Ali Cloud. Nlb. Inputs. Load Balancer Deletion Protection Config - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - Deletion
Protection boolEnabled - Deletion
Protection stringReason - Dns
Name string - The domain name of the NLB instance.
- Ipv6Address
Type 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.
- Load
Balancer stringBusiness Status - The business status of the NLB instance.
- Load
Balancer stringName 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 stringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - Modification
Protection Pulumi.Config Ali Cloud. Nlb. Inputs. Load Balancer Modification Protection Config - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - Modification
Protection stringReason - Modification
Protection stringStatus - Resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- Security
Group List<string>Ids - The security group to which the network-based SLB instance belongs.
- Status string
- The status of the NLB instance.
- Dictionary<string, string>
- List of labels.
- Vpc
Id string - The ID of the VPC where the NLB instance is deployed.
- Zone
Mappings List<Pulumi.Ali Cloud. Nlb. Inputs. Load Balancer Zone Mapping> - 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 stringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- Address
Type 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.
- Bandwidth
Package stringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- Create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- Cross
Zone boolEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- Deletion
Protection LoadConfig Balancer Deletion Protection Config Args - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - Deletion
Protection boolEnabled - Deletion
Protection stringReason - Dns
Name string - The domain name of the NLB instance.
- Ipv6Address
Type 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.
- Load
Balancer stringBusiness Status - The business status of the NLB instance.
- Load
Balancer stringName 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 stringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - Modification
Protection LoadConfig Balancer Modification Protection Config Args - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - Modification
Protection stringReason - Modification
Protection stringStatus - Resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- Security
Group []stringIds - The security group to which the network-based SLB instance belongs.
- Status string
- The status of the NLB instance.
- map[string]string
- List of labels.
- Vpc
Id string - The ID of the VPC where the NLB instance is deployed.
- Zone
Mappings []LoadBalancer Zone Mapping Args - 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 StringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- address
Type 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.
- bandwidth
Package StringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- create
Time String - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- cross
Zone BooleanEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- deletion
Protection LoadConfig Balancer Deletion Protection Config - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - deletion
Protection BooleanEnabled - deletion
Protection StringReason - dns
Name String - The domain name of the NLB instance.
- ipv6Address
Type 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.
- load
Balancer StringBusiness Status - The business status of the NLB instance.
- load
Balancer StringName 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 StringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - modification
Protection LoadConfig Balancer Modification Protection Config - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - modification
Protection StringReason - modification
Protection StringStatus - resource
Group StringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- security
Group List<String>Ids - The security group to which the network-based SLB instance belongs.
- status String
- The status of the NLB instance.
- Map<String,String>
- List of labels.
- vpc
Id String - The ID of the VPC where the NLB instance is deployed.
- zone
Mappings List<LoadBalancer Zone Mapping> - 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 stringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- address
Type 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.
- bandwidth
Package stringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- cross
Zone booleanEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- deletion
Protection LoadConfig Balancer Deletion Protection Config - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - deletion
Protection booleanEnabled - deletion
Protection stringReason - dns
Name string - The domain name of the NLB instance.
- ipv6Address
Type 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.
- load
Balancer stringBusiness Status - The business status of the NLB instance.
- load
Balancer stringName 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 stringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - modification
Protection LoadConfig Balancer Modification Protection Config - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - modification
Protection stringReason - modification
Protection stringStatus - resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- security
Group string[]Ids - The security group to which the network-based SLB instance belongs.
- status string
- The status of the NLB instance.
- {[key: string]: string}
- List of labels.
- vpc
Id string - The ID of the VPC where the NLB instance is deployed.
- zone
Mappings LoadBalancer Zone Mapping[] - 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_ strversion - 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_ strid - 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_ boolenabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- deletion_
protection_ Loadconfig Balancer Deletion Protection Config Args - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - deletion_
protection_ boolenabled - deletion_
protection_ strreason - dns_
name str - The domain name of the NLB instance.
- ipv6_
address_ strtype - 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_ strbusiness_ status - The business status of the NLB instance.
- load_
balancer_ strname 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_ strtype - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - modification_
protection_ Loadconfig Balancer Modification Protection Config Args - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - modification_
protection_ strreason - modification_
protection_ strstatus - resource_
group_ strid The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- security_
group_ Sequence[str]ids - The security group to which the network-based SLB instance belongs.
- status str
- The status of the NLB instance.
- Mapping[str, str]
- List of labels.
- vpc_
id str - The ID of the VPC where the NLB instance is deployed.
- zone_
mappings Sequence[LoadBalancer Zone Mapping Args] - 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 StringVersion - The protocol version. Valid values:
- ipv4: IPv4. This is the default value.
- DualStack: dual stack.
- address
Type 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.
- bandwidth
Package StringId - The ID of the EIP bandwidth plan that is associated with the Internet-facing NLB instance.
- create
Time String - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- cross
Zone BooleanEnabled - Specifies whether to enable cross-zone load balancing for the NLB instance. Valid values:
- deletion
Protection Property MapConfig - Specifies whether to enable deletion protection. Default value:
false
. Seedeletion_protection_config
below. - deletion
Protection BooleanEnabled - deletion
Protection StringReason - dns
Name String - The domain name of the NLB instance.
- ipv6Address
Type 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.
- load
Balancer StringBusiness Status - The business status of the NLB instance.
- load
Balancer StringName 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 StringType - The type of the Server Load Balancer (SLB) instance. Set the value to
network
, which specifies NLB. - modification
Protection Property MapConfig - Specifies whether to enable the configuration read-only mode. Default value:
NonProtection
. Seemodification_protection_config
below. - modification
Protection StringReason - modification
Protection StringStatus - resource
Group StringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- security
Group List<String>Ids - The security group to which the network-based SLB instance belongs.
- status String
- The status of the NLB instance.
- Map<String>
- List of labels.
- vpc
Id String - The ID of the VPC where the NLB instance is deployed.
- zone
Mappings 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:
- Enabled
Time 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 totrue
.
- Enabled bool
- Specifies whether to enable deletion protection. Valid values:
- Enabled
Time 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 totrue
.
- enabled Boolean
- Specifies whether to enable deletion protection. Valid values:
- enabled
Time 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 totrue
.
- enabled boolean
- Specifies whether to enable deletion protection. Valid values:
- enabled
Time 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 totrue
.
- 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 totrue
.
- enabled Boolean
- Specifies whether to enable deletion protection. Valid values:
- enabled
Time 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 totrue
.
LoadBalancerModificationProtectionConfig, LoadBalancerModificationProtectionConfigArgs
- Enabled
Time 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 toConsoleProtection
.- 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 theModificationProtectionReason
parameter. If you specifyModificationProtectionReason
, the value is cleared.ConsoleProtection
: enables the configuration read-only mode. In this case, you can specifyModificationProtectionReason
.
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 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 toConsoleProtection
.- 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 theModificationProtectionReason
parameter. If you specifyModificationProtectionReason
, the value is cleared.ConsoleProtection
: enables the configuration read-only mode. In this case, you can specifyModificationProtectionReason
.
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 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 toConsoleProtection
.- 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 theModificationProtectionReason
parameter. If you specifyModificationProtectionReason
, the value is cleared.ConsoleProtection
: enables the configuration read-only mode. In this case, you can specifyModificationProtectionReason
.
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 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 toConsoleProtection
.- 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 theModificationProtectionReason
parameter. If you specifyModificationProtectionReason
, the value is cleared.ConsoleProtection
: enables the configuration read-only mode. In this case, you can specifyModificationProtectionReason
.
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 toConsoleProtection
.- 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 theModificationProtectionReason
parameter. If you specifyModificationProtectionReason
, the value is cleared.ConsoleProtection
: enables the configuration read-only mode. In this case, you can specifyModificationProtectionReason
.
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 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 toConsoleProtection
.- 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 theModificationProtectionReason
parameter. If you specifyModificationProtectionReason
, the value is cleared.ConsoleProtection
: enables the configuration read-only mode. In this case, you can specifyModificationProtectionReason
.
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
- Vswitch
Id 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.
- Zone
Id 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.
- Allocation
Id 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.
- Eni
Id string - The ID of the elastic network interface (ENI).
- Ipv6Address string
- The IPv6 address of the NLB instance.
- Private
Ipv4Address string - The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
- Public
Ipv4Address string - Public IPv4 address of a network-based server load balancer instance.
- Status string
- Zone Status
- Vswitch
Id 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.
- Zone
Id 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.
- Allocation
Id 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.
- Eni
Id string - The ID of the elastic network interface (ENI).
- Ipv6Address string
- The IPv6 address of the NLB instance.
- Private
Ipv4Address string - The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
- Public
Ipv4Address string - Public IPv4 address of a network-based server load balancer instance.
- Status string
- Zone Status
- vswitch
Id 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.
- zone
Id 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.
- allocation
Id 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.
- eni
Id String - The ID of the elastic network interface (ENI).
- ipv6Address String
- The IPv6 address of the NLB instance.
- private
Ipv4Address String - The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
- public
Ipv4Address String - Public IPv4 address of a network-based server load balancer instance.
- status String
- Zone Status
- vswitch
Id 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.
- zone
Id 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.
- allocation
Id 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.
- eni
Id string - The ID of the elastic network interface (ENI).
- ipv6Address string
- The IPv6 address of the NLB instance.
- private
Ipv4Address string - The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
- public
Ipv4Address 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_ straddress - The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
- public_
ipv4_ straddress - Public IPv4 address of a network-based server load balancer instance.
- status str
- Zone Status
- vswitch
Id 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.
- zone
Id 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.
- allocation
Id 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.
- eni
Id String - The ID of the elastic network interface (ENI).
- ipv6Address String
- The IPv6 address of the NLB instance.
- private
Ipv4Address String - The private IP address. You must add at least two zones. You can add a maximum of 10 zones.
- public
Ipv4Address 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.