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

alicloud.alb.ServerGroup

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides an ALB Server Group resource.

    For information about ALB Server Group and how to use it, see What is Server Group.

    NOTE: Available since v1.131.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") || "terraform-example";
    const example = alicloud.resourcemanager.getResourceGroups({});
    const exampleGetZones = alicloud.getZones({
        availableResourceCreation: "Instance",
    });
    const exampleGetInstanceTypes = exampleGetZones.then(exampleGetZones => alicloud.ecs.getInstanceTypes({
        availabilityZone: exampleGetZones.zones?.[0]?.id,
        cpuCoreCount: 1,
        memorySize: 2,
    }));
    const exampleGetImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_[0-9]+_[0-9]+_x64*",
        owners: "system",
    });
    const exampleNetwork = new alicloud.vpc.Network("example", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const exampleSwitch = new alicloud.vpc.Switch("example", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/16",
        vpcId: exampleNetwork.id,
        zoneId: exampleGetZones.then(exampleGetZones => exampleGetZones.zones?.[0]?.id),
    });
    const exampleSecurityGroup = new alicloud.ecs.SecurityGroup("example", {
        name: name,
        description: name,
        vpcId: exampleNetwork.id,
    });
    const exampleInstance = new alicloud.ecs.Instance("example", {
        availabilityZone: exampleGetZones.then(exampleGetZones => exampleGetZones.zones?.[0]?.id),
        instanceName: name,
        imageId: exampleGetImages.then(exampleGetImages => exampleGetImages.images?.[0]?.id),
        instanceType: exampleGetInstanceTypes.then(exampleGetInstanceTypes => exampleGetInstanceTypes.instanceTypes?.[0]?.id),
        securityGroups: [exampleSecurityGroup.id],
        vswitchId: exampleSwitch.id,
    });
    const exampleServerGroup = new alicloud.alb.ServerGroup("example", {
        protocol: "HTTP",
        vpcId: exampleNetwork.id,
        serverGroupName: name,
        resourceGroupId: example.then(example => example.groups?.[0]?.id),
        stickySessionConfig: {
            stickySessionEnabled: true,
            cookie: "tf-example",
            stickySessionType: "Server",
        },
        healthCheckConfig: {
            healthCheckConnectPort: 46325,
            healthCheckEnabled: true,
            healthCheckHost: "tf-example.com",
            healthCheckCodes: [
                "http_2xx",
                "http_3xx",
                "http_4xx",
            ],
            healthCheckHttpVersion: "HTTP1.1",
            healthCheckInterval: 2,
            healthCheckMethod: "HEAD",
            healthCheckPath: "/tf-example",
            healthCheckProtocol: "HTTP",
            healthCheckTimeout: 5,
            healthyThreshold: 3,
            unhealthyThreshold: 3,
        },
        servers: [{
            description: name,
            port: 80,
            serverId: exampleInstance.id,
            serverIp: exampleInstance.privateIp,
            serverType: "Ecs",
            weight: 10,
        }],
        tags: {
            Created: "TF",
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    example = alicloud.resourcemanager.get_resource_groups()
    example_get_zones = alicloud.get_zones(available_resource_creation="Instance")
    example_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=example_get_zones.zones[0].id,
        cpu_core_count=1,
        memory_size=2)
    example_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
        owners="system")
    example_network = alicloud.vpc.Network("example",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    example_switch = alicloud.vpc.Switch("example",
        vswitch_name=name,
        cidr_block="10.4.0.0/16",
        vpc_id=example_network.id,
        zone_id=example_get_zones.zones[0].id)
    example_security_group = alicloud.ecs.SecurityGroup("example",
        name=name,
        description=name,
        vpc_id=example_network.id)
    example_instance = alicloud.ecs.Instance("example",
        availability_zone=example_get_zones.zones[0].id,
        instance_name=name,
        image_id=example_get_images.images[0].id,
        instance_type=example_get_instance_types.instance_types[0].id,
        security_groups=[example_security_group.id],
        vswitch_id=example_switch.id)
    example_server_group = alicloud.alb.ServerGroup("example",
        protocol="HTTP",
        vpc_id=example_network.id,
        server_group_name=name,
        resource_group_id=example.groups[0].id,
        sticky_session_config=alicloud.alb.ServerGroupStickySessionConfigArgs(
            sticky_session_enabled=True,
            cookie="tf-example",
            sticky_session_type="Server",
        ),
        health_check_config=alicloud.alb.ServerGroupHealthCheckConfigArgs(
            health_check_connect_port=46325,
            health_check_enabled=True,
            health_check_host="tf-example.com",
            health_check_codes=[
                "http_2xx",
                "http_3xx",
                "http_4xx",
            ],
            health_check_http_version="HTTP1.1",
            health_check_interval=2,
            health_check_method="HEAD",
            health_check_path="/tf-example",
            health_check_protocol="HTTP",
            health_check_timeout=5,
            healthy_threshold=3,
            unhealthy_threshold=3,
        ),
        servers=[alicloud.alb.ServerGroupServerArgs(
            description=name,
            port=80,
            server_id=example_instance.id,
            server_ip=example_instance.private_ip,
            server_type="Ecs",
            weight=10,
        )],
        tags={
            "Created": "TF",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"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 := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		example, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("Instance"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone: pulumi.StringRef(exampleGetZones.Zones[0].Id),
    			CpuCoreCount:     pulumi.IntRef(1),
    			MemorySize:       pulumi.Float64Ref(2),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex: pulumi.StringRef("^ubuntu_[0-9]+_[0-9]+_x64*"),
    			Owners:    pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleNetwork, err := vpc.NewNetwork(ctx, "example", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSwitch, err := vpc.NewSwitch(ctx, "example", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/16"),
    			VpcId:       exampleNetwork.ID(),
    			ZoneId:      pulumi.String(exampleGetZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSecurityGroup, err := ecs.NewSecurityGroup(ctx, "example", &ecs.SecurityGroupArgs{
    			Name:        pulumi.String(name),
    			Description: pulumi.String(name),
    			VpcId:       exampleNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := ecs.NewInstance(ctx, "example", &ecs.InstanceArgs{
    			AvailabilityZone: pulumi.String(exampleGetZones.Zones[0].Id),
    			InstanceName:     pulumi.String(name),
    			ImageId:          pulumi.String(exampleGetImages.Images[0].Id),
    			InstanceType:     pulumi.String(exampleGetInstanceTypes.InstanceTypes[0].Id),
    			SecurityGroups: pulumi.StringArray{
    				exampleSecurityGroup.ID(),
    			},
    			VswitchId: exampleSwitch.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = alb.NewServerGroup(ctx, "example", &alb.ServerGroupArgs{
    			Protocol:        pulumi.String("HTTP"),
    			VpcId:           exampleNetwork.ID(),
    			ServerGroupName: pulumi.String(name),
    			ResourceGroupId: pulumi.String(example.Groups[0].Id),
    			StickySessionConfig: &alb.ServerGroupStickySessionConfigArgs{
    				StickySessionEnabled: pulumi.Bool(true),
    				Cookie:               pulumi.String("tf-example"),
    				StickySessionType:    pulumi.String("Server"),
    			},
    			HealthCheckConfig: &alb.ServerGroupHealthCheckConfigArgs{
    				HealthCheckConnectPort: pulumi.Int(46325),
    				HealthCheckEnabled:     pulumi.Bool(true),
    				HealthCheckHost:        pulumi.String("tf-example.com"),
    				HealthCheckCodes: pulumi.StringArray{
    					pulumi.String("http_2xx"),
    					pulumi.String("http_3xx"),
    					pulumi.String("http_4xx"),
    				},
    				HealthCheckHttpVersion: pulumi.String("HTTP1.1"),
    				HealthCheckInterval:    pulumi.Int(2),
    				HealthCheckMethod:      pulumi.String("HEAD"),
    				HealthCheckPath:        pulumi.String("/tf-example"),
    				HealthCheckProtocol:    pulumi.String("HTTP"),
    				HealthCheckTimeout:     pulumi.Int(5),
    				HealthyThreshold:       pulumi.Int(3),
    				UnhealthyThreshold:     pulumi.Int(3),
    			},
    			Servers: alb.ServerGroupServerArray{
    				&alb.ServerGroupServerArgs{
    					Description: pulumi.String(name),
    					Port:        pulumi.Int(80),
    					ServerId:    exampleInstance.ID(),
    					ServerIp:    exampleInstance.PrivateIp,
    					ServerType:  pulumi.String("Ecs"),
    					Weight:      pulumi.Int(10),
    				},
    			},
    			Tags: pulumi.Map{
    				"Created": pulumi.Any("TF"),
    			},
    		})
    		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") ?? "terraform-example";
        var example = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    
        var exampleGetZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "Instance",
        });
    
        var exampleGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = exampleGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            CpuCoreCount = 1,
            MemorySize = 2,
        });
    
        var exampleGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_[0-9]+_[0-9]+_x64*",
            Owners = "system",
        });
    
        var exampleNetwork = new AliCloud.Vpc.Network("example", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var exampleSwitch = new AliCloud.Vpc.Switch("example", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/16",
            VpcId = exampleNetwork.Id,
            ZoneId = exampleGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var exampleSecurityGroup = new AliCloud.Ecs.SecurityGroup("example", new()
        {
            Name = name,
            Description = name,
            VpcId = exampleNetwork.Id,
        });
    
        var exampleInstance = new AliCloud.Ecs.Instance("example", new()
        {
            AvailabilityZone = exampleGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            InstanceName = name,
            ImageId = exampleGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = exampleGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SecurityGroups = new[]
            {
                exampleSecurityGroup.Id,
            },
            VswitchId = exampleSwitch.Id,
        });
    
        var exampleServerGroup = new AliCloud.Alb.ServerGroup("example", new()
        {
            Protocol = "HTTP",
            VpcId = exampleNetwork.Id,
            ServerGroupName = name,
            ResourceGroupId = example.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id),
            StickySessionConfig = new AliCloud.Alb.Inputs.ServerGroupStickySessionConfigArgs
            {
                StickySessionEnabled = true,
                Cookie = "tf-example",
                StickySessionType = "Server",
            },
            HealthCheckConfig = new AliCloud.Alb.Inputs.ServerGroupHealthCheckConfigArgs
            {
                HealthCheckConnectPort = 46325,
                HealthCheckEnabled = true,
                HealthCheckHost = "tf-example.com",
                HealthCheckCodes = new[]
                {
                    "http_2xx",
                    "http_3xx",
                    "http_4xx",
                },
                HealthCheckHttpVersion = "HTTP1.1",
                HealthCheckInterval = 2,
                HealthCheckMethod = "HEAD",
                HealthCheckPath = "/tf-example",
                HealthCheckProtocol = "HTTP",
                HealthCheckTimeout = 5,
                HealthyThreshold = 3,
                UnhealthyThreshold = 3,
            },
            Servers = new[]
            {
                new AliCloud.Alb.Inputs.ServerGroupServerArgs
                {
                    Description = name,
                    Port = 80,
                    ServerId = exampleInstance.Id,
                    ServerIp = exampleInstance.PrivateIp,
                    ServerType = "Ecs",
                    Weight = 10,
                },
            },
            Tags = 
            {
                { "Created", "TF" },
            },
        });
    
    });
    
    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.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.alb.ServerGroup;
    import com.pulumi.alicloud.alb.ServerGroupArgs;
    import com.pulumi.alicloud.alb.inputs.ServerGroupStickySessionConfigArgs;
    import com.pulumi.alicloud.alb.inputs.ServerGroupHealthCheckConfigArgs;
    import com.pulumi.alicloud.alb.inputs.ServerGroupServerArgs;
    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("terraform-example");
            final var example = ResourcemanagerFunctions.getResourceGroups();
    
            final var exampleGetZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("Instance")
                .build());
    
            final var exampleGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(exampleGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .cpuCoreCount(1)
                .memorySize(2)
                .build());
    
            final var exampleGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_[0-9]+_[0-9]+_x64*")
                .owners("system")
                .build());
    
            var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var exampleSwitch = new Switch("exampleSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.0.0/16")
                .vpcId(exampleNetwork.id())
                .zoneId(exampleGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .description(name)
                .vpcId(exampleNetwork.id())
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
                .availabilityZone(exampleGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceName(name)
                .imageId(exampleGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(exampleGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .securityGroups(exampleSecurityGroup.id())
                .vswitchId(exampleSwitch.id())
                .build());
    
            var exampleServerGroup = new ServerGroup("exampleServerGroup", ServerGroupArgs.builder()
                .protocol("HTTP")
                .vpcId(exampleNetwork.id())
                .serverGroupName(name)
                .resourceGroupId(example.applyValue(getResourceGroupsResult -> getResourceGroupsResult.groups()[0].id()))
                .stickySessionConfig(ServerGroupStickySessionConfigArgs.builder()
                    .stickySessionEnabled(true)
                    .cookie("tf-example")
                    .stickySessionType("Server")
                    .build())
                .healthCheckConfig(ServerGroupHealthCheckConfigArgs.builder()
                    .healthCheckConnectPort("46325")
                    .healthCheckEnabled(true)
                    .healthCheckHost("tf-example.com")
                    .healthCheckCodes(                
                        "http_2xx",
                        "http_3xx",
                        "http_4xx")
                    .healthCheckHttpVersion("HTTP1.1")
                    .healthCheckInterval("2")
                    .healthCheckMethod("HEAD")
                    .healthCheckPath("/tf-example")
                    .healthCheckProtocol("HTTP")
                    .healthCheckTimeout(5)
                    .healthyThreshold(3)
                    .unhealthyThreshold(3)
                    .build())
                .servers(ServerGroupServerArgs.builder()
                    .description(name)
                    .port(80)
                    .serverId(exampleInstance.id())
                    .serverIp(exampleInstance.privateIp())
                    .serverType("Ecs")
                    .weight(10)
                    .build())
                .tags(Map.of("Created", "TF"))
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      exampleNetwork:
        type: alicloud:vpc:Network
        name: example
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      exampleSwitch:
        type: alicloud:vpc:Switch
        name: example
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/16
          vpcId: ${exampleNetwork.id}
          zoneId: ${exampleGetZones.zones[0].id}
      exampleSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: example
        properties:
          name: ${name}
          description: ${name}
          vpcId: ${exampleNetwork.id}
      exampleInstance:
        type: alicloud:ecs:Instance
        name: example
        properties:
          availabilityZone: ${exampleGetZones.zones[0].id}
          instanceName: ${name}
          imageId: ${exampleGetImages.images[0].id}
          instanceType: ${exampleGetInstanceTypes.instanceTypes[0].id}
          securityGroups:
            - ${exampleSecurityGroup.id}
          vswitchId: ${exampleSwitch.id}
      exampleServerGroup:
        type: alicloud:alb:ServerGroup
        name: example
        properties:
          protocol: HTTP
          vpcId: ${exampleNetwork.id}
          serverGroupName: ${name}
          resourceGroupId: ${example.groups[0].id}
          stickySessionConfig:
            stickySessionEnabled: true
            cookie: tf-example
            stickySessionType: Server
          healthCheckConfig:
            healthCheckConnectPort: '46325'
            healthCheckEnabled: true
            healthCheckHost: tf-example.com
            healthCheckCodes:
              - http_2xx
              - http_3xx
              - http_4xx
            healthCheckHttpVersion: HTTP1.1
            healthCheckInterval: '2'
            healthCheckMethod: HEAD
            healthCheckPath: /tf-example
            healthCheckProtocol: HTTP
            healthCheckTimeout: 5
            healthyThreshold: 3
            unhealthyThreshold: 3
          servers:
            - description: ${name}
              port: 80
              serverId: ${exampleInstance.id}
              serverIp: ${exampleInstance.privateIp}
              serverType: Ecs
              weight: 10
          tags:
            Created: TF
    variables:
      example:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments: {}
      exampleGetZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: Instance
      exampleGetInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${exampleGetZones.zones[0].id}
            cpuCoreCount: 1
            memorySize: 2
      exampleGetImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            nameRegex: ^ubuntu_[0-9]+_[0-9]+_x64*
            owners: system
    

    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,
                    health_check_config: Optional[ServerGroupHealthCheckConfigArgs] = None,
                    server_group_name: Optional[str] = None,
                    dry_run: Optional[bool] = None,
                    protocol: Optional[str] = None,
                    resource_group_id: Optional[str] = None,
                    scheduler: Optional[str] = None,
                    server_group_type: Optional[str] = None,
                    servers: Optional[Sequence[ServerGroupServerArgs]] = None,
                    sticky_session_config: Optional[ServerGroupStickySessionConfigArgs] = None,
                    tags: Optional[Mapping[str, Any]] = None,
                    vpc_id: Optional[str] = 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:alb: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 serverGroupResource = new AliCloud.Alb.ServerGroup("serverGroupResource", new()
    {
        HealthCheckConfig = new AliCloud.Alb.Inputs.ServerGroupHealthCheckConfigArgs
        {
            HealthCheckEnabled = false,
            HealthCheckCodes = new[]
            {
                "string",
            },
            HealthCheckConnectPort = 0,
            HealthCheckHost = "string",
            HealthCheckHttpVersion = "string",
            HealthCheckInterval = 0,
            HealthCheckMethod = "string",
            HealthCheckPath = "string",
            HealthCheckProtocol = "string",
            HealthCheckTimeout = 0,
            HealthyThreshold = 0,
            UnhealthyThreshold = 0,
        },
        ServerGroupName = "string",
        DryRun = false,
        Protocol = "string",
        ResourceGroupId = "string",
        Scheduler = "string",
        ServerGroupType = "string",
        Servers = new[]
        {
            new AliCloud.Alb.Inputs.ServerGroupServerArgs
            {
                ServerId = "string",
                ServerType = "string",
                Description = "string",
                Port = 0,
                RemoteIpEnabled = false,
                ServerIp = "string",
                Status = "string",
                Weight = 0,
            },
        },
        StickySessionConfig = new AliCloud.Alb.Inputs.ServerGroupStickySessionConfigArgs
        {
            Cookie = "string",
            CookieTimeout = 0,
            StickySessionEnabled = false,
            StickySessionType = "string",
        },
        Tags = 
        {
            { "string", "any" },
        },
        VpcId = "string",
    });
    
    example, err := alb.NewServerGroup(ctx, "serverGroupResource", &alb.ServerGroupArgs{
    	HealthCheckConfig: &alb.ServerGroupHealthCheckConfigArgs{
    		HealthCheckEnabled: pulumi.Bool(false),
    		HealthCheckCodes: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		HealthCheckConnectPort: pulumi.Int(0),
    		HealthCheckHost:        pulumi.String("string"),
    		HealthCheckHttpVersion: pulumi.String("string"),
    		HealthCheckInterval:    pulumi.Int(0),
    		HealthCheckMethod:      pulumi.String("string"),
    		HealthCheckPath:        pulumi.String("string"),
    		HealthCheckProtocol:    pulumi.String("string"),
    		HealthCheckTimeout:     pulumi.Int(0),
    		HealthyThreshold:       pulumi.Int(0),
    		UnhealthyThreshold:     pulumi.Int(0),
    	},
    	ServerGroupName: pulumi.String("string"),
    	DryRun:          pulumi.Bool(false),
    	Protocol:        pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	Scheduler:       pulumi.String("string"),
    	ServerGroupType: pulumi.String("string"),
    	Servers: alb.ServerGroupServerArray{
    		&alb.ServerGroupServerArgs{
    			ServerId:        pulumi.String("string"),
    			ServerType:      pulumi.String("string"),
    			Description:     pulumi.String("string"),
    			Port:            pulumi.Int(0),
    			RemoteIpEnabled: pulumi.Bool(false),
    			ServerIp:        pulumi.String("string"),
    			Status:          pulumi.String("string"),
    			Weight:          pulumi.Int(0),
    		},
    	},
    	StickySessionConfig: &alb.ServerGroupStickySessionConfigArgs{
    		Cookie:               pulumi.String("string"),
    		CookieTimeout:        pulumi.Int(0),
    		StickySessionEnabled: pulumi.Bool(false),
    		StickySessionType:    pulumi.String("string"),
    	},
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	VpcId: pulumi.String("string"),
    })
    
    var serverGroupResource = new ServerGroup("serverGroupResource", ServerGroupArgs.builder()
        .healthCheckConfig(ServerGroupHealthCheckConfigArgs.builder()
            .healthCheckEnabled(false)
            .healthCheckCodes("string")
            .healthCheckConnectPort(0)
            .healthCheckHost("string")
            .healthCheckHttpVersion("string")
            .healthCheckInterval(0)
            .healthCheckMethod("string")
            .healthCheckPath("string")
            .healthCheckProtocol("string")
            .healthCheckTimeout(0)
            .healthyThreshold(0)
            .unhealthyThreshold(0)
            .build())
        .serverGroupName("string")
        .dryRun(false)
        .protocol("string")
        .resourceGroupId("string")
        .scheduler("string")
        .serverGroupType("string")
        .servers(ServerGroupServerArgs.builder()
            .serverId("string")
            .serverType("string")
            .description("string")
            .port(0)
            .remoteIpEnabled(false)
            .serverIp("string")
            .status("string")
            .weight(0)
            .build())
        .stickySessionConfig(ServerGroupStickySessionConfigArgs.builder()
            .cookie("string")
            .cookieTimeout(0)
            .stickySessionEnabled(false)
            .stickySessionType("string")
            .build())
        .tags(Map.of("string", "any"))
        .vpcId("string")
        .build());
    
    server_group_resource = alicloud.alb.ServerGroup("serverGroupResource",
        health_check_config=alicloud.alb.ServerGroupHealthCheckConfigArgs(
            health_check_enabled=False,
            health_check_codes=["string"],
            health_check_connect_port=0,
            health_check_host="string",
            health_check_http_version="string",
            health_check_interval=0,
            health_check_method="string",
            health_check_path="string",
            health_check_protocol="string",
            health_check_timeout=0,
            healthy_threshold=0,
            unhealthy_threshold=0,
        ),
        server_group_name="string",
        dry_run=False,
        protocol="string",
        resource_group_id="string",
        scheduler="string",
        server_group_type="string",
        servers=[alicloud.alb.ServerGroupServerArgs(
            server_id="string",
            server_type="string",
            description="string",
            port=0,
            remote_ip_enabled=False,
            server_ip="string",
            status="string",
            weight=0,
        )],
        sticky_session_config=alicloud.alb.ServerGroupStickySessionConfigArgs(
            cookie="string",
            cookie_timeout=0,
            sticky_session_enabled=False,
            sticky_session_type="string",
        ),
        tags={
            "string": "any",
        },
        vpc_id="string")
    
    const serverGroupResource = new alicloud.alb.ServerGroup("serverGroupResource", {
        healthCheckConfig: {
            healthCheckEnabled: false,
            healthCheckCodes: ["string"],
            healthCheckConnectPort: 0,
            healthCheckHost: "string",
            healthCheckHttpVersion: "string",
            healthCheckInterval: 0,
            healthCheckMethod: "string",
            healthCheckPath: "string",
            healthCheckProtocol: "string",
            healthCheckTimeout: 0,
            healthyThreshold: 0,
            unhealthyThreshold: 0,
        },
        serverGroupName: "string",
        dryRun: false,
        protocol: "string",
        resourceGroupId: "string",
        scheduler: "string",
        serverGroupType: "string",
        servers: [{
            serverId: "string",
            serverType: "string",
            description: "string",
            port: 0,
            remoteIpEnabled: false,
            serverIp: "string",
            status: "string",
            weight: 0,
        }],
        stickySessionConfig: {
            cookie: "string",
            cookieTimeout: 0,
            stickySessionEnabled: false,
            stickySessionType: "string",
        },
        tags: {
            string: "any",
        },
        vpcId: "string",
    });
    
    type: alicloud:alb:ServerGroup
    properties:
        dryRun: false
        healthCheckConfig:
            healthCheckCodes:
                - string
            healthCheckConnectPort: 0
            healthCheckEnabled: false
            healthCheckHost: string
            healthCheckHttpVersion: string
            healthCheckInterval: 0
            healthCheckMethod: string
            healthCheckPath: string
            healthCheckProtocol: string
            healthCheckTimeout: 0
            healthyThreshold: 0
            unhealthyThreshold: 0
        protocol: string
        resourceGroupId: string
        scheduler: string
        serverGroupName: string
        serverGroupType: string
        servers:
            - description: string
              port: 0
              remoteIpEnabled: false
              serverId: string
              serverIp: string
              serverType: string
              status: string
              weight: 0
        stickySessionConfig:
            cookie: string
            cookieTimeout: 0
            stickySessionEnabled: false
            stickySessionType: 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:

    HealthCheckConfig Pulumi.AliCloud.Alb.Inputs.ServerGroupHealthCheckConfig
    The configuration of health checks. See health_check_config below.
    ServerGroupName string
    The name of the server group.
    DryRun bool
    The dry run.
    Protocol string
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    ResourceGroupId string
    The ID of the resource group.
    Scheduler string
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    ServerGroupType string
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    Servers List<Pulumi.AliCloud.Alb.Inputs.ServerGroupServer>
    The backend servers. See servers below.
    StickySessionConfig Pulumi.AliCloud.Alb.Inputs.ServerGroupStickySessionConfig
    The configuration of session persistence. See sticky_session_config below.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    VpcId string
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    HealthCheckConfig ServerGroupHealthCheckConfigArgs
    The configuration of health checks. See health_check_config below.
    ServerGroupName string
    The name of the server group.
    DryRun bool
    The dry run.
    Protocol string
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    ResourceGroupId string
    The ID of the resource group.
    Scheduler string
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    ServerGroupType string
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    Servers []ServerGroupServerArgs
    The backend servers. See servers below.
    StickySessionConfig ServerGroupStickySessionConfigArgs
    The configuration of session persistence. See sticky_session_config below.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    VpcId string
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    healthCheckConfig ServerGroupHealthCheckConfig
    The configuration of health checks. See health_check_config below.
    serverGroupName String
    The name of the server group.
    dryRun Boolean
    The dry run.
    protocol String
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    resourceGroupId String
    The ID of the resource group.
    scheduler String
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    serverGroupType String
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    servers List<ServerGroupServer>
    The backend servers. See servers below.
    stickySessionConfig ServerGroupStickySessionConfig
    The configuration of session persistence. See sticky_session_config below.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    vpcId String
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    healthCheckConfig ServerGroupHealthCheckConfig
    The configuration of health checks. See health_check_config below.
    serverGroupName string
    The name of the server group.
    dryRun boolean
    The dry run.
    protocol string
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    resourceGroupId string
    The ID of the resource group.
    scheduler string
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    serverGroupType string
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    servers ServerGroupServer[]
    The backend servers. See servers below.
    stickySessionConfig ServerGroupStickySessionConfig
    The configuration of session persistence. See sticky_session_config below.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    vpcId string
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    health_check_config ServerGroupHealthCheckConfigArgs
    The configuration of health checks. See health_check_config below.
    server_group_name str
    The name of the server group.
    dry_run bool
    The dry run.
    protocol str
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    resource_group_id str
    The ID of the resource group.
    scheduler str
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    server_group_type str
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    servers Sequence[ServerGroupServerArgs]
    The backend servers. See servers below.
    sticky_session_config ServerGroupStickySessionConfigArgs
    The configuration of session persistence. See sticky_session_config below.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    vpc_id str
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    healthCheckConfig Property Map
    The configuration of health checks. See health_check_config below.
    serverGroupName String
    The name of the server group.
    dryRun Boolean
    The dry run.
    protocol String
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    resourceGroupId String
    The ID of the resource group.
    scheduler String
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    serverGroupType String
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    servers List<Property Map>
    The backend servers. See servers below.
    stickySessionConfig Property Map
    The configuration of session persistence. See sticky_session_config below.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    vpcId String
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.

    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
    The status of the backend server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the backend server.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the backend server.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the backend server.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the backend server.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the backend server.

    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,
            dry_run: Optional[bool] = None,
            health_check_config: Optional[ServerGroupHealthCheckConfigArgs] = 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,
            servers: Optional[Sequence[ServerGroupServerArgs]] = None,
            status: Optional[str] = None,
            sticky_session_config: Optional[ServerGroupStickySessionConfigArgs] = 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:
    DryRun bool
    The dry run.
    HealthCheckConfig Pulumi.AliCloud.Alb.Inputs.ServerGroupHealthCheckConfig
    The configuration of health checks. See health_check_config below.
    Protocol string
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    ResourceGroupId string
    The ID of the resource group.
    Scheduler string
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    ServerGroupName string
    The name of the server group.
    ServerGroupType string
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    Servers List<Pulumi.AliCloud.Alb.Inputs.ServerGroupServer>
    The backend servers. See servers below.
    Status string
    The status of the backend server.
    StickySessionConfig Pulumi.AliCloud.Alb.Inputs.ServerGroupStickySessionConfig
    The configuration of session persistence. See sticky_session_config below.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    VpcId string
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    DryRun bool
    The dry run.
    HealthCheckConfig ServerGroupHealthCheckConfigArgs
    The configuration of health checks. See health_check_config below.
    Protocol string
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    ResourceGroupId string
    The ID of the resource group.
    Scheduler string
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    ServerGroupName string
    The name of the server group.
    ServerGroupType string
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    Servers []ServerGroupServerArgs
    The backend servers. See servers below.
    Status string
    The status of the backend server.
    StickySessionConfig ServerGroupStickySessionConfigArgs
    The configuration of session persistence. See sticky_session_config below.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    VpcId string
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    dryRun Boolean
    The dry run.
    healthCheckConfig ServerGroupHealthCheckConfig
    The configuration of health checks. See health_check_config below.
    protocol String
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    resourceGroupId String
    The ID of the resource group.
    scheduler String
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    serverGroupName String
    The name of the server group.
    serverGroupType String
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    servers List<ServerGroupServer>
    The backend servers. See servers below.
    status String
    The status of the backend server.
    stickySessionConfig ServerGroupStickySessionConfig
    The configuration of session persistence. See sticky_session_config below.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    vpcId String
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    dryRun boolean
    The dry run.
    healthCheckConfig ServerGroupHealthCheckConfig
    The configuration of health checks. See health_check_config below.
    protocol string
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    resourceGroupId string
    The ID of the resource group.
    scheduler string
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    serverGroupName string
    The name of the server group.
    serverGroupType string
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    servers ServerGroupServer[]
    The backend servers. See servers below.
    status string
    The status of the backend server.
    stickySessionConfig ServerGroupStickySessionConfig
    The configuration of session persistence. See sticky_session_config below.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    vpcId string
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    dry_run bool
    The dry run.
    health_check_config ServerGroupHealthCheckConfigArgs
    The configuration of health checks. See health_check_config below.
    protocol str
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    resource_group_id str
    The ID of the resource group.
    scheduler str
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    server_group_name str
    The name of the server group.
    server_group_type str
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    servers Sequence[ServerGroupServerArgs]
    The backend servers. See servers below.
    status str
    The status of the backend server.
    sticky_session_config ServerGroupStickySessionConfigArgs
    The configuration of session persistence. See sticky_session_config below.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    vpc_id str
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    dryRun Boolean
    The dry run.
    healthCheckConfig Property Map
    The configuration of health checks. See health_check_config below.
    protocol String
    The server protocol. Valid values: HTTP, HTTPS, gRPC. While server_group_type is Fc this parameter will not take effect. From version 1.215.0, protocol can be set to gRPC.
    resourceGroupId String
    The ID of the resource group.
    scheduler String
    The scheduling algorithm. Valid values: Sch, Wlc, Wrr. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    serverGroupName String
    The name of the server group.
    serverGroupType String
    The type of the server group. Default value: Instance. Valid values:

    • Instance: allows you add servers by specifying Ecs, Ens, or Eci.
    • Ip: allows you to add servers by specifying IP addresses.
    • Fc: allows you to add servers by specifying functions of Function Compute.
    servers List<Property Map>
    The backend servers. See servers below.
    status String
    The status of the backend server.
    stickySessionConfig Property Map
    The configuration of session persistence. See sticky_session_config below.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    vpcId String
    The ID of the VPC that you want to access. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.

    Supporting Types

    ServerGroupHealthCheckConfig, ServerGroupHealthCheckConfigArgs

    HealthCheckEnabled bool
    Specifies whether to enable the health check feature. Valid values: true, false.
    HealthCheckCodes List<string>
    The HTTP status codes that are used to indicate whether the backend server passes the health check. Valid values:

    • If health_check_protocol is set to HTTP or HTTPS. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Default value: http_2xx.
    • If health_check_protocol is set to gRPC. Valid values: 0 to 99. Default value: 0.
    HealthCheckConnectPort int
    The backend port that is used for health checks. Default value: 0. Valid values: 0 to 65535. A value of 0 indicates that a backend server port is used for health checks.
    HealthCheckHost string
    The domain name that is used for health checks.
    HealthCheckHttpVersion string
    The version of the HTTP protocol. Default value: HTTP1.1. Valid values: HTTP1.0 and HTTP1.1. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    HealthCheckInterval int
    The interval at which health checks are performed. Unit: seconds. Default value: 2. Valid values: 1 to 50.
    HealthCheckMethod string
    The HTTP method that is used for health checks. Default value: GET. Valid values: GET, POST, HEAD. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP, HTTPS, or gRPC. From version 1.215.0, health_check_method can be set to POST.
    HealthCheckPath string
    The path that is used for health checks. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    HealthCheckProtocol string
    The protocol that is used for health checks. Valid values: HTTP, HTTPS, TCP and gRPC.
    HealthCheckTimeout int
    The timeout period for a health check response. If a backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If the value of health_check_timeout is smaller than the value of health_check_interval, the value of health_check_timeout is ignored and the value of health_check_interval is used.
    HealthyThreshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10.
    UnhealthyThreshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10.
    HealthCheckEnabled bool
    Specifies whether to enable the health check feature. Valid values: true, false.
    HealthCheckCodes []string
    The HTTP status codes that are used to indicate whether the backend server passes the health check. Valid values:

    • If health_check_protocol is set to HTTP or HTTPS. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Default value: http_2xx.
    • If health_check_protocol is set to gRPC. Valid values: 0 to 99. Default value: 0.
    HealthCheckConnectPort int
    The backend port that is used for health checks. Default value: 0. Valid values: 0 to 65535. A value of 0 indicates that a backend server port is used for health checks.
    HealthCheckHost string
    The domain name that is used for health checks.
    HealthCheckHttpVersion string
    The version of the HTTP protocol. Default value: HTTP1.1. Valid values: HTTP1.0 and HTTP1.1. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    HealthCheckInterval int
    The interval at which health checks are performed. Unit: seconds. Default value: 2. Valid values: 1 to 50.
    HealthCheckMethod string
    The HTTP method that is used for health checks. Default value: GET. Valid values: GET, POST, HEAD. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP, HTTPS, or gRPC. From version 1.215.0, health_check_method can be set to POST.
    HealthCheckPath string
    The path that is used for health checks. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    HealthCheckProtocol string
    The protocol that is used for health checks. Valid values: HTTP, HTTPS, TCP and gRPC.
    HealthCheckTimeout int
    The timeout period for a health check response. If a backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If the value of health_check_timeout is smaller than the value of health_check_interval, the value of health_check_timeout is ignored and the value of health_check_interval is used.
    HealthyThreshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10.
    UnhealthyThreshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10.
    healthCheckEnabled Boolean
    Specifies whether to enable the health check feature. Valid values: true, false.
    healthCheckCodes List<String>
    The HTTP status codes that are used to indicate whether the backend server passes the health check. Valid values:

    • If health_check_protocol is set to HTTP or HTTPS. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Default value: http_2xx.
    • If health_check_protocol is set to gRPC. Valid values: 0 to 99. Default value: 0.
    healthCheckConnectPort Integer
    The backend port that is used for health checks. Default value: 0. Valid values: 0 to 65535. A value of 0 indicates that a backend server port is used for health checks.
    healthCheckHost String
    The domain name that is used for health checks.
    healthCheckHttpVersion String
    The version of the HTTP protocol. Default value: HTTP1.1. Valid values: HTTP1.0 and HTTP1.1. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    healthCheckInterval Integer
    The interval at which health checks are performed. Unit: seconds. Default value: 2. Valid values: 1 to 50.
    healthCheckMethod String
    The HTTP method that is used for health checks. Default value: GET. Valid values: GET, POST, HEAD. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP, HTTPS, or gRPC. From version 1.215.0, health_check_method can be set to POST.
    healthCheckPath String
    The path that is used for health checks. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    healthCheckProtocol String
    The protocol that is used for health checks. Valid values: HTTP, HTTPS, TCP and gRPC.
    healthCheckTimeout Integer
    The timeout period for a health check response. If a backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If the value of health_check_timeout is smaller than the value of health_check_interval, the value of health_check_timeout is ignored and the value of health_check_interval is used.
    healthyThreshold Integer
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10.
    unhealthyThreshold Integer
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10.
    healthCheckEnabled boolean
    Specifies whether to enable the health check feature. Valid values: true, false.
    healthCheckCodes string[]
    The HTTP status codes that are used to indicate whether the backend server passes the health check. Valid values:

    • If health_check_protocol is set to HTTP or HTTPS. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Default value: http_2xx.
    • If health_check_protocol is set to gRPC. Valid values: 0 to 99. Default value: 0.
    healthCheckConnectPort number
    The backend port that is used for health checks. Default value: 0. Valid values: 0 to 65535. A value of 0 indicates that a backend server port is used for health checks.
    healthCheckHost string
    The domain name that is used for health checks.
    healthCheckHttpVersion string
    The version of the HTTP protocol. Default value: HTTP1.1. Valid values: HTTP1.0 and HTTP1.1. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    healthCheckInterval number
    The interval at which health checks are performed. Unit: seconds. Default value: 2. Valid values: 1 to 50.
    healthCheckMethod string
    The HTTP method that is used for health checks. Default value: GET. Valid values: GET, POST, HEAD. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP, HTTPS, or gRPC. From version 1.215.0, health_check_method can be set to POST.
    healthCheckPath string
    The path that is used for health checks. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    healthCheckProtocol string
    The protocol that is used for health checks. Valid values: HTTP, HTTPS, TCP and gRPC.
    healthCheckTimeout number
    The timeout period for a health check response. If a backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If the value of health_check_timeout is smaller than the value of health_check_interval, the value of health_check_timeout is ignored and the value of health_check_interval is used.
    healthyThreshold number
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10.
    unhealthyThreshold number
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10.
    health_check_enabled bool
    Specifies whether to enable the health check feature. Valid values: true, false.
    health_check_codes Sequence[str]
    The HTTP status codes that are used to indicate whether the backend server passes the health check. Valid values:

    • If health_check_protocol is set to HTTP or HTTPS. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Default value: http_2xx.
    • If health_check_protocol is set to gRPC. Valid values: 0 to 99. Default value: 0.
    health_check_connect_port int
    The backend port that is used for health checks. Default value: 0. Valid values: 0 to 65535. A value of 0 indicates that a backend server port is used for health checks.
    health_check_host str
    The domain name that is used for health checks.
    health_check_http_version str
    The version of the HTTP protocol. Default value: HTTP1.1. Valid values: HTTP1.0 and HTTP1.1. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    health_check_interval int
    The interval at which health checks are performed. Unit: seconds. Default value: 2. Valid values: 1 to 50.
    health_check_method str
    The HTTP method that is used for health checks. Default value: GET. Valid values: GET, POST, HEAD. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP, HTTPS, or gRPC. From version 1.215.0, health_check_method can be set to POST.
    health_check_path str
    The path that is used for health checks. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    health_check_protocol str
    The protocol that is used for health checks. Valid values: HTTP, HTTPS, TCP and gRPC.
    health_check_timeout int
    The timeout period for a health check response. If a backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If the value of health_check_timeout is smaller than the value of health_check_interval, the value of health_check_timeout is ignored and the value of health_check_interval is used.
    healthy_threshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10.
    unhealthy_threshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10.
    healthCheckEnabled Boolean
    Specifies whether to enable the health check feature. Valid values: true, false.
    healthCheckCodes List<String>
    The HTTP status codes that are used to indicate whether the backend server passes the health check. Valid values:

    • If health_check_protocol is set to HTTP or HTTPS. Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Default value: http_2xx.
    • If health_check_protocol is set to gRPC. Valid values: 0 to 99. Default value: 0.
    healthCheckConnectPort Number
    The backend port that is used for health checks. Default value: 0. Valid values: 0 to 65535. A value of 0 indicates that a backend server port is used for health checks.
    healthCheckHost String
    The domain name that is used for health checks.
    healthCheckHttpVersion String
    The version of the HTTP protocol. Default value: HTTP1.1. Valid values: HTTP1.0 and HTTP1.1. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    healthCheckInterval Number
    The interval at which health checks are performed. Unit: seconds. Default value: 2. Valid values: 1 to 50.
    healthCheckMethod String
    The HTTP method that is used for health checks. Default value: GET. Valid values: GET, POST, HEAD. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP, HTTPS, or gRPC. From version 1.215.0, health_check_method can be set to POST.
    healthCheckPath String
    The path that is used for health checks. NOTE: This parameter takes effect only when health_check_protocol is set to HTTP or HTTPS.
    healthCheckProtocol String
    The protocol that is used for health checks. Valid values: HTTP, HTTPS, TCP and gRPC.
    healthCheckTimeout Number
    The timeout period for a health check response. If a backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the ECS instance is considered unhealthy. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If the value of health_check_timeout is smaller than the value of health_check_interval, the value of health_check_timeout is ignored and the value of health_check_interval is used.
    healthyThreshold Number
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10.
    unhealthyThreshold Number
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10.

    ServerGroupServer, ServerGroupServerArgs

    ServerId string
    The ID of the backend server.

    • If server_group_type is set to Instance, set the parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
    • If server_group_type is set to Ip, set the parameter to an IP address specified in the server group.
    • If server_group_type is set to Fc, set the parameter to the Alibaba Cloud Resource Name (ARN) of a function specified in the server group.
    ServerType string
    The type of the server. The type of the server. Valid values:

    • Ecs: an ECS instance.
    • Eni: an ENI.
    • Eci: an elastic container instance.
    • Ip(Available since v1.194.0): an IP address.
    • Fc(Available since v1.194.0): a function.
    Description string
    The description of the backend server.
    Port int
    The port used by the backend server. Valid values: 1 to 65535. Note: This parameter is required if the server_type parameter is set to Ecs, Eni, Eci, or Ip. You do not need to configure this parameter if you set server_type to Fc.
    RemoteIpEnabled bool
    Specifies whether to enable the remote IP address feature. You can specify up to 40 servers in each call. Note: If server_type is set to Ip, this parameter is available.
    ServerIp string
    The IP address of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. Note: If server_group_type is set to Fc, you do not need to configure parameters, otherwise this attribute is required. If server_group_type is set to Ip, the value of this property is the same as the server_id value.
    Status string
    The status of the backend server.
    Weight int
    The weight of the server. Default value: 100. Valid values: 0 to 100. If the value is set to 0, no requests are forwarded to the server. Note: You do not need to set this parameter if you set server_type to Fc.
    ServerId string
    The ID of the backend server.

    • If server_group_type is set to Instance, set the parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
    • If server_group_type is set to Ip, set the parameter to an IP address specified in the server group.
    • If server_group_type is set to Fc, set the parameter to the Alibaba Cloud Resource Name (ARN) of a function specified in the server group.
    ServerType string
    The type of the server. The type of the server. Valid values:

    • Ecs: an ECS instance.
    • Eni: an ENI.
    • Eci: an elastic container instance.
    • Ip(Available since v1.194.0): an IP address.
    • Fc(Available since v1.194.0): a function.
    Description string
    The description of the backend server.
    Port int
    The port used by the backend server. Valid values: 1 to 65535. Note: This parameter is required if the server_type parameter is set to Ecs, Eni, Eci, or Ip. You do not need to configure this parameter if you set server_type to Fc.
    RemoteIpEnabled bool
    Specifies whether to enable the remote IP address feature. You can specify up to 40 servers in each call. Note: If server_type is set to Ip, this parameter is available.
    ServerIp string
    The IP address of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. Note: If server_group_type is set to Fc, you do not need to configure parameters, otherwise this attribute is required. If server_group_type is set to Ip, the value of this property is the same as the server_id value.
    Status string
    The status of the backend server.
    Weight int
    The weight of the server. Default value: 100. Valid values: 0 to 100. If the value is set to 0, no requests are forwarded to the server. Note: You do not need to set this parameter if you set server_type to Fc.
    serverId String
    The ID of the backend server.

    • If server_group_type is set to Instance, set the parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
    • If server_group_type is set to Ip, set the parameter to an IP address specified in the server group.
    • If server_group_type is set to Fc, set the parameter to the Alibaba Cloud Resource Name (ARN) of a function specified in the server group.
    serverType String
    The type of the server. The type of the server. Valid values:

    • Ecs: an ECS instance.
    • Eni: an ENI.
    • Eci: an elastic container instance.
    • Ip(Available since v1.194.0): an IP address.
    • Fc(Available since v1.194.0): a function.
    description String
    The description of the backend server.
    port Integer
    The port used by the backend server. Valid values: 1 to 65535. Note: This parameter is required if the server_type parameter is set to Ecs, Eni, Eci, or Ip. You do not need to configure this parameter if you set server_type to Fc.
    remoteIpEnabled Boolean
    Specifies whether to enable the remote IP address feature. You can specify up to 40 servers in each call. Note: If server_type is set to Ip, this parameter is available.
    serverIp String
    The IP address of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. Note: If server_group_type is set to Fc, you do not need to configure parameters, otherwise this attribute is required. If server_group_type is set to Ip, the value of this property is the same as the server_id value.
    status String
    The status of the backend server.
    weight Integer
    The weight of the server. Default value: 100. Valid values: 0 to 100. If the value is set to 0, no requests are forwarded to the server. Note: You do not need to set this parameter if you set server_type to Fc.
    serverId string
    The ID of the backend server.

    • If server_group_type is set to Instance, set the parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
    • If server_group_type is set to Ip, set the parameter to an IP address specified in the server group.
    • If server_group_type is set to Fc, set the parameter to the Alibaba Cloud Resource Name (ARN) of a function specified in the server group.
    serverType string
    The type of the server. The type of the server. Valid values:

    • Ecs: an ECS instance.
    • Eni: an ENI.
    • Eci: an elastic container instance.
    • Ip(Available since v1.194.0): an IP address.
    • Fc(Available since v1.194.0): a function.
    description string
    The description of the backend server.
    port number
    The port used by the backend server. Valid values: 1 to 65535. Note: This parameter is required if the server_type parameter is set to Ecs, Eni, Eci, or Ip. You do not need to configure this parameter if you set server_type to Fc.
    remoteIpEnabled boolean
    Specifies whether to enable the remote IP address feature. You can specify up to 40 servers in each call. Note: If server_type is set to Ip, this parameter is available.
    serverIp string
    The IP address of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. Note: If server_group_type is set to Fc, you do not need to configure parameters, otherwise this attribute is required. If server_group_type is set to Ip, the value of this property is the same as the server_id value.
    status string
    The status of the backend server.
    weight number
    The weight of the server. Default value: 100. Valid values: 0 to 100. If the value is set to 0, no requests are forwarded to the server. Note: You do not need to set this parameter if you set server_type to Fc.
    server_id str
    The ID of the backend server.

    • If server_group_type is set to Instance, set the parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
    • If server_group_type is set to Ip, set the parameter to an IP address specified in the server group.
    • If server_group_type is set to Fc, set the parameter to the Alibaba Cloud Resource Name (ARN) of a function specified in the server group.
    server_type str
    The type of the server. The type of the server. Valid values:

    • Ecs: an ECS instance.
    • Eni: an ENI.
    • Eci: an elastic container instance.
    • Ip(Available since v1.194.0): an IP address.
    • Fc(Available since v1.194.0): a function.
    description str
    The description of the backend server.
    port int
    The port used by the backend server. Valid values: 1 to 65535. Note: This parameter is required if the server_type parameter is set to Ecs, Eni, Eci, or Ip. You do not need to configure this parameter if you set server_type to Fc.
    remote_ip_enabled bool
    Specifies whether to enable the remote IP address feature. You can specify up to 40 servers in each call. Note: If server_type is set to Ip, this parameter is available.
    server_ip str
    The IP address of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. Note: If server_group_type is set to Fc, you do not need to configure parameters, otherwise this attribute is required. If server_group_type is set to Ip, the value of this property is the same as the server_id value.
    status str
    The status of the backend server.
    weight int
    The weight of the server. Default value: 100. Valid values: 0 to 100. If the value is set to 0, no requests are forwarded to the server. Note: You do not need to set this parameter if you set server_type to Fc.
    serverId String
    The ID of the backend server.

    • If server_group_type is set to Instance, set the parameter to the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. These backend servers are specified by Ecs, Eni, or Eci.
    • If server_group_type is set to Ip, set the parameter to an IP address specified in the server group.
    • If server_group_type is set to Fc, set the parameter to the Alibaba Cloud Resource Name (ARN) of a function specified in the server group.
    serverType String
    The type of the server. The type of the server. Valid values:

    • Ecs: an ECS instance.
    • Eni: an ENI.
    • Eci: an elastic container instance.
    • Ip(Available since v1.194.0): an IP address.
    • Fc(Available since v1.194.0): a function.
    description String
    The description of the backend server.
    port Number
    The port used by the backend server. Valid values: 1 to 65535. Note: This parameter is required if the server_type parameter is set to Ecs, Eni, Eci, or Ip. You do not need to configure this parameter if you set server_type to Fc.
    remoteIpEnabled Boolean
    Specifies whether to enable the remote IP address feature. You can specify up to 40 servers in each call. Note: If server_type is set to Ip, this parameter is available.
    serverIp String
    The IP address of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. Note: If server_group_type is set to Fc, you do not need to configure parameters, otherwise this attribute is required. If server_group_type is set to Ip, the value of this property is the same as the server_id value.
    status String
    The status of the backend server.
    weight Number
    The weight of the server. Default value: 100. Valid values: 0 to 100. If the value is set to 0, no requests are forwarded to the server. Note: You do not need to set this parameter if you set server_type to Fc.

    ServerGroupStickySessionConfig, ServerGroupStickySessionConfigArgs

    Cookie string
    The cookie to be configured on the server. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Server.
    CookieTimeout int
    The timeout period of a cookie. Unit: seconds. Default value: 1000. Valid values: 1 to 86400. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Insert.
    StickySessionEnabled bool
    Specifies whether to enable session persistence. Default value: false. Valid values: true, false. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    StickySessionType string
    The method that is used to handle a cookie. Valid values: Server, Insert.
    Cookie string
    The cookie to be configured on the server. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Server.
    CookieTimeout int
    The timeout period of a cookie. Unit: seconds. Default value: 1000. Valid values: 1 to 86400. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Insert.
    StickySessionEnabled bool
    Specifies whether to enable session persistence. Default value: false. Valid values: true, false. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    StickySessionType string
    The method that is used to handle a cookie. Valid values: Server, Insert.
    cookie String
    The cookie to be configured on the server. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Server.
    cookieTimeout Integer
    The timeout period of a cookie. Unit: seconds. Default value: 1000. Valid values: 1 to 86400. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Insert.
    stickySessionEnabled Boolean
    Specifies whether to enable session persistence. Default value: false. Valid values: true, false. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    stickySessionType String
    The method that is used to handle a cookie. Valid values: Server, Insert.
    cookie string
    The cookie to be configured on the server. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Server.
    cookieTimeout number
    The timeout period of a cookie. Unit: seconds. Default value: 1000. Valid values: 1 to 86400. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Insert.
    stickySessionEnabled boolean
    Specifies whether to enable session persistence. Default value: false. Valid values: true, false. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    stickySessionType string
    The method that is used to handle a cookie. Valid values: Server, Insert.
    cookie str
    The cookie to be configured on the server. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Server.
    cookie_timeout int
    The timeout period of a cookie. Unit: seconds. Default value: 1000. Valid values: 1 to 86400. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Insert.
    sticky_session_enabled bool
    Specifies whether to enable session persistence. Default value: false. Valid values: true, false. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    sticky_session_type str
    The method that is used to handle a cookie. Valid values: Server, Insert.
    cookie String
    The cookie to be configured on the server. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Server.
    cookieTimeout Number
    The timeout period of a cookie. Unit: seconds. Default value: 1000. Valid values: 1 to 86400. NOTE: This parameter takes effect when the sticky_session_enabled parameter is set to true and the sticky_session_type parameter is set to Insert.
    stickySessionEnabled Boolean
    Specifies whether to enable session persistence. Default value: false. Valid values: true, false. NOTE: This parameter takes effect when the server_group_type parameter is set to Instance or Ip.
    stickySessionType String
    The method that is used to handle a cookie. Valid values: Server, Insert.

    Import

    ALB Server Group can be imported using the id, e.g.

    $ pulumi import alicloud:alb/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