1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ess
  5. ScalingGroupVServerGroups
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ess.ScalingGroupVServerGroups

Explore with Pulumi AI

Attaches/Detaches vserver groups to a specified scaling group.

NOTE: The load balancer of which vserver groups belongs to must be in active status.

NOTE: If scaling group’s network type is VPC, the vserver groups must be in the same VPC.

NOTE: A scaling group can have at most 5 vserver groups attached by default.

NOTE: Vserver groups and the default group of loadbalancer share the same backend server quota.

NOTE: When attach vserver groups to scaling group, existing ECS instances will be added to vserver groups; Instead, ECS instances will be removed from vserver group when detach.

NOTE: Detach action will be executed before attach action.

NOTE: Vserver group is defined uniquely by loadbalancer_id, vserver_group_id, port.

NOTE: Modifing weight attribute means detach vserver group first and then, attach with new weight parameter.

NOTE: Available since v1.53.0.

Create ScalingGroupVServerGroups Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ScalingGroupVServerGroups(name: string, args: ScalingGroupVServerGroupsArgs, opts?: CustomResourceOptions);
@overload
def ScalingGroupVServerGroups(resource_name: str,
                              args: ScalingGroupVServerGroupsArgs,
                              opts: Optional[ResourceOptions] = None)

@overload
def ScalingGroupVServerGroups(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              scaling_group_id: Optional[str] = None,
                              vserver_groups: Optional[Sequence[ScalingGroupVServerGroupsVserverGroupArgs]] = None,
                              force: Optional[bool] = None)
func NewScalingGroupVServerGroups(ctx *Context, name string, args ScalingGroupVServerGroupsArgs, opts ...ResourceOption) (*ScalingGroupVServerGroups, error)
public ScalingGroupVServerGroups(string name, ScalingGroupVServerGroupsArgs args, CustomResourceOptions? opts = null)
public ScalingGroupVServerGroups(String name, ScalingGroupVServerGroupsArgs args)
public ScalingGroupVServerGroups(String name, ScalingGroupVServerGroupsArgs args, CustomResourceOptions options)
type: alicloud:ess:ScalingGroupVServerGroups
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ScalingGroupVServerGroupsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ScalingGroupVServerGroupsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ScalingGroupVServerGroupsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ScalingGroupVServerGroupsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ScalingGroupVServerGroupsArgs
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 scalingGroupVServerGroupsResource = new AliCloud.Ess.ScalingGroupVServerGroups("scalingGroupVServerGroupsResource", new()
{
    ScalingGroupId = "string",
    VserverGroups = new[]
    {
        new AliCloud.Ess.Inputs.ScalingGroupVServerGroupsVserverGroupArgs
        {
            LoadbalancerId = "string",
            VserverAttributes = new[]
            {
                new AliCloud.Ess.Inputs.ScalingGroupVServerGroupsVserverGroupVserverAttributeArgs
                {
                    Port = 0,
                    VserverGroupId = "string",
                    Weight = 0,
                },
            },
        },
    },
    Force = false,
});
Copy
example, err := ess.NewScalingGroupVServerGroups(ctx, "scalingGroupVServerGroupsResource", &ess.ScalingGroupVServerGroupsArgs{
	ScalingGroupId: pulumi.String("string"),
	VserverGroups: ess.ScalingGroupVServerGroupsVserverGroupArray{
		&ess.ScalingGroupVServerGroupsVserverGroupArgs{
			LoadbalancerId: pulumi.String("string"),
			VserverAttributes: ess.ScalingGroupVServerGroupsVserverGroupVserverAttributeArray{
				&ess.ScalingGroupVServerGroupsVserverGroupVserverAttributeArgs{
					Port:           pulumi.Int(0),
					VserverGroupId: pulumi.String("string"),
					Weight:         pulumi.Int(0),
				},
			},
		},
	},
	Force: pulumi.Bool(false),
})
Copy
var scalingGroupVServerGroupsResource = new ScalingGroupVServerGroups("scalingGroupVServerGroupsResource", ScalingGroupVServerGroupsArgs.builder()
    .scalingGroupId("string")
    .vserverGroups(ScalingGroupVServerGroupsVserverGroupArgs.builder()
        .loadbalancerId("string")
        .vserverAttributes(ScalingGroupVServerGroupsVserverGroupVserverAttributeArgs.builder()
            .port(0)
            .vserverGroupId("string")
            .weight(0)
            .build())
        .build())
    .force(false)
    .build());
Copy
scaling_group_v_server_groups_resource = alicloud.ess.ScalingGroupVServerGroups("scalingGroupVServerGroupsResource",
    scaling_group_id="string",
    vserver_groups=[{
        "loadbalancer_id": "string",
        "vserver_attributes": [{
            "port": 0,
            "vserver_group_id": "string",
            "weight": 0,
        }],
    }],
    force=False)
Copy
const scalingGroupVServerGroupsResource = new alicloud.ess.ScalingGroupVServerGroups("scalingGroupVServerGroupsResource", {
    scalingGroupId: "string",
    vserverGroups: [{
        loadbalancerId: "string",
        vserverAttributes: [{
            port: 0,
            vserverGroupId: "string",
            weight: 0,
        }],
    }],
    force: false,
});
Copy
type: alicloud:ess:ScalingGroupVServerGroups
properties:
    force: false
    scalingGroupId: string
    vserverGroups:
        - loadbalancerId: string
          vserverAttributes:
            - port: 0
              vserverGroupId: string
              weight: 0
Copy

ScalingGroupVServerGroups Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ScalingGroupVServerGroups resource accepts the following input properties:

ScalingGroupId
This property is required.
Changes to this property will trigger replacement.
string
ID of the scaling group.
VserverGroups This property is required. List<Pulumi.AliCloud.Ess.Inputs.ScalingGroupVServerGroupsVserverGroup>
A list of vserver groups attached on scaling group. See vserver_groups below.
Force bool
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
ScalingGroupId
This property is required.
Changes to this property will trigger replacement.
string
ID of the scaling group.
VserverGroups This property is required. []ScalingGroupVServerGroupsVserverGroupArgs
A list of vserver groups attached on scaling group. See vserver_groups below.
Force bool
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
scalingGroupId
This property is required.
Changes to this property will trigger replacement.
String
ID of the scaling group.
vserverGroups This property is required. List<ScalingGroupVServerGroupsVserverGroup>
A list of vserver groups attached on scaling group. See vserver_groups below.
force Boolean
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
scalingGroupId
This property is required.
Changes to this property will trigger replacement.
string
ID of the scaling group.
vserverGroups This property is required. ScalingGroupVServerGroupsVserverGroup[]
A list of vserver groups attached on scaling group. See vserver_groups below.
force boolean
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
scaling_group_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the scaling group.
vserver_groups This property is required. Sequence[ScalingGroupVServerGroupsVserverGroupArgs]
A list of vserver groups attached on scaling group. See vserver_groups below.
force bool
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
scalingGroupId
This property is required.
Changes to this property will trigger replacement.
String
ID of the scaling group.
vserverGroups This property is required. List<Property Map>
A list of vserver groups attached on scaling group. See vserver_groups below.
force Boolean
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ScalingGroupVServerGroups Resource

Get an existing ScalingGroupVServerGroups 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?: ScalingGroupVServerGroupsState, opts?: CustomResourceOptions): ScalingGroupVServerGroups
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        force: Optional[bool] = None,
        scaling_group_id: Optional[str] = None,
        vserver_groups: Optional[Sequence[ScalingGroupVServerGroupsVserverGroupArgs]] = None) -> ScalingGroupVServerGroups
func GetScalingGroupVServerGroups(ctx *Context, name string, id IDInput, state *ScalingGroupVServerGroupsState, opts ...ResourceOption) (*ScalingGroupVServerGroups, error)
public static ScalingGroupVServerGroups Get(string name, Input<string> id, ScalingGroupVServerGroupsState? state, CustomResourceOptions? opts = null)
public static ScalingGroupVServerGroups get(String name, Output<String> id, ScalingGroupVServerGroupsState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ess:ScalingGroupVServerGroups    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Force bool
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
ScalingGroupId Changes to this property will trigger replacement. string
ID of the scaling group.
VserverGroups List<Pulumi.AliCloud.Ess.Inputs.ScalingGroupVServerGroupsVserverGroup>
A list of vserver groups attached on scaling group. See vserver_groups below.
Force bool
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
ScalingGroupId Changes to this property will trigger replacement. string
ID of the scaling group.
VserverGroups []ScalingGroupVServerGroupsVserverGroupArgs
A list of vserver groups attached on scaling group. See vserver_groups below.
force Boolean
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
scalingGroupId Changes to this property will trigger replacement. String
ID of the scaling group.
vserverGroups List<ScalingGroupVServerGroupsVserverGroup>
A list of vserver groups attached on scaling group. See vserver_groups below.
force boolean
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
scalingGroupId Changes to this property will trigger replacement. string
ID of the scaling group.
vserverGroups ScalingGroupVServerGroupsVserverGroup[]
A list of vserver groups attached on scaling group. See vserver_groups below.
force bool
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
scaling_group_id Changes to this property will trigger replacement. str
ID of the scaling group.
vserver_groups Sequence[ScalingGroupVServerGroupsVserverGroupArgs]
A list of vserver groups attached on scaling group. See vserver_groups below.
force Boolean
If instances of scaling group are attached/removed from slb backend server when attach/detach vserver group from scaling group. Default to true.
scalingGroupId Changes to this property will trigger replacement. String
ID of the scaling group.
vserverGroups List<Property Map>
A list of vserver groups attached on scaling group. See vserver_groups below.

Supporting Types

ScalingGroupVServerGroupsVserverGroup
, ScalingGroupVServerGroupsVserverGroupArgs

LoadbalancerId This property is required. string
Loadbalancer server ID of VServer Group.
VserverAttributes This property is required. List<Pulumi.AliCloud.Ess.Inputs.ScalingGroupVServerGroupsVserverGroupVserverAttribute>
A list of VServer Group attributes. See vserver_attributes below.
LoadbalancerId This property is required. string
Loadbalancer server ID of VServer Group.
VserverAttributes This property is required. []ScalingGroupVServerGroupsVserverGroupVserverAttribute
A list of VServer Group attributes. See vserver_attributes below.
loadbalancerId This property is required. String
Loadbalancer server ID of VServer Group.
vserverAttributes This property is required. List<ScalingGroupVServerGroupsVserverGroupVserverAttribute>
A list of VServer Group attributes. See vserver_attributes below.
loadbalancerId This property is required. string
Loadbalancer server ID of VServer Group.
vserverAttributes This property is required. ScalingGroupVServerGroupsVserverGroupVserverAttribute[]
A list of VServer Group attributes. See vserver_attributes below.
loadbalancer_id This property is required. str
Loadbalancer server ID of VServer Group.
vserver_attributes This property is required. Sequence[ScalingGroupVServerGroupsVserverGroupVserverAttribute]
A list of VServer Group attributes. See vserver_attributes below.
loadbalancerId This property is required. String
Loadbalancer server ID of VServer Group.
vserverAttributes This property is required. List<Property Map>
A list of VServer Group attributes. See vserver_attributes below.

ScalingGroupVServerGroupsVserverGroupVserverAttribute
, ScalingGroupVServerGroupsVserverGroupVserverAttributeArgs

Port This property is required. int
The port will be used for VServer Group backend server.
VserverGroupId This property is required. string
ID of VServer Group.
Weight This property is required. int
The weight of an ECS instance attached to the VServer Group.
Port This property is required. int
The port will be used for VServer Group backend server.
VserverGroupId This property is required. string
ID of VServer Group.
Weight This property is required. int
The weight of an ECS instance attached to the VServer Group.
port This property is required. Integer
The port will be used for VServer Group backend server.
vserverGroupId This property is required. String
ID of VServer Group.
weight This property is required. Integer
The weight of an ECS instance attached to the VServer Group.
port This property is required. number
The port will be used for VServer Group backend server.
vserverGroupId This property is required. string
ID of VServer Group.
weight This property is required. number
The weight of an ECS instance attached to the VServer Group.
port This property is required. int
The port will be used for VServer Group backend server.
vserver_group_id This property is required. str
ID of VServer Group.
weight This property is required. int
The weight of an ECS instance attached to the VServer Group.
port This property is required. Number
The port will be used for VServer Group backend server.
vserverGroupId This property is required. String
ID of VServer Group.
weight This property is required. Number
The weight of an ECS instance attached to the VServer Group.

Import

ESS vserver groups can be imported using the id, e.g.

$ pulumi import alicloud:ess/scalingGroupVServerGroups:ScalingGroupVServerGroups example abc123456
Copy

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.