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=[
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:
- Address
Type 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.
- Vpc
Id string - The ID of the network-based SLB instance.
- Zone
Mappings List<Pulumi.Ali Cloud. Nlb. Inputs. Load Balancer Zone Mapping> - 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 stringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- Bandwidth
Package stringId - The ID of the shared bandwidth package associated with the public network instance.
- Cross
Zone boolEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- Deletion
Protection Pulumi.Config Ali Cloud. Nlb. Inputs. Load Balancer Deletion Protection Config - Delete protection. See
deletion_protection_config
below. - Deletion
Protection boolEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - Deletion
Protection stringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - Ipv6Address
Type 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.
- Load
Balancer stringName - 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 stringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- Modification
Protection Pulumi.Config Ali Cloud. Nlb. Inputs. Load Balancer Modification Protection Config - Modify protection. See
modification_protection_config
below. - Modification
Protection stringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - Modification
Protection stringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- Resource
Group stringId - The ID of the resource group.
- Security
Group List<string>Ids - The security group to which the network-based SLB instance belongs.
- Dictionary<string, object>
- List of labels.
- Address
Type 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.
- Vpc
Id string - The ID of the network-based SLB instance.
- Zone
Mappings []LoadBalancer Zone Mapping Args - 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 stringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- Bandwidth
Package stringId - The ID of the shared bandwidth package associated with the public network instance.
- Cross
Zone boolEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- Deletion
Protection LoadConfig Balancer Deletion Protection Config Args - Delete protection. See
deletion_protection_config
below. - Deletion
Protection boolEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - Deletion
Protection stringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - Ipv6Address
Type 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.
- Load
Balancer stringName - 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 stringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- Modification
Protection LoadConfig Balancer Modification Protection Config Args - Modify protection. See
modification_protection_config
below. - Modification
Protection stringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - Modification
Protection stringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- Resource
Group stringId - The ID of the resource group.
- Security
Group []stringIds - The security group to which the network-based SLB instance belongs.
- map[string]interface{}
- List of labels.
- address
Type 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.
- vpc
Id String - The ID of the network-based SLB instance.
- zone
Mappings List<LoadBalancer Zone Mapping> - 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 StringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- bandwidth
Package StringId - The ID of the shared bandwidth package associated with the public network instance.
- cross
Zone BooleanEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- deletion
Protection LoadConfig Balancer Deletion Protection Config - Delete protection. See
deletion_protection_config
below. - deletion
Protection BooleanEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - deletion
Protection StringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - ipv6Address
Type 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.
- load
Balancer StringName - 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 StringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- modification
Protection LoadConfig Balancer Modification Protection Config - Modify protection. See
modification_protection_config
below. - modification
Protection StringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - modification
Protection StringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- resource
Group StringId - The ID of the resource group.
- security
Group List<String>Ids - The security group to which the network-based SLB instance belongs.
- Map<String,Object>
- List of labels.
- address
Type 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.
- vpc
Id string - The ID of the network-based SLB instance.
- zone
Mappings LoadBalancer Zone Mapping[] - 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 stringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- bandwidth
Package stringId - The ID of the shared bandwidth package associated with the public network instance.
- cross
Zone booleanEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- deletion
Protection LoadConfig Balancer Deletion Protection Config - Delete protection. See
deletion_protection_config
below. - deletion
Protection booleanEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - deletion
Protection stringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - ipv6Address
Type 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.
- load
Balancer stringName - 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 stringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- modification
Protection LoadConfig Balancer Modification Protection Config - Modify protection. See
modification_protection_config
below. - modification
Protection stringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - modification
Protection stringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- resource
Group stringId - The ID of the resource group.
- security
Group string[]Ids - The security group to which the network-based SLB instance belongs.
- {[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[LoadBalancer Zone Mapping Args] - 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_ strversion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- bandwidth_
package_ strid - The ID of the shared bandwidth package associated with the public network instance.
- cross_
zone_ boolenabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- deletion_
protection_ Loadconfig Balancer Deletion Protection Config Args - Delete protection. See
deletion_protection_config
below. - deletion_
protection_ boolenabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - deletion_
protection_ strreason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - ipv6_
address_ strtype - 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_ strname - 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_ strtype - Load balancing type. Only value: network, which indicates network-based load balancing.
- modification_
protection_ Loadconfig Balancer Modification Protection Config Args - Modify protection. See
modification_protection_config
below. - modification_
protection_ strreason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - modification_
protection_ strstatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- resource_
group_ strid - The ID of the resource group.
- security_
group_ Sequence[str]ids - The security group to which the network-based SLB instance belongs.
- Mapping[str, Any]
- List of labels.
- address
Type 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.
- vpc
Id String - The ID of the network-based SLB instance.
- zone
Mappings 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. - address
Ip StringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- bandwidth
Package StringId - The ID of the shared bandwidth package associated with the public network instance.
- cross
Zone BooleanEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- deletion
Protection Property MapConfig - Delete protection. See
deletion_protection_config
below. - deletion
Protection BooleanEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - deletion
Protection StringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - ipv6Address
Type 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.
- load
Balancer StringName - 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 StringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- modification
Protection Property MapConfig - Modify protection. See
modification_protection_config
below. - modification
Protection StringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - modification
Protection StringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- resource
Group StringId - The ID of the resource group.
- security
Group List<String>Ids - The security group to which the network-based SLB instance belongs.
- Map<Any>
- 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 resource.
- 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 resource.
- 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 resource.
- 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 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_ strbusiness_ status - The business status of the NLB instance.
- status str
- The status of the resource.
- 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 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.
- Address
Ip stringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- Address
Type 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.
- Bandwidth
Package stringId - The ID of the shared bandwidth package associated with the public network instance.
- Create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- Cross
Zone boolEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- Deletion
Protection Pulumi.Config Ali Cloud. Nlb. Inputs. Load Balancer Deletion Protection Config - Delete protection. See
deletion_protection_config
below. - Deletion
Protection boolEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - Deletion
Protection stringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - Dns
Name string - The domain name of the NLB instance.
- Ipv6Address
Type 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.
- Load
Balancer stringBusiness Status - The business status of the NLB instance.
- Load
Balancer stringName - 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 stringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- Modification
Protection Pulumi.Config Ali Cloud. Nlb. Inputs. Load Balancer Modification Protection Config - Modify protection. See
modification_protection_config
below. - Modification
Protection stringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - Modification
Protection stringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- Resource
Group stringId - The ID of the resource group.
- Security
Group List<string>Ids - The security group to which the network-based SLB instance belongs.
- Status string
- The status of the resource.
- Dictionary<string, object>
- List of labels.
- Vpc
Id string - The ID of the network-based SLB instance.
- Zone
Mappings List<Pulumi.Ali Cloud. Nlb. Inputs. Load Balancer Zone Mapping> - 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 stringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- Address
Type 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.
- Bandwidth
Package stringId - The ID of the shared bandwidth package associated with the public network instance.
- Create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- Cross
Zone boolEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- Deletion
Protection LoadConfig Balancer Deletion Protection Config Args - Delete protection. See
deletion_protection_config
below. - Deletion
Protection boolEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - Deletion
Protection stringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - Dns
Name string - The domain name of the NLB instance.
- Ipv6Address
Type 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.
- Load
Balancer stringBusiness Status - The business status of the NLB instance.
- Load
Balancer stringName - 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 stringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- Modification
Protection LoadConfig Balancer Modification Protection Config Args - Modify protection. See
modification_protection_config
below. - Modification
Protection stringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - Modification
Protection stringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- Resource
Group stringId - The ID of the resource group.
- Security
Group []stringIds - The security group to which the network-based SLB instance belongs.
- Status string
- The status of the resource.
- map[string]interface{}
- List of labels.
- Vpc
Id string - The ID of the network-based SLB instance.
- Zone
Mappings []LoadBalancer Zone Mapping Args - 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 StringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- address
Type 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.
- bandwidth
Package StringId - The ID of the shared bandwidth package associated with the public network instance.
- create
Time String - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- cross
Zone BooleanEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- deletion
Protection LoadConfig Balancer Deletion Protection Config - Delete protection. See
deletion_protection_config
below. - deletion
Protection BooleanEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - deletion
Protection StringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - dns
Name String - The domain name of the NLB instance.
- ipv6Address
Type 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.
- load
Balancer StringBusiness Status - The business status of the NLB instance.
- load
Balancer StringName - 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 StringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- modification
Protection LoadConfig Balancer Modification Protection Config - Modify protection. See
modification_protection_config
below. - modification
Protection StringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - modification
Protection StringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- resource
Group StringId - The ID of the resource group.
- security
Group List<String>Ids - The security group to which the network-based SLB instance belongs.
- status String
- The status of the resource.
- Map<String,Object>
- List of labels.
- vpc
Id String - The ID of the network-based SLB instance.
- zone
Mappings List<LoadBalancer Zone Mapping> - 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 stringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- address
Type 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.
- bandwidth
Package stringId - The ID of the shared bandwidth package associated with the public network instance.
- create
Time string - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- cross
Zone booleanEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- deletion
Protection LoadConfig Balancer Deletion Protection Config - Delete protection. See
deletion_protection_config
below. - deletion
Protection booleanEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - deletion
Protection stringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - dns
Name string - The domain name of the NLB instance.
- ipv6Address
Type 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.
- load
Balancer stringBusiness Status - The business status of the NLB instance.
- load
Balancer stringName - 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 stringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- modification
Protection LoadConfig Balancer Modification Protection Config - Modify protection. See
modification_protection_config
below. - modification
Protection stringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - modification
Protection stringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- resource
Group stringId - The ID of the resource group.
- security
Group string[]Ids - The security group to which the network-based SLB instance belongs.
- status string
- The status of the resource.
- {[key: string]: any}
- List of labels.
- vpc
Id string - The ID of the network-based SLB instance.
- zone
Mappings LoadBalancer Zone Mapping[] - 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_ strversion - 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_ strid - 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_ boolenabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- deletion_
protection_ Loadconfig Balancer Deletion Protection Config Args - Delete protection. See
deletion_protection_config
below. - deletion_
protection_ boolenabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - deletion_
protection_ strreason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - dns_
name str - The domain name of the NLB instance.
- ipv6_
address_ strtype - 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_ strbusiness_ status - The business status of the NLB instance.
- load_
balancer_ strname - 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_ strtype - Load balancing type. Only value: network, which indicates network-based load balancing.
- modification_
protection_ Loadconfig Balancer Modification Protection Config Args - Modify protection. See
modification_protection_config
below. - modification_
protection_ strreason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - modification_
protection_ strstatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- resource_
group_ strid - The ID of the resource group.
- security_
group_ Sequence[str]ids - The security group to which the network-based SLB instance belongs.
- status str
- The status of the resource.
- Mapping[str, Any]
- List of labels.
- vpc_
id str - The ID of the network-based SLB instance.
- zone_
mappings Sequence[LoadBalancer Zone Mapping Args] - 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 StringVersion - Protocol version. Value:
- Ipv4:IPv4 type.
- DualStack: Double Stack type.
- address
Type 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.
- bandwidth
Package StringId - The ID of the shared bandwidth package associated with the public network instance.
- create
Time String - Resource creation time, using Greenwich Mean Time, formating' yyyy-MM-ddTHH:mm:ssZ '.
- cross
Zone BooleanEnabled - Whether cross-zone is enabled for a network-based load balancing instance. Value:
- true: on.
- false: closed.
- deletion
Protection Property MapConfig - Delete protection. See
deletion_protection_config
below. - deletion
Protection BooleanEnabled - Specifies whether to enable deletion protection. Default value:
false
. Valid values: - deletion
Protection StringReason - The reason why the deletion protection feature is enabled or disabled. The
deletion_protection_reason
takes effect only whendeletion_protection_enabled
is set totrue
. - dns
Name String - The domain name of the NLB instance.
- ipv6Address
Type 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.
- load
Balancer StringBusiness Status - The business status of the NLB instance.
- load
Balancer StringName - 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 StringType - Load balancing type. Only value: network, which indicates network-based load balancing.
- modification
Protection Property MapConfig - Modify protection. See
modification_protection_config
below. - modification
Protection StringReason - The reason why the configuration read-only mode is enabled. The
modification_protection_reason
takes effect only whenmodification_protection_status
is set toConsoleProtection
. - modification
Protection StringStatus - 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 themodification_protection_reason
. If themodification_protection_reason
is set, the value is cleared.ConsoleProtection
: Enables the configuration read-only mode. You can set themodification_protection_reason
.
- resource
Group StringId - The ID of the resource group.
- security
Group List<String>Ids - The security group to which the network-based SLB instance belongs.
- status String
- The status of the resource.
- Map<Any>
- List of labels.
- vpc
Id String - The ID of the network-based SLB instance.
- zone
Mappings 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.
- Enabled
Time string - Opening time.
- Reason string
- Reason for opening.
- Enabled bool
- Delete protection enable.
- Enabled
Time string - Opening time.
- Reason string
- Reason for opening.
- enabled Boolean
- Delete protection enable.
- enabled
Time String - Opening time.
- reason String
- Reason for opening.
- enabled boolean
- Delete protection enable.
- enabled
Time 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.
- enabled
Time String - Opening time.
- reason String
- Reason for opening.
LoadBalancerModificationProtectionConfig, LoadBalancerModificationProtectionConfigArgs
- Enabled
Time string - Opening time.
- Reason string
- Reason for opening.
- Status string
- ON.
- Enabled
Time string - Opening time.
- Reason string
- Reason for opening.
- Status string
- ON.
- enabled
Time String - Opening time.
- reason String
- Reason for opening.
- status String
- ON.
- enabled
Time string - Opening time.
- reason string
- Reason for opening.
- status string
- ON.
- enabled_
time str - Opening time.
- reason str
- Reason for opening.
- status str
- ON.
- enabled
Time String - Opening time.
- reason String
- Reason for opening.
- status String
- ON.
LoadBalancerZoneMapping, LoadBalancerZoneMappingArgs
- Vswitch
Id string - The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
- Zone
Id string - The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
- Allocation
Id string - The ID of the elastic IP address.
- Eni
Id string - The ID of ENI.
- Ipv6Address string
- The IPv6 address of a network-based server load balancer instance.
- Private
Ipv4Address string - The private IPv4 address of a network-based server load balancer instance.
- Public
Ipv4Address string - Public IPv4 address of a network-based server load balancer instance.
- Status string
- Zone Status.
- Vswitch
Id string - The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
- Zone
Id string - The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
- Allocation
Id string - The ID of the elastic IP address.
- Eni
Id string - The ID of ENI.
- Ipv6Address string
- The IPv6 address of a network-based server load balancer instance.
- Private
Ipv4Address string - The private IPv4 address of a network-based server load balancer instance.
- Public
Ipv4Address string - Public IPv4 address of a network-based server load balancer instance.
- Status string
- Zone Status.
- vswitch
Id String - The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
- zone
Id String - The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
- allocation
Id String - The ID of the elastic IP address.
- eni
Id String - The ID of ENI.
- ipv6Address String
- The IPv6 address of a network-based server load balancer instance.
- private
Ipv4Address String - The private IPv4 address of a network-based server load balancer instance.
- public
Ipv4Address String - Public IPv4 address of a network-based server load balancer instance.
- status String
- Zone Status.
- vswitch
Id string - The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
- zone
Id string - The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
- allocation
Id string - The ID of the elastic IP address.
- eni
Id string - The ID of ENI.
- ipv6Address string
- The IPv6 address of a network-based server load balancer instance.
- private
Ipv4Address string - The private IPv4 address of a network-based server load balancer instance.
- public
Ipv4Address 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_ straddress - The private IPv4 address of a network-based server load balancer instance.
- public_
ipv4_ straddress - Public IPv4 address of a network-based server load balancer instance.
- status str
- Zone Status.
- vswitch
Id String - The switch corresponding to the zone. Each zone uses one switch and one subnet by default.
- zone
Id String - The name of the zone. You can call the DescribeZones operation to obtain the name of the zone.
- allocation
Id String - The ID of the elastic IP address.
- eni
Id String - The ID of ENI.
- ipv6Address String
- The IPv6 address of a network-based server load balancer instance.
- private
Ipv4Address String - The private IPv4 address of a network-based server load balancer instance.
- 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.