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

alicloud.nlb.ServerGroup

Explore with Pulumi AI

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

    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:

    ServerGroupName string

    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.

    VpcId string

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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:

    AddressIpVersion string
    The protocol version. Valid values:
    AnyPortEnabled bool
    Specifies whether to enable all-port forwarding. Valid values:
    ConnectionDrain bool
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    ConnectionDrainEnabled bool
    Specifies whether to enable connection draining. Valid values:
    ConnectionDrainTimeout int
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    HealthCheck Pulumi.AliCloud.Nlb.Inputs.ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    PreserveClientIpEnabled bool
    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
    ResourceGroupId string

    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.
    ServerGroupType string
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    Tags Dictionary<string, string>
    Label.
    ServerGroupName string

    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.

    VpcId string

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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:

    AddressIpVersion string
    The protocol version. Valid values:
    AnyPortEnabled bool
    Specifies whether to enable all-port forwarding. Valid values:
    ConnectionDrain bool
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    ConnectionDrainEnabled bool
    Specifies whether to enable connection draining. Valid values:
    ConnectionDrainTimeout int
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    HealthCheck ServerGroupHealthCheckArgs
    Health check configuration information. See health_check below.
    PreserveClientIpEnabled bool
    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
    ResourceGroupId string

    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.
    ServerGroupType string
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    Tags map[string]string
    Label.
    serverGroupName String

    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.

    vpcId String

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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:

    addressIpVersion String
    The protocol version. Valid values:
    anyPortEnabled Boolean
    Specifies whether to enable all-port forwarding. Valid values:
    connectionDrain Boolean
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    connectionDrainEnabled Boolean
    Specifies whether to enable connection draining. Valid values:
    connectionDrainTimeout Integer
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    healthCheck ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    preserveClientIpEnabled Boolean
    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
    resourceGroupId String

    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.
    serverGroupType String
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    tags Map<String,String>
    Label.
    serverGroupName string

    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.

    vpcId string

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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:

    addressIpVersion string
    The protocol version. Valid values:
    anyPortEnabled boolean
    Specifies whether to enable all-port forwarding. Valid values:
    connectionDrain boolean
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    connectionDrainEnabled boolean
    Specifies whether to enable connection draining. Valid values:
    connectionDrainTimeout number
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    healthCheck ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    preserveClientIpEnabled boolean
    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
    resourceGroupId string

    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.
    serverGroupType string
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    tags {[key: string]: string}
    Label.
    server_group_name str

    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 to Instance, 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_version str
    The protocol version. Valid values:
    any_port_enabled bool
    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.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    connection_drain_enabled bool
    Specifies whether to enable connection draining. Valid values:
    connection_drain_timeout int
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    health_check ServerGroupHealthCheckArgs
    Health check configuration information. See health_check below.
    preserve_client_ip_enabled bool
    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_id str

    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_type str
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    tags Mapping[str, str]
    Label.
    serverGroupName String

    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.

    vpcId String

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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:

    addressIpVersion String
    The protocol version. Valid values:
    anyPortEnabled Boolean
    Specifies whether to enable all-port forwarding. Valid values:
    connectionDrain Boolean
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    connectionDrainEnabled Boolean
    Specifies whether to enable connection draining. Valid values:
    connectionDrainTimeout Number
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    healthCheck Property Map
    Health check configuration information. See health_check below.
    preserveClientIpEnabled Boolean
    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
    resourceGroupId String

    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.
    serverGroupType String
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    tags Map<String>
    Label.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Server group status. Value:
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Server group status. Value:
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Server group status. Value:
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Server group status. Value:
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Server group status. Value:
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Server group status. Value:

    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.
    The following state arguments are supported:
    AddressIpVersion string
    The protocol version. Valid values:
    AnyPortEnabled bool
    Specifies whether to enable all-port forwarding. Valid values:
    ConnectionDrain bool
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    ConnectionDrainEnabled bool
    Specifies whether to enable connection draining. Valid values:
    ConnectionDrainTimeout int
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    HealthCheck Pulumi.AliCloud.Nlb.Inputs.ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    PreserveClientIpEnabled bool
    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
    ResourceGroupId string

    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.
    ServerGroupName string

    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.

    ServerGroupType string
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    Status string
    Server group status. Value:
    Tags Dictionary<string, string>
    Label.
    VpcId string

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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:

    AddressIpVersion string
    The protocol version. Valid values:
    AnyPortEnabled bool
    Specifies whether to enable all-port forwarding. Valid values:
    ConnectionDrain bool
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    ConnectionDrainEnabled bool
    Specifies whether to enable connection draining. Valid values:
    ConnectionDrainTimeout int
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    HealthCheck ServerGroupHealthCheckArgs
    Health check configuration information. See health_check below.
    PreserveClientIpEnabled bool
    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
    ResourceGroupId string

    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.
    ServerGroupName string

    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.

    ServerGroupType string
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    Status string
    Server group status. Value:
    Tags map[string]string
    Label.
    VpcId string

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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:

    addressIpVersion String
    The protocol version. Valid values:
    anyPortEnabled Boolean
    Specifies whether to enable all-port forwarding. Valid values:
    connectionDrain Boolean
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    connectionDrainEnabled Boolean
    Specifies whether to enable connection draining. Valid values:
    connectionDrainTimeout Integer
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    healthCheck ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    preserveClientIpEnabled Boolean
    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
    resourceGroupId String

    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.
    serverGroupName String

    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.

    serverGroupType String
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    status String
    Server group status. Value:
    tags Map<String,String>
    Label.
    vpcId String

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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:

    addressIpVersion string
    The protocol version. Valid values:
    anyPortEnabled boolean
    Specifies whether to enable all-port forwarding. Valid values:
    connectionDrain boolean
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    connectionDrainEnabled boolean
    Specifies whether to enable connection draining. Valid values:
    connectionDrainTimeout number
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    healthCheck ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    preserveClientIpEnabled boolean
    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
    resourceGroupId string

    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.
    serverGroupName string

    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.

    serverGroupType string
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    status string
    Server group status. Value:
    tags {[key: string]: string}
    Label.
    vpcId string

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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_version str
    The protocol version. Valid values:
    any_port_enabled bool
    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.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    connection_drain_enabled bool
    Specifies whether to enable connection draining. Valid values:
    connection_drain_timeout int
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    health_check ServerGroupHealthCheckArgs
    Health check configuration information. See health_check below.
    preserve_client_ip_enabled bool
    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_id str

    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_name str

    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_type str
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    status str
    Server group status. Value:
    tags 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 to Instance, 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:

    addressIpVersion String
    The protocol version. Valid values:
    anyPortEnabled Boolean
    Specifies whether to enable all-port forwarding. Valid values:
    connectionDrain Boolean
    . Field 'connection_drain' has been deprecated from provider version 1.231.0. New field 'connection_drain_enabled' instead.

    Deprecated: Field 'connection_drain' has been deprecated since provider version 1.214.0. New field 'connection_drain_enabled' instead.

    connectionDrainEnabled Boolean
    Specifies whether to enable connection draining. Valid values:
    connectionDrainTimeout Number
    The timeout period of connection draining. Unit: seconds. Valid values: 10 to 900.
    healthCheck Property Map
    Health check configuration information. See health_check below.
    preserveClientIpEnabled Boolean
    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
    resourceGroupId String

    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.
    serverGroupName String

    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.

    serverGroupType String
    The type of server group. Valid values:

    • Instance: allows you to add servers of the Ecs, Eni, or Eci type. This is the default value.
    • Ip: allows you to add servers by specifying IP addresses.
    status String
    Server group status. Value:
    tags Map<String>
    Label.
    vpcId String

    The ID of the virtual private cloud (VPC) to which the server group belongs.

    NOTE: If ServerGroupType is set to Instance, 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

    HealthCheckConnectPort int

    The port that you want to use for health checks on backend servers.

    Valid values: 0 to 65535.

    Default value: 0. If you set the value to 0, the port of the backend server is used for health checks.

    HealthCheckConnectTimeout int
    The maximum timeout period of a health check. Unit: seconds. Valid values: 1 to 300. Default value: 5.
    HealthCheckDomain string
    The domain name that you want to use for health checks. Valid values:

    • $SERVER_IP: the private IP address of a backend server.
    HealthCheckEnabled bool
    Specifies whether to enable the health check feature. Valid values:
    HealthCheckHttpCodes List<string>

    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, and http\_5xx.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    HealthCheckInterval int

    The interval at which health checks are performed. Unit: seconds.

    Valid values: 5 to 50.

    Default value: 10.

    HealthCheckType string
    The protocol that you want to use for health checks. Valid values: TCP (default) and HTTP.
    HealthCheckUrl string

    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 to HTTP.

    HealthyThreshold 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 to success.

    Valid values: 2 to 10.

    Default value: 2.

    HttpCheckMethod string

    The HTTP method that is used for health checks. Valid values: GET (default) and HEAD.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    UnhealthyThreshold 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 to fail.

    Valid values: 2 to 10.

    Default value: 2.

    HealthCheckConnectPort int

    The port that you want to use for health checks on backend servers.

    Valid values: 0 to 65535.

    Default value: 0. If you set the value to 0, the port of the backend server is used for health checks.

    HealthCheckConnectTimeout int
    The maximum timeout period of a health check. Unit: seconds. Valid values: 1 to 300. Default value: 5.
    HealthCheckDomain string
    The domain name that you want to use for health checks. Valid values:

    • $SERVER_IP: the private IP address of a backend server.
    HealthCheckEnabled bool
    Specifies whether to enable the health check feature. Valid values:
    HealthCheckHttpCodes []string

    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, and http\_5xx.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    HealthCheckInterval int

    The interval at which health checks are performed. Unit: seconds.

    Valid values: 5 to 50.

    Default value: 10.

    HealthCheckType string
    The protocol that you want to use for health checks. Valid values: TCP (default) and HTTP.
    HealthCheckUrl string

    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 to HTTP.

    HealthyThreshold 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 to success.

    Valid values: 2 to 10.

    Default value: 2.

    HttpCheckMethod string

    The HTTP method that is used for health checks. Valid values: GET (default) and HEAD.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    UnhealthyThreshold 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 to fail.

    Valid values: 2 to 10.

    Default value: 2.

    healthCheckConnectPort Integer

    The port that you want to use for health checks on backend servers.

    Valid values: 0 to 65535.

    Default value: 0. If you set the value to 0, the port of the backend server is used for health checks.

    healthCheckConnectTimeout Integer
    The maximum timeout period of a health check. Unit: seconds. Valid values: 1 to 300. Default value: 5.
    healthCheckDomain String
    The domain name that you want to use for health checks. Valid values:

    • $SERVER_IP: the private IP address of a backend server.
    healthCheckEnabled Boolean
    Specifies whether to enable the health check feature. Valid values:
    healthCheckHttpCodes List<String>

    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, and http\_5xx.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    healthCheckInterval Integer

    The interval at which health checks are performed. Unit: seconds.

    Valid values: 5 to 50.

    Default value: 10.

    healthCheckType String
    The protocol that you want to use for health checks. Valid values: TCP (default) and HTTP.
    healthCheckUrl String

    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 to HTTP.

    healthyThreshold 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 to success.

    Valid values: 2 to 10.

    Default value: 2.

    httpCheckMethod String

    The HTTP method that is used for health checks. Valid values: GET (default) and HEAD.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    unhealthyThreshold 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 to fail.

    Valid values: 2 to 10.

    Default value: 2.

    healthCheckConnectPort number

    The port that you want to use for health checks on backend servers.

    Valid values: 0 to 65535.

    Default value: 0. If you set the value to 0, the port of the backend server is used for health checks.

    healthCheckConnectTimeout number
    The maximum timeout period of a health check. Unit: seconds. Valid values: 1 to 300. Default value: 5.
    healthCheckDomain string
    The domain name that you want to use for health checks. Valid values:

    • $SERVER_IP: the private IP address of a backend server.
    healthCheckEnabled boolean
    Specifies whether to enable the health check feature. Valid values:
    healthCheckHttpCodes string[]

    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, and http\_5xx.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    healthCheckInterval number

    The interval at which health checks are performed. Unit: seconds.

    Valid values: 5 to 50.

    Default value: 10.

    healthCheckType string
    The protocol that you want to use for health checks. Valid values: TCP (default) and HTTP.
    healthCheckUrl string

    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 to HTTP.

    healthyThreshold 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 to success.

    Valid values: 2 to 10.

    Default value: 2.

    httpCheckMethod string

    The HTTP method that is used for health checks. Valid values: GET (default) and HEAD.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    unhealthyThreshold 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 to fail.

    Valid values: 2 to 10.

    Default value: 2.

    health_check_connect_port int

    The port that you want to use for health checks on backend servers.

    Valid values: 0 to 65535.

    Default value: 0. If you set the value to 0, the port of the backend server is used for health checks.

    health_check_connect_timeout int
    The maximum timeout period of a health check. Unit: seconds. Valid values: 1 to 300. Default value: 5.
    health_check_domain str
    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_enabled bool
    Specifies whether to enable the health check feature. Valid values:
    health_check_http_codes Sequence[str]

    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, and http\_5xx.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    health_check_interval int

    The interval at which health checks are performed. Unit: seconds.

    Valid values: 5 to 50.

    Default value: 10.

    health_check_type str
    The protocol that you want to use for health checks. Valid values: TCP (default) and HTTP.
    health_check_url str

    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 to HTTP.

    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 to success.

    Valid values: 2 to 10.

    Default value: 2.

    http_check_method str

    The HTTP method that is used for health checks. Valid values: GET (default) and HEAD.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    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 to fail.

    Valid values: 2 to 10.

    Default value: 2.

    healthCheckConnectPort Number

    The port that you want to use for health checks on backend servers.

    Valid values: 0 to 65535.

    Default value: 0. If you set the value to 0, the port of the backend server is used for health checks.

    healthCheckConnectTimeout Number
    The maximum timeout period of a health check. Unit: seconds. Valid values: 1 to 300. Default value: 5.
    healthCheckDomain String
    The domain name that you want to use for health checks. Valid values:

    • $SERVER_IP: the private IP address of a backend server.
    healthCheckEnabled Boolean
    Specifies whether to enable the health check feature. Valid values:
    healthCheckHttpCodes List<String>

    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, and http\_5xx.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    healthCheckInterval Number

    The interval at which health checks are performed. Unit: seconds.

    Valid values: 5 to 50.

    Default value: 10.

    healthCheckType String
    The protocol that you want to use for health checks. Valid values: TCP (default) and HTTP.
    healthCheckUrl String

    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 to HTTP.

    healthyThreshold 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 to success.

    Valid values: 2 to 10.

    Default value: 2.

    httpCheckMethod String

    The HTTP method that is used for health checks. Valid values: GET (default) and HEAD.

    NOTE: This parameter takes effect only when HealthCheckType is set to HTTP.

    unhealthyThreshold 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 to fail.

    Valid values: 2 to 10.

    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi