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

alicloud.nlb.ServerGroup

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 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",
        connectionDrain: 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=True,
        connection_drain_timeout=60,
        address_ip_version="Ipv4",
        health_check=alicloud.nlb.ServerGroupHealthCheckArgs(
            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, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		_, 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"),
    			ConnectionDrain:        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.Map{
    				"Created": pulumi.Any("TF"),
    				"For":     pulumi.Any("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",
            ConnectionDrain = 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")
                .connectionDrain(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
          connectionDrain: 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, Any]] = 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 alicloudServerGroupResource = new AliCloud.Nlb.ServerGroup("alicloudServerGroupResource", 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", "any" },
        },
        AnyPortEnabled = false,
    });
    
    example, err := nlb.NewServerGroup(ctx, "alicloudServerGroupResource", &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.Map{
    		"string": pulumi.Any("any"),
    	},
    	AnyPortEnabled: pulumi.Bool(false),
    })
    
    var alicloudServerGroupResource = new ServerGroup("alicloudServerGroupResource", 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", "any"))
        .anyPortEnabled(false)
        .build());
    
    alicloud_server_group_resource = alicloud.nlb.ServerGroup("alicloudServerGroupResource",
        server_group_name="string",
        vpc_id="string",
        preserve_client_ip_enabled=False,
        connection_drain_enabled=False,
        connection_drain_timeout=0,
        health_check=alicloud.nlb.ServerGroupHealthCheckArgs(
            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": "any",
        },
        any_port_enabled=False)
    
    const alicloudServerGroupResource = new alicloud.nlb.ServerGroup("alicloudServerGroupResource", {
        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: "any",
        },
        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: any
        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

    The ServerGroup resource accepts the following input properties:

    ServerGroupName string
    The 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 VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    AddressIpVersion string
    The protocol version. Valid values: Ipv4 (default), DualStack.
    AnyPortEnabled bool
    Full port forwarding.
    ConnectionDrain bool
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    ConnectionDrainTimeout int
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    HealthCheck Pulumi.AliCloud.Nlb.Inputs.ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    PreserveClientIpEnabled bool
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    Protocol string
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    ResourceGroupId string
    The ID of the resource group to which the security group belongs.
    Scheduler string
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    ServerGroupType string
    The type of the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    Tags Dictionary<string, object>
    Label.
    ServerGroupName string
    The 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 VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    AddressIpVersion string
    The protocol version. Valid values: Ipv4 (default), DualStack.
    AnyPortEnabled bool
    Full port forwarding.
    ConnectionDrain bool
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    ConnectionDrainTimeout int
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    HealthCheck ServerGroupHealthCheckArgs
    Health check configuration information. See health_check below.
    PreserveClientIpEnabled bool
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    Protocol string
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    ResourceGroupId string
    The ID of the resource group to which the security group belongs.
    Scheduler string
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    ServerGroupType string
    The type of the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    Tags map[string]interface{}
    Label.
    serverGroupName String
    The 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 VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    addressIpVersion String
    The protocol version. Valid values: Ipv4 (default), DualStack.
    anyPortEnabled Boolean
    Full port forwarding.
    connectionDrain Boolean
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    connectionDrainTimeout Integer
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    healthCheck ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    preserveClientIpEnabled Boolean
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    protocol String
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    resourceGroupId String
    The ID of the resource group to which the security group belongs.
    scheduler String
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    serverGroupType String
    The type of the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    tags Map<String,Object>
    Label.
    serverGroupName string
    The 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 VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    addressIpVersion string
    The protocol version. Valid values: Ipv4 (default), DualStack.
    anyPortEnabled boolean
    Full port forwarding.
    connectionDrain boolean
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    connectionDrainTimeout number
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    healthCheck ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    preserveClientIpEnabled boolean
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    protocol string
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    resourceGroupId string
    The ID of the resource group to which the security group belongs.
    scheduler string
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    serverGroupType string
    The type of the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    tags {[key: string]: any}
    Label.
    server_group_name str
    The 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 VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    address_ip_version str
    The protocol version. Valid values: Ipv4 (default), DualStack.
    any_port_enabled bool
    Full port forwarding.
    connection_drain bool
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    connection_drain_timeout int
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    health_check ServerGroupHealthCheckArgs
    Health check configuration information. See health_check below.
    preserve_client_ip_enabled bool
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    protocol str
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    resource_group_id str
    The ID of the resource group to which the security group belongs.
    scheduler str
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    server_group_type str
    The type of the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    tags Mapping[str, Any]
    Label.
    serverGroupName String
    The 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 VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    addressIpVersion String
    The protocol version. Valid values: Ipv4 (default), DualStack.
    anyPortEnabled Boolean
    Full port forwarding.
    connectionDrain Boolean
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    connectionDrainTimeout Number
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    healthCheck Property Map
    Health check configuration information. See health_check below.
    preserveClientIpEnabled Boolean
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    protocol String
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    resourceGroupId String
    The ID of the resource group to which the security group belongs.
    scheduler String
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    serverGroupType String
    The type of the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    tags Map<Any>
    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, Any]] = 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: Ipv4 (default), DualStack.
    AnyPortEnabled bool
    Full port forwarding.
    ConnectionDrain bool
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    ConnectionDrainTimeout int
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    HealthCheck Pulumi.AliCloud.Nlb.Inputs.ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    PreserveClientIpEnabled bool
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    Protocol string
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    ResourceGroupId string
    The ID of the resource group to which the security group belongs.
    Scheduler string
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    ServerGroupName string
    The 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 the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    Status string
    Server group status. Value:
    Tags Dictionary<string, object>
    Label.
    VpcId string

    The ID of the VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    AddressIpVersion string
    The protocol version. Valid values: Ipv4 (default), DualStack.
    AnyPortEnabled bool
    Full port forwarding.
    ConnectionDrain bool
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    ConnectionDrainTimeout int
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    HealthCheck ServerGroupHealthCheckArgs
    Health check configuration information. See health_check below.
    PreserveClientIpEnabled bool
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    Protocol string
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    ResourceGroupId string
    The ID of the resource group to which the security group belongs.
    Scheduler string
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    ServerGroupName string
    The 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 the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    Status string
    Server group status. Value:
    Tags map[string]interface{}
    Label.
    VpcId string

    The ID of the VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    addressIpVersion String
    The protocol version. Valid values: Ipv4 (default), DualStack.
    anyPortEnabled Boolean
    Full port forwarding.
    connectionDrain Boolean
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    connectionDrainTimeout Integer
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    healthCheck ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    preserveClientIpEnabled Boolean
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    protocol String
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    resourceGroupId String
    The ID of the resource group to which the security group belongs.
    scheduler String
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    serverGroupName String
    The 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 the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    status String
    Server group status. Value:
    tags Map<String,Object>
    Label.
    vpcId String

    The ID of the VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    addressIpVersion string
    The protocol version. Valid values: Ipv4 (default), DualStack.
    anyPortEnabled boolean
    Full port forwarding.
    connectionDrain boolean
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    connectionDrainTimeout number
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    healthCheck ServerGroupHealthCheck
    Health check configuration information. See health_check below.
    preserveClientIpEnabled boolean
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    protocol string
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    resourceGroupId string
    The ID of the resource group to which the security group belongs.
    scheduler string
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    serverGroupName string
    The 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 the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    status string
    Server group status. Value:
    tags {[key: string]: any}
    Label.
    vpcId string

    The ID of the VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    address_ip_version str
    The protocol version. Valid values: Ipv4 (default), DualStack.
    any_port_enabled bool
    Full port forwarding.
    connection_drain bool
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    connection_drain_timeout int
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    health_check ServerGroupHealthCheckArgs
    Health check configuration information. See health_check below.
    preserve_client_ip_enabled bool
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    protocol str
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    resource_group_id str
    The ID of the resource group to which the security group belongs.
    scheduler str
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    server_group_name str
    The 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 the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    status str
    Server group status. Value:
    tags Mapping[str, Any]
    Label.
    vpc_id str

    The ID of the VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    addressIpVersion String
    The protocol version. Valid values: Ipv4 (default), DualStack.
    anyPortEnabled Boolean
    Full port forwarding.
    connectionDrain Boolean
    . Field 'connection_drain' has been deprecated from provider version 1.214.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.
    connectionDrainTimeout Number
    Set the connection elegant interrupt timeout. Unit: seconds. Valid values: 10 ~ 900.
    healthCheck Property Map
    Health check configuration information. See health_check below.
    preserveClientIpEnabled Boolean
    Indicates whether client address retention is enabled. Special instructions: When AddressIPVersion is of the ipv4 type, the default value is true. Addrestipversion can only be false when the value of ipv6 is ipv6, and can be true when supported by the underlying layer.
    protocol String
    The backend protocol. Valid values: TCP (default), UDP, and TCPSSL.
    resourceGroupId String
    The ID of the resource group to which the security group belongs.
    scheduler String
    The routing algorithm. Valid values:

    • Wrr (default): The Weighted Round Robin algorithm is used. Backend servers with higher weights receive more requests than backend servers with lower weights.
    • 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.
    • Qch: QUIC ID hashing is used. Requests that contain the same QUIC ID are forwarded to the same backend server.
    serverGroupName String
    The 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 the server group. Valid values:

    • Instance (default): allows you to specify Ecs, Ens, or Eci.
    • Ip: allows you to specify IP addresses.
    status String
    Server group status. Value:
    tags Map<Any>
    Label.
    vpcId String

    The ID of the VPC to which the server group belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    Supporting Types

    ServerGroupHealthCheck, ServerGroupHealthCheckArgs

    HealthCheckConnectPort int
    The port of the backend server for health checks. Valid values: 0 ~ 65535. 0 indicates that the port of the backend server is used for health check.
    HealthCheckConnectTimeout int
    Maximum timeout for health check responses. Unit: seconds. Valid values: 1 ~ 300.
    HealthCheckDomain string

    The domain name used for health check. Valid values:

    • $SERVER_IP: uses the intranet IP of the backend server.
    • domain: Specify a specific domain name. The length is limited to 1 to 80 characters. Only lowercase letters, numbers, dashes (-), and half-width periods (.) can be used.

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

    HealthCheckEnabled bool
    Whether to enable health check. Valid values:

    • true: on.
    • false: closed.
    HealthCheckHttpCodes List<string>

    Health status return code. Multiple status codes are separated by commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx.

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

    HealthCheckInterval int
    Time interval of health examination. Unit: seconds. Valid values: 5 ~ 50.
    HealthCheckType string
    Health check protocol. Valid values: TCP or HTTP.
    HealthCheckUrl string

    Health check path.

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

    HealthyThreshold int
    After the health check is successful, the health check status of the backend server is determined from failed to successful. Valid values: 2 to 10.
    HttpCheckMethod string

    The health check method. Valid values: GET or HEAD.

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

    UnhealthyThreshold int
    After the health check fails for many times in a row, the health check status of the backend server is determined from Success to Failure. Valid values: 2 to 10.
    HealthCheckConnectPort int
    The port of the backend server for health checks. Valid values: 0 ~ 65535. 0 indicates that the port of the backend server is used for health check.
    HealthCheckConnectTimeout int
    Maximum timeout for health check responses. Unit: seconds. Valid values: 1 ~ 300.
    HealthCheckDomain string

    The domain name used for health check. Valid values:

    • $SERVER_IP: uses the intranet IP of the backend server.
    • domain: Specify a specific domain name. The length is limited to 1 to 80 characters. Only lowercase letters, numbers, dashes (-), and half-width periods (.) can be used.

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

    HealthCheckEnabled bool
    Whether to enable health check. Valid values:

    • true: on.
    • false: closed.
    HealthCheckHttpCodes []string

    Health status return code. Multiple status codes are separated by commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx.

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

    HealthCheckInterval int
    Time interval of health examination. Unit: seconds. Valid values: 5 ~ 50.
    HealthCheckType string
    Health check protocol. Valid values: TCP or HTTP.
    HealthCheckUrl string

    Health check path.

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

    HealthyThreshold int
    After the health check is successful, the health check status of the backend server is determined from failed to successful. Valid values: 2 to 10.
    HttpCheckMethod string

    The health check method. Valid values: GET or HEAD.

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

    UnhealthyThreshold int
    After the health check fails for many times in a row, the health check status of the backend server is determined from Success to Failure. Valid values: 2 to 10.
    healthCheckConnectPort Integer
    The port of the backend server for health checks. Valid values: 0 ~ 65535. 0 indicates that the port of the backend server is used for health check.
    healthCheckConnectTimeout Integer
    Maximum timeout for health check responses. Unit: seconds. Valid values: 1 ~ 300.
    healthCheckDomain String

    The domain name used for health check. Valid values:

    • $SERVER_IP: uses the intranet IP of the backend server.
    • domain: Specify a specific domain name. The length is limited to 1 to 80 characters. Only lowercase letters, numbers, dashes (-), and half-width periods (.) can be used.

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

    healthCheckEnabled Boolean
    Whether to enable health check. Valid values:

    • true: on.
    • false: closed.
    healthCheckHttpCodes List<String>

    Health status return code. Multiple status codes are separated by commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx.

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

    healthCheckInterval Integer
    Time interval of health examination. Unit: seconds. Valid values: 5 ~ 50.
    healthCheckType String
    Health check protocol. Valid values: TCP or HTTP.
    healthCheckUrl String

    Health check path.

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

    healthyThreshold Integer
    After the health check is successful, the health check status of the backend server is determined from failed to successful. Valid values: 2 to 10.
    httpCheckMethod String

    The health check method. Valid values: GET or HEAD.

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

    unhealthyThreshold Integer
    After the health check fails for many times in a row, the health check status of the backend server is determined from Success to Failure. Valid values: 2 to 10.
    healthCheckConnectPort number
    The port of the backend server for health checks. Valid values: 0 ~ 65535. 0 indicates that the port of the backend server is used for health check.
    healthCheckConnectTimeout number
    Maximum timeout for health check responses. Unit: seconds. Valid values: 1 ~ 300.
    healthCheckDomain string

    The domain name used for health check. Valid values:

    • $SERVER_IP: uses the intranet IP of the backend server.
    • domain: Specify a specific domain name. The length is limited to 1 to 80 characters. Only lowercase letters, numbers, dashes (-), and half-width periods (.) can be used.

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

    healthCheckEnabled boolean
    Whether to enable health check. Valid values:

    • true: on.
    • false: closed.
    healthCheckHttpCodes string[]

    Health status return code. Multiple status codes are separated by commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx.

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

    healthCheckInterval number
    Time interval of health examination. Unit: seconds. Valid values: 5 ~ 50.
    healthCheckType string
    Health check protocol. Valid values: TCP or HTTP.
    healthCheckUrl string

    Health check path.

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

    healthyThreshold number
    After the health check is successful, the health check status of the backend server is determined from failed to successful. Valid values: 2 to 10.
    httpCheckMethod string

    The health check method. Valid values: GET or HEAD.

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

    unhealthyThreshold number
    After the health check fails for many times in a row, the health check status of the backend server is determined from Success to Failure. Valid values: 2 to 10.
    health_check_connect_port int
    The port of the backend server for health checks. Valid values: 0 ~ 65535. 0 indicates that the port of the backend server is used for health check.
    health_check_connect_timeout int
    Maximum timeout for health check responses. Unit: seconds. Valid values: 1 ~ 300.
    health_check_domain str

    The domain name used for health check. Valid values:

    • $SERVER_IP: uses the intranet IP of the backend server.
    • domain: Specify a specific domain name. The length is limited to 1 to 80 characters. Only lowercase letters, numbers, dashes (-), and half-width periods (.) can be used.

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

    health_check_enabled bool
    Whether to enable health check. Valid values:

    • true: on.
    • false: closed.
    health_check_http_codes Sequence[str]

    Health status return code. Multiple status codes are separated by commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx.

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

    health_check_interval int
    Time interval of health examination. Unit: seconds. Valid values: 5 ~ 50.
    health_check_type str
    Health check protocol. Valid values: TCP or HTTP.
    health_check_url str

    Health check path.

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

    healthy_threshold int
    After the health check is successful, the health check status of the backend server is determined from failed to successful. Valid values: 2 to 10.
    http_check_method str

    The health check method. Valid values: GET or HEAD.

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

    unhealthy_threshold int
    After the health check fails for many times in a row, the health check status of the backend server is determined from Success to Failure. Valid values: 2 to 10.
    healthCheckConnectPort Number
    The port of the backend server for health checks. Valid values: 0 ~ 65535. 0 indicates that the port of the backend server is used for health check.
    healthCheckConnectTimeout Number
    Maximum timeout for health check responses. Unit: seconds. Valid values: 1 ~ 300.
    healthCheckDomain String

    The domain name used for health check. Valid values:

    • $SERVER_IP: uses the intranet IP of the backend server.
    • domain: Specify a specific domain name. The length is limited to 1 to 80 characters. Only lowercase letters, numbers, dashes (-), and half-width periods (.) can be used.

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

    healthCheckEnabled Boolean
    Whether to enable health check. Valid values:

    • true: on.
    • false: closed.
    healthCheckHttpCodes List<String>

    Health status return code. Multiple status codes are separated by commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx.

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

    healthCheckInterval Number
    Time interval of health examination. Unit: seconds. Valid values: 5 ~ 50.
    healthCheckType String
    Health check protocol. Valid values: TCP or HTTP.
    healthCheckUrl String

    Health check path.

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

    healthyThreshold Number
    After the health check is successful, the health check status of the backend server is determined from failed to successful. Valid values: 2 to 10.
    httpCheckMethod String

    The health check method. Valid values: GET or HEAD.

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

    unhealthyThreshold Number
    After the health check fails for many times in a row, the health check status of the backend server is determined from Success to Failure. Valid values: 2 to 10.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi