alicloud.nlb.ServerGroup
Explore with Pulumi AI
Provides a NLB Server Group resource.
For information about NLB Server Group and how to use it, see What is Server Group.
NOTE: Available since v1.186.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 defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "10.4.0.0/16",
});
const defaultServerGroup = new alicloud.nlb.ServerGroup("default", {
resourceGroupId: _default.then(_default => _default.ids?.[0]),
serverGroupName: name,
serverGroupType: "Instance",
vpcId: defaultNetwork.id,
scheduler: "Wrr",
protocol: "TCP",
connectionDrainEnabled: true,
connectionDrainTimeout: 60,
addressIpVersion: "Ipv4",
healthCheck: {
healthCheckEnabled: true,
healthCheckType: "TCP",
healthCheckConnectPort: 0,
healthyThreshold: 2,
unhealthyThreshold: 2,
healthCheckConnectTimeout: 5,
healthCheckInterval: 10,
httpCheckMethod: "GET",
healthCheckHttpCodes: [
"http_2xx",
"http_3xx",
"http_4xx",
],
},
tags: {
Created: "TF",
For: "example",
},
});
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_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="10.4.0.0/16")
default_server_group = alicloud.nlb.ServerGroup("default",
resource_group_id=default.ids[0],
server_group_name=name,
server_group_type="Instance",
vpc_id=default_network.id,
scheduler="Wrr",
protocol="TCP",
connection_drain_enabled=True,
connection_drain_timeout=60,
address_ip_version="Ipv4",
health_check={
"health_check_enabled": True,
"health_check_type": "TCP",
"health_check_connect_port": 0,
"healthy_threshold": 2,
"unhealthy_threshold": 2,
"health_check_connect_timeout": 5,
"health_check_interval": 10,
"http_check_method": "GET",
"health_check_http_codes": [
"http_2xx",
"http_3xx",
"http_4xx",
],
},
tags={
"Created": "TF",
"For": "example",
})
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
}
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
}
_, err = nlb.NewServerGroup(ctx, "default", &nlb.ServerGroupArgs{
ResourceGroupId: pulumi.String(_default.Ids[0]),
ServerGroupName: pulumi.String(name),
ServerGroupType: pulumi.String("Instance"),
VpcId: defaultNetwork.ID(),
Scheduler: pulumi.String("Wrr"),
Protocol: pulumi.String("TCP"),
ConnectionDrainEnabled: pulumi.Bool(true),
ConnectionDrainTimeout: pulumi.Int(60),
AddressIpVersion: pulumi.String("Ipv4"),
HealthCheck: &nlb.ServerGroupHealthCheckArgs{
HealthCheckEnabled: pulumi.Bool(true),
HealthCheckType: pulumi.String("TCP"),
HealthCheckConnectPort: pulumi.Int(0),
HealthyThreshold: pulumi.Int(2),
UnhealthyThreshold: pulumi.Int(2),
HealthCheckConnectTimeout: pulumi.Int(5),
HealthCheckInterval: pulumi.Int(10),
HttpCheckMethod: pulumi.String("GET"),
HealthCheckHttpCodes: pulumi.StringArray{
pulumi.String("http_2xx"),
pulumi.String("http_3xx"),
pulumi.String("http_4xx"),
},
},
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
"For": pulumi.String("example"),
},
})
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 defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "10.4.0.0/16",
});
var defaultServerGroup = new AliCloud.Nlb.ServerGroup("default", new()
{
ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
ServerGroupName = name,
ServerGroupType = "Instance",
VpcId = defaultNetwork.Id,
Scheduler = "Wrr",
Protocol = "TCP",
ConnectionDrainEnabled = true,
ConnectionDrainTimeout = 60,
AddressIpVersion = "Ipv4",
HealthCheck = new AliCloud.Nlb.Inputs.ServerGroupHealthCheckArgs
{
HealthCheckEnabled = true,
HealthCheckType = "TCP",
HealthCheckConnectPort = 0,
HealthyThreshold = 2,
UnhealthyThreshold = 2,
HealthCheckConnectTimeout = 5,
HealthCheckInterval = 10,
HttpCheckMethod = "GET",
HealthCheckHttpCodes = new[]
{
"http_2xx",
"http_3xx",
"http_4xx",
},
},
Tags =
{
{ "Created", "TF" },
{ "For", "example" },
},
});
});
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.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.nlb.ServerGroup;
import com.pulumi.alicloud.nlb.ServerGroupArgs;
import com.pulumi.alicloud.nlb.inputs.ServerGroupHealthCheckArgs;
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();
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultServerGroup = new ServerGroup("defaultServerGroup", ServerGroupArgs.builder()
.resourceGroupId(default_.ids()[0])
.serverGroupName(name)
.serverGroupType("Instance")
.vpcId(defaultNetwork.id())
.scheduler("Wrr")
.protocol("TCP")
.connectionDrainEnabled(true)
.connectionDrainTimeout(60)
.addressIpVersion("Ipv4")
.healthCheck(ServerGroupHealthCheckArgs.builder()
.healthCheckEnabled(true)
.healthCheckType("TCP")
.healthCheckConnectPort(0)
.healthyThreshold(2)
.unhealthyThreshold(2)
.healthCheckConnectTimeout(5)
.healthCheckInterval(10)
.httpCheckMethod("GET")
.healthCheckHttpCodes(
"http_2xx",
"http_3xx",
"http_4xx")
.build())
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "example")
))
.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
defaultServerGroup:
type: alicloud:nlb:ServerGroup
name: default
properties:
resourceGroupId: ${default.ids[0]}
serverGroupName: ${name}
serverGroupType: Instance
vpcId: ${defaultNetwork.id}
scheduler: Wrr
protocol: TCP
connectionDrainEnabled: true
connectionDrainTimeout: 60
addressIpVersion: Ipv4
healthCheck:
healthCheckEnabled: true
healthCheckType: TCP
healthCheckConnectPort: 0
healthyThreshold: 2
unhealthyThreshold: 2
healthCheckConnectTimeout: 5
healthCheckInterval: 10
httpCheckMethod: GET
healthCheckHttpCodes:
- http_2xx
- http_3xx
- http_4xx
tags:
Created: TF
For: example
variables:
default:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments: {}
Create ServerGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerGroup(name: string, args: ServerGroupArgs, opts?: CustomResourceOptions);
@overload
def ServerGroup(resource_name: str,
args: ServerGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
server_group_name: Optional[str] = None,
vpc_id: Optional[str] = None,
preserve_client_ip_enabled: Optional[bool] = None,
connection_drain_enabled: Optional[bool] = None,
connection_drain_timeout: Optional[int] = None,
health_check: Optional[ServerGroupHealthCheckArgs] = None,
address_ip_version: Optional[str] = None,
protocol: Optional[str] = None,
resource_group_id: Optional[str] = None,
scheduler: Optional[str] = None,
connection_drain: Optional[bool] = None,
server_group_type: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
any_port_enabled: Optional[bool] = None)
func NewServerGroup(ctx *Context, name string, args ServerGroupArgs, opts ...ResourceOption) (*ServerGroup, error)
public ServerGroup(string name, ServerGroupArgs args, CustomResourceOptions? opts = null)
public ServerGroup(String name, ServerGroupArgs args)
public ServerGroup(String name, ServerGroupArgs args, CustomResourceOptions options)
type: alicloud:nlb:ServerGroup
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 ServerGroupArgs
- 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 ServerGroupArgs
- 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 ServerGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerGroupArgs
- 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 exampleserverGroupResourceResourceFromNlbserverGroup = new AliCloud.Nlb.ServerGroup("exampleserverGroupResourceResourceFromNlbserverGroup", new()
{
ServerGroupName = "string",
VpcId = "string",
PreserveClientIpEnabled = false,
ConnectionDrainEnabled = false,
ConnectionDrainTimeout = 0,
HealthCheck = new AliCloud.Nlb.Inputs.ServerGroupHealthCheckArgs
{
HealthCheckConnectPort = 0,
HealthCheckConnectTimeout = 0,
HealthCheckDomain = "string",
HealthCheckEnabled = false,
HealthCheckHttpCodes = new[]
{
"string",
},
HealthCheckInterval = 0,
HealthCheckType = "string",
HealthCheckUrl = "string",
HealthyThreshold = 0,
HttpCheckMethod = "string",
UnhealthyThreshold = 0,
},
AddressIpVersion = "string",
Protocol = "string",
ResourceGroupId = "string",
Scheduler = "string",
ServerGroupType = "string",
Tags =
{
{ "string", "string" },
},
AnyPortEnabled = false,
});
example, err := nlb.NewServerGroup(ctx, "exampleserverGroupResourceResourceFromNlbserverGroup", &nlb.ServerGroupArgs{
ServerGroupName: pulumi.String("string"),
VpcId: pulumi.String("string"),
PreserveClientIpEnabled: pulumi.Bool(false),
ConnectionDrainEnabled: pulumi.Bool(false),
ConnectionDrainTimeout: pulumi.Int(0),
HealthCheck: &nlb.ServerGroupHealthCheckArgs{
HealthCheckConnectPort: pulumi.Int(0),
HealthCheckConnectTimeout: pulumi.Int(0),
HealthCheckDomain: pulumi.String("string"),
HealthCheckEnabled: pulumi.Bool(false),
HealthCheckHttpCodes: pulumi.StringArray{
pulumi.String("string"),
},
HealthCheckInterval: pulumi.Int(0),
HealthCheckType: pulumi.String("string"),
HealthCheckUrl: pulumi.String("string"),
HealthyThreshold: pulumi.Int(0),
HttpCheckMethod: pulumi.String("string"),
UnhealthyThreshold: pulumi.Int(0),
},
AddressIpVersion: pulumi.String("string"),
Protocol: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
Scheduler: pulumi.String("string"),
ServerGroupType: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
AnyPortEnabled: pulumi.Bool(false),
})
var exampleserverGroupResourceResourceFromNlbserverGroup = new ServerGroup("exampleserverGroupResourceResourceFromNlbserverGroup", ServerGroupArgs.builder()
.serverGroupName("string")
.vpcId("string")
.preserveClientIpEnabled(false)
.connectionDrainEnabled(false)
.connectionDrainTimeout(0)
.healthCheck(ServerGroupHealthCheckArgs.builder()
.healthCheckConnectPort(0)
.healthCheckConnectTimeout(0)
.healthCheckDomain("string")
.healthCheckEnabled(false)
.healthCheckHttpCodes("string")
.healthCheckInterval(0)
.healthCheckType("string")
.healthCheckUrl("string")
.healthyThreshold(0)
.httpCheckMethod("string")
.unhealthyThreshold(0)
.build())
.addressIpVersion("string")
.protocol("string")
.resourceGroupId("string")
.scheduler("string")
.serverGroupType("string")
.tags(Map.of("string", "string"))
.anyPortEnabled(false)
.build());
exampleserver_group_resource_resource_from_nlbserver_group = alicloud.nlb.ServerGroup("exampleserverGroupResourceResourceFromNlbserverGroup",
server_group_name="string",
vpc_id="string",
preserve_client_ip_enabled=False,
connection_drain_enabled=False,
connection_drain_timeout=0,
health_check={
"health_check_connect_port": 0,
"health_check_connect_timeout": 0,
"health_check_domain": "string",
"health_check_enabled": False,
"health_check_http_codes": ["string"],
"health_check_interval": 0,
"health_check_type": "string",
"health_check_url": "string",
"healthy_threshold": 0,
"http_check_method": "string",
"unhealthy_threshold": 0,
},
address_ip_version="string",
protocol="string",
resource_group_id="string",
scheduler="string",
server_group_type="string",
tags={
"string": "string",
},
any_port_enabled=False)
const exampleserverGroupResourceResourceFromNlbserverGroup = new alicloud.nlb.ServerGroup("exampleserverGroupResourceResourceFromNlbserverGroup", {
serverGroupName: "string",
vpcId: "string",
preserveClientIpEnabled: false,
connectionDrainEnabled: false,
connectionDrainTimeout: 0,
healthCheck: {
healthCheckConnectPort: 0,
healthCheckConnectTimeout: 0,
healthCheckDomain: "string",
healthCheckEnabled: false,
healthCheckHttpCodes: ["string"],
healthCheckInterval: 0,
healthCheckType: "string",
healthCheckUrl: "string",
healthyThreshold: 0,
httpCheckMethod: "string",
unhealthyThreshold: 0,
},
addressIpVersion: "string",
protocol: "string",
resourceGroupId: "string",
scheduler: "string",
serverGroupType: "string",
tags: {
string: "string",
},
anyPortEnabled: false,
});
type: alicloud:nlb:ServerGroup
properties:
addressIpVersion: string
anyPortEnabled: false
connectionDrainEnabled: false
connectionDrainTimeout: 0
healthCheck:
healthCheckConnectPort: 0
healthCheckConnectTimeout: 0
healthCheckDomain: string
healthCheckEnabled: false
healthCheckHttpCodes:
- string
healthCheckInterval: 0
healthCheckType: string
healthCheckUrl: string
healthyThreshold: 0
httpCheckMethod: string
unhealthyThreshold: 0
preserveClientIpEnabled: false
protocol: string
resourceGroupId: string
scheduler: string
serverGroupName: string
serverGroupType: string
tags:
string: string
vpcId: string
ServerGroup 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 ServerGroup resource accepts the following input properties:
- Server
Group stringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Vpc
Id string The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- Address
Ip stringVersion - The protocol version. Valid values:
- Any
Port boolEnabled - Specifies whether to enable all-port forwarding. Valid values:
- Connection
Drain bool - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- Connection
Drain boolEnabled - Specifies whether to enable connection draining. Valid values:
- Connection
Drain intTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - Health
Check Pulumi.Ali Cloud. Nlb. Inputs. Server Group Health Check - Health check configuration information. See
health_check
below. - Preserve
Client boolIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- Protocol string
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- Resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- Scheduler string
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- Server
Group stringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- Dictionary<string, string>
- Label.
- Server
Group stringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Vpc
Id string The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- Address
Ip stringVersion - The protocol version. Valid values:
- Any
Port boolEnabled - Specifies whether to enable all-port forwarding. Valid values:
- Connection
Drain bool - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- Connection
Drain boolEnabled - Specifies whether to enable connection draining. Valid values:
- Connection
Drain intTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - Health
Check ServerGroup Health Check Args - Health check configuration information. See
health_check
below. - Preserve
Client boolIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- Protocol string
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- Resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- Scheduler string
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- Server
Group stringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- map[string]string
- Label.
- server
Group StringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- vpc
Id String The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- address
Ip StringVersion - The protocol version. Valid values:
- any
Port BooleanEnabled - Specifies whether to enable all-port forwarding. Valid values:
- connection
Drain Boolean - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- connection
Drain BooleanEnabled - Specifies whether to enable connection draining. Valid values:
- connection
Drain IntegerTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - health
Check ServerGroup Health Check - Health check configuration information. See
health_check
below. - preserve
Client BooleanIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- protocol String
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- resource
Group StringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- scheduler String
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- server
Group StringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- Map<String,String>
- Label.
- server
Group stringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- vpc
Id string The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- address
Ip stringVersion - The protocol version. Valid values:
- any
Port booleanEnabled - Specifies whether to enable all-port forwarding. Valid values:
- connection
Drain boolean - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- connection
Drain booleanEnabled - Specifies whether to enable connection draining. Valid values:
- connection
Drain numberTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - health
Check ServerGroup Health Check - Health check configuration information. See
health_check
below. - preserve
Client booleanIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- protocol string
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- scheduler string
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- server
Group stringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- {[key: string]: string}
- Label.
- server_
group_ strname The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- vpc_
id str The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- address_
ip_ strversion - The protocol version. Valid values:
- any_
port_ boolenabled - Specifies whether to enable all-port forwarding. Valid values:
- connection_
drain bool - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- connection_
drain_ boolenabled - Specifies whether to enable connection draining. Valid values:
- connection_
drain_ inttimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - health_
check ServerGroup Health Check Args - Health check configuration information. See
health_check
below. - preserve_
client_ boolip_ enabled - Specifies whether to enable client IP preservation. Valid values:
- protocol str
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- resource_
group_ strid The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- scheduler str
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- server_
group_ strtype - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- Mapping[str, str]
- Label.
- server
Group StringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- vpc
Id String The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- address
Ip StringVersion - The protocol version. Valid values:
- any
Port BooleanEnabled - Specifies whether to enable all-port forwarding. Valid values:
- connection
Drain Boolean - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- connection
Drain BooleanEnabled - Specifies whether to enable connection draining. Valid values:
- connection
Drain NumberTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - health
Check Property Map - Health check configuration information. See
health_check
below. - preserve
Client BooleanIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- protocol String
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- resource
Group StringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- scheduler String
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- server
Group StringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- Map<String>
- Label.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerGroup resource produces the following output properties:
Look up Existing ServerGroup Resource
Get an existing ServerGroup 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?: ServerGroupState, opts?: CustomResourceOptions): ServerGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address_ip_version: Optional[str] = None,
any_port_enabled: Optional[bool] = None,
connection_drain: Optional[bool] = None,
connection_drain_enabled: Optional[bool] = None,
connection_drain_timeout: Optional[int] = None,
health_check: Optional[ServerGroupHealthCheckArgs] = None,
preserve_client_ip_enabled: Optional[bool] = None,
protocol: Optional[str] = None,
resource_group_id: Optional[str] = None,
scheduler: Optional[str] = None,
server_group_name: Optional[str] = None,
server_group_type: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None) -> ServerGroup
func GetServerGroup(ctx *Context, name string, id IDInput, state *ServerGroupState, opts ...ResourceOption) (*ServerGroup, error)
public static ServerGroup Get(string name, Input<string> id, ServerGroupState? state, CustomResourceOptions? opts = null)
public static ServerGroup get(String name, Output<String> id, ServerGroupState 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:
- Any
Port boolEnabled - Specifies whether to enable all-port forwarding. Valid values:
- Connection
Drain bool - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- Connection
Drain boolEnabled - Specifies whether to enable connection draining. Valid values:
- Connection
Drain intTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - Health
Check Pulumi.Ali Cloud. Nlb. Inputs. Server Group Health Check - Health check configuration information. See
health_check
below. - Preserve
Client boolIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- Protocol string
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- Resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- Scheduler string
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- Server
Group stringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Server
Group stringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- Status string
- Server group status. Value:
- Dictionary<string, string>
- Label.
- Vpc
Id string The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- Address
Ip stringVersion - The protocol version. Valid values:
- Any
Port boolEnabled - Specifies whether to enable all-port forwarding. Valid values:
- Connection
Drain bool - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- Connection
Drain boolEnabled - Specifies whether to enable connection draining. Valid values:
- Connection
Drain intTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - Health
Check ServerGroup Health Check Args - Health check configuration information. See
health_check
below. - Preserve
Client boolIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- Protocol string
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- Resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- Scheduler string
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- Server
Group stringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Server
Group stringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- Status string
- Server group status. Value:
- map[string]string
- Label.
- Vpc
Id string The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- address
Ip StringVersion - The protocol version. Valid values:
- any
Port BooleanEnabled - Specifies whether to enable all-port forwarding. Valid values:
- connection
Drain Boolean - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- connection
Drain BooleanEnabled - Specifies whether to enable connection draining. Valid values:
- connection
Drain IntegerTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - health
Check ServerGroup Health Check - Health check configuration information. See
health_check
below. - preserve
Client BooleanIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- protocol String
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- resource
Group StringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- scheduler String
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- server
Group StringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- server
Group StringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- status String
- Server group status. Value:
- Map<String,String>
- Label.
- vpc
Id String The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- address
Ip stringVersion - The protocol version. Valid values:
- any
Port booleanEnabled - Specifies whether to enable all-port forwarding. Valid values:
- connection
Drain boolean - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- connection
Drain booleanEnabled - Specifies whether to enable connection draining. Valid values:
- connection
Drain numberTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - health
Check ServerGroup Health Check - Health check configuration information. See
health_check
below. - preserve
Client booleanIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- protocol string
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- resource
Group stringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- scheduler string
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- server
Group stringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- server
Group stringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- status string
- Server group status. Value:
- {[key: string]: string}
- Label.
- vpc
Id string The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- address_
ip_ strversion - The protocol version. Valid values:
- any_
port_ boolenabled - Specifies whether to enable all-port forwarding. Valid values:
- connection_
drain bool - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- connection_
drain_ boolenabled - Specifies whether to enable connection draining. Valid values:
- connection_
drain_ inttimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - health_
check ServerGroup Health Check Args - Health check configuration information. See
health_check
below. - preserve_
client_ boolip_ enabled - Specifies whether to enable client IP preservation. Valid values:
- protocol str
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- resource_
group_ strid The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- scheduler str
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- server_
group_ strname The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- server_
group_ strtype - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- status str
- Server group status. Value:
- Mapping[str, str]
- Label.
- vpc_
id str The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
- address
Ip StringVersion - The protocol version. Valid values:
- any
Port BooleanEnabled - Specifies whether to enable all-port forwarding. Valid values:
- connection
Drain Boolean - . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.
- connection
Drain BooleanEnabled - Specifies whether to enable connection draining. Valid values:
- connection
Drain NumberTimeout - The timeout period of connection draining. Unit: seconds. Valid values:
10
to900
. - health
Check Property Map - Health check configuration information. See
health_check
below. - preserve
Client BooleanIp Enabled - Specifies whether to enable client IP preservation. Valid values:
- protocol String
- The protocol used to forward requests to the backend servers. Valid values:
TCP
(default)UDP
TCPSSL
- resource
Group StringId The ID of the new resource group.
You can log on to the Resource Management console to view resource group IDs.
- scheduler String
- The scheduling algorithm. Valid values:
- Wrr: The weighted round-robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights. This is the default value.
- rr: The round-robin algorithm is used. Requests are forwarded to backend servers in sequence.
- sch: Source IP hashing is used. Requests from the same source IP address are forwarded to the same backend server.
- tch: Four-element hashing is used. It specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are forwarded to the same backend server.
- server
Group StringName The new name of the server group.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- server
Group StringType - The type of server group. Valid values:
Instance
: allows you to add servers of theEcs
,Eni
, orEci
type. This is the default value.Ip
: allows you to add servers by specifying IP addresses.
- status String
- Server group status. Value:
- Map<String>
- Label.
- vpc
Id String The ID of the virtual private cloud (VPC) to which the server group belongs.
NOTE: If
ServerGroupType
is set toInstance
, only servers in the specified VPC can be added to the server group.The following arguments will be discarded. Please use new fields as soon as possible:
Supporting Types
ServerGroupHealthCheck, ServerGroupHealthCheckArgs
- Health
Check intConnect Port The port that you want to use for health checks on backend servers.
Valid values:
0
to65535
.Default value:
0
. If you set the value to 0, the port of the backend server is used for health checks.- Health
Check intConnect Timeout - The maximum timeout period of a health check. Unit: seconds. Valid values:
1
to300
. Default value:5
. - Health
Check stringDomain - The domain name that you want to use for health checks. Valid values:
$SERVER_IP
: the private IP address of a backend server.
- Health
Check boolEnabled - Specifies whether to enable the health check feature. Valid values:
- Health
Check List<string>Http Codes The HTTP status codes to return for health checks. Separate multiple HTTP status codes with commas (,). Valid values:
http\_2xx
(default),http\_3xx
,http\_4xx
, andhttp\_5xx
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- Health
Check intInterval The interval at which health checks are performed. Unit: seconds.
Valid values:
5
to50
.Default value:
10
.- Health
Check stringType - The protocol that you want to use for health checks. Valid values:
TCP
(default) andHTTP
. - Health
Check stringUrl The path to which health check requests are sent.
The path must be 1 to 80 characters in length, and can contain only letters, digits, and the following special characters:
- / . % ? # & =
. It can also contain the following extended characters:_ ; ~ ! ( ) * [ ] @ $ ^ : ' , +
. The path must start with a forward slash (/).NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- Healthy
Threshold int The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status changes from
fail
tosuccess
.Valid values:
2
to10
.Default value:
2
.- Http
Check stringMethod The HTTP method that is used for health checks. Valid values:
GET
(default) andHEAD
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- Unhealthy
Threshold int The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status changes from
success
tofail
.Valid values:
2
to10
.Default value:
2
.
- Health
Check intConnect Port The port that you want to use for health checks on backend servers.
Valid values:
0
to65535
.Default value:
0
. If you set the value to 0, the port of the backend server is used for health checks.- Health
Check intConnect Timeout - The maximum timeout period of a health check. Unit: seconds. Valid values:
1
to300
. Default value:5
. - Health
Check stringDomain - The domain name that you want to use for health checks. Valid values:
$SERVER_IP
: the private IP address of a backend server.
- Health
Check boolEnabled - Specifies whether to enable the health check feature. Valid values:
- Health
Check []stringHttp Codes The HTTP status codes to return for health checks. Separate multiple HTTP status codes with commas (,). Valid values:
http\_2xx
(default),http\_3xx
,http\_4xx
, andhttp\_5xx
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- Health
Check intInterval The interval at which health checks are performed. Unit: seconds.
Valid values:
5
to50
.Default value:
10
.- Health
Check stringType - The protocol that you want to use for health checks. Valid values:
TCP
(default) andHTTP
. - Health
Check stringUrl The path to which health check requests are sent.
The path must be 1 to 80 characters in length, and can contain only letters, digits, and the following special characters:
- / . % ? # & =
. It can also contain the following extended characters:_ ; ~ ! ( ) * [ ] @ $ ^ : ' , +
. The path must start with a forward slash (/).NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- Healthy
Threshold int The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status changes from
fail
tosuccess
.Valid values:
2
to10
.Default value:
2
.- Http
Check stringMethod The HTTP method that is used for health checks. Valid values:
GET
(default) andHEAD
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- Unhealthy
Threshold int The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status changes from
success
tofail
.Valid values:
2
to10
.Default value:
2
.
- health
Check IntegerConnect Port The port that you want to use for health checks on backend servers.
Valid values:
0
to65535
.Default value:
0
. If you set the value to 0, the port of the backend server is used for health checks.- health
Check IntegerConnect Timeout - The maximum timeout period of a health check. Unit: seconds. Valid values:
1
to300
. Default value:5
. - health
Check StringDomain - The domain name that you want to use for health checks. Valid values:
$SERVER_IP
: the private IP address of a backend server.
- health
Check BooleanEnabled - Specifies whether to enable the health check feature. Valid values:
- health
Check List<String>Http Codes The HTTP status codes to return for health checks. Separate multiple HTTP status codes with commas (,). Valid values:
http\_2xx
(default),http\_3xx
,http\_4xx
, andhttp\_5xx
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- health
Check IntegerInterval The interval at which health checks are performed. Unit: seconds.
Valid values:
5
to50
.Default value:
10
.- health
Check StringType - The protocol that you want to use for health checks. Valid values:
TCP
(default) andHTTP
. - health
Check StringUrl The path to which health check requests are sent.
The path must be 1 to 80 characters in length, and can contain only letters, digits, and the following special characters:
- / . % ? # & =
. It can also contain the following extended characters:_ ; ~ ! ( ) * [ ] @ $ ^ : ' , +
. The path must start with a forward slash (/).NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- healthy
Threshold Integer The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status changes from
fail
tosuccess
.Valid values:
2
to10
.Default value:
2
.- http
Check StringMethod The HTTP method that is used for health checks. Valid values:
GET
(default) andHEAD
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- unhealthy
Threshold Integer The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status changes from
success
tofail
.Valid values:
2
to10
.Default value:
2
.
- health
Check numberConnect Port The port that you want to use for health checks on backend servers.
Valid values:
0
to65535
.Default value:
0
. If you set the value to 0, the port of the backend server is used for health checks.- health
Check numberConnect Timeout - The maximum timeout period of a health check. Unit: seconds. Valid values:
1
to300
. Default value:5
. - health
Check stringDomain - The domain name that you want to use for health checks. Valid values:
$SERVER_IP
: the private IP address of a backend server.
- health
Check booleanEnabled - Specifies whether to enable the health check feature. Valid values:
- health
Check string[]Http Codes The HTTP status codes to return for health checks. Separate multiple HTTP status codes with commas (,). Valid values:
http\_2xx
(default),http\_3xx
,http\_4xx
, andhttp\_5xx
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- health
Check numberInterval The interval at which health checks are performed. Unit: seconds.
Valid values:
5
to50
.Default value:
10
.- health
Check stringType - The protocol that you want to use for health checks. Valid values:
TCP
(default) andHTTP
. - health
Check stringUrl The path to which health check requests are sent.
The path must be 1 to 80 characters in length, and can contain only letters, digits, and the following special characters:
- / . % ? # & =
. It can also contain the following extended characters:_ ; ~ ! ( ) * [ ] @ $ ^ : ' , +
. The path must start with a forward slash (/).NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- healthy
Threshold number The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status changes from
fail
tosuccess
.Valid values:
2
to10
.Default value:
2
.- http
Check stringMethod The HTTP method that is used for health checks. Valid values:
GET
(default) andHEAD
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- unhealthy
Threshold number The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status changes from
success
tofail
.Valid values:
2
to10
.Default value:
2
.
- health_
check_ intconnect_ port The port that you want to use for health checks on backend servers.
Valid values:
0
to65535
.Default value:
0
. If you set the value to 0, the port of the backend server is used for health checks.- health_
check_ intconnect_ timeout - The maximum timeout period of a health check. Unit: seconds. Valid values:
1
to300
. Default value:5
. - health_
check_ strdomain - The domain name that you want to use for health checks. Valid values:
$SERVER_IP
: the private IP address of a backend server.
- health_
check_ boolenabled - Specifies whether to enable the health check feature. Valid values:
- health_
check_ Sequence[str]http_ codes The HTTP status codes to return for health checks. Separate multiple HTTP status codes with commas (,). Valid values:
http\_2xx
(default),http\_3xx
,http\_4xx
, andhttp\_5xx
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- health_
check_ intinterval The interval at which health checks are performed. Unit: seconds.
Valid values:
5
to50
.Default value:
10
.- health_
check_ strtype - The protocol that you want to use for health checks. Valid values:
TCP
(default) andHTTP
. - health_
check_ strurl The path to which health check requests are sent.
The path must be 1 to 80 characters in length, and can contain only letters, digits, and the following special characters:
- / . % ? # & =
. It can also contain the following extended characters:_ ; ~ ! ( ) * [ ] @ $ ^ : ' , +
. The path must start with a forward slash (/).NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- healthy_
threshold int The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status changes from
fail
tosuccess
.Valid values:
2
to10
.Default value:
2
.- http_
check_ strmethod The HTTP method that is used for health checks. Valid values:
GET
(default) andHEAD
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- unhealthy_
threshold int The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status changes from
success
tofail
.Valid values:
2
to10
.Default value:
2
.
- health
Check NumberConnect Port The port that you want to use for health checks on backend servers.
Valid values:
0
to65535
.Default value:
0
. If you set the value to 0, the port of the backend server is used for health checks.- health
Check NumberConnect Timeout - The maximum timeout period of a health check. Unit: seconds. Valid values:
1
to300
. Default value:5
. - health
Check StringDomain - The domain name that you want to use for health checks. Valid values:
$SERVER_IP
: the private IP address of a backend server.
- health
Check BooleanEnabled - Specifies whether to enable the health check feature. Valid values:
- health
Check List<String>Http Codes The HTTP status codes to return for health checks. Separate multiple HTTP status codes with commas (,). Valid values:
http\_2xx
(default),http\_3xx
,http\_4xx
, andhttp\_5xx
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- health
Check NumberInterval The interval at which health checks are performed. Unit: seconds.
Valid values:
5
to50
.Default value:
10
.- health
Check StringType - The protocol that you want to use for health checks. Valid values:
TCP
(default) andHTTP
. - health
Check StringUrl The path to which health check requests are sent.
The path must be 1 to 80 characters in length, and can contain only letters, digits, and the following special characters:
- / . % ? # & =
. It can also contain the following extended characters:_ ; ~ ! ( ) * [ ] @ $ ^ : ' , +
. The path must start with a forward slash (/).NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- healthy
Threshold Number The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status changes from
fail
tosuccess
.Valid values:
2
to10
.Default value:
2
.- http
Check StringMethod The HTTP method that is used for health checks. Valid values:
GET
(default) andHEAD
.NOTE: This parameter takes effect only when
HealthCheckType
is set toHTTP
.- unhealthy
Threshold Number The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status changes from
success
tofail
.Valid values:
2
to10
.Default value:
2
.
Import
NLB Server Group can be imported using the id, e.g.
$ pulumi import alicloud:nlb/serverGroup:ServerGroup 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.