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 sameVPC
.
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 string
- The unique name of the resource.
- args ScalingGroupVServerGroupsArgs
- 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 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 string
- The unique name of the resource.
- args ScalingGroupVServerGroupsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScalingGroupVServerGroupsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
});
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),
})
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());
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)
const scalingGroupVServerGroupsResource = new alicloud.ess.ScalingGroupVServerGroups("scalingGroupVServerGroupsResource", {
scalingGroupId: "string",
vserverGroups: [{
loadbalancerId: "string",
vserverAttributes: [{
port: 0,
vserverGroupId: "string",
weight: 0,
}],
}],
force: false,
});
type: alicloud:ess:ScalingGroupVServerGroups
properties:
force: false
scalingGroupId: string
vserverGroups:
- loadbalancerId: string
vserverAttributes:
- port: 0
vserverGroupId: string
weight: 0
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:
- Scaling
Group stringId - ID of the scaling group.
- Vserver
Groups List<Pulumi.Ali Cloud. Ess. Inputs. Scaling Group VServer Groups Vserver Group> - 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 stringId - ID of the scaling group.
- Vserver
Groups []ScalingGroup VServer Groups Vserver Group Args - 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 StringId - ID of the scaling group.
- vserver
Groups List<ScalingGroup VServer Groups Vserver Group> - 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 stringId - ID of the scaling group.
- vserver
Groups ScalingGroup VServer Groups Vserver Group[] - 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_ strid - ID of the scaling group.
- vserver_
groups Sequence[ScalingGroup VServer Groups Vserver Group Args] - 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 StringId - ID of the scaling group.
- vserver
Groups 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)
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.
- 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 stringId - ID of the scaling group.
- Vserver
Groups List<Pulumi.Ali Cloud. Ess. Inputs. Scaling Group VServer Groups Vserver Group> - 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 stringId - ID of the scaling group.
- Vserver
Groups []ScalingGroup VServer Groups Vserver Group Args - 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 StringId - ID of the scaling group.
- vserver
Groups List<ScalingGroup VServer Groups Vserver Group> - 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 stringId - ID of the scaling group.
- vserver
Groups ScalingGroup VServer Groups Vserver Group[] - 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_ strid - ID of the scaling group.
- vserver_
groups Sequence[ScalingGroup VServer Groups Vserver Group Args] - 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 StringId - ID of the scaling group.
- vserver
Groups List<Property Map> - A list of vserver groups attached on scaling group. See
vserver_groups
below.
Supporting Types
ScalingGroupVServerGroupsVserverGroup, ScalingGroupVServerGroupsVserverGroupArgs
- Loadbalancer
Id string - Loadbalancer server ID of VServer Group.
- Vserver
Attributes List<Pulumi.Ali Cloud. Ess. Inputs. Scaling Group VServer Groups Vserver Group Vserver Attribute> - A list of VServer Group attributes. See
vserver_attributes
below.
- Loadbalancer
Id string - Loadbalancer server ID of VServer Group.
- Vserver
Attributes []ScalingGroup VServer Groups Vserver Group Vserver Attribute - A list of VServer Group attributes. See
vserver_attributes
below.
- loadbalancer
Id String - Loadbalancer server ID of VServer Group.
- vserver
Attributes List<ScalingGroup VServer Groups Vserver Group Vserver Attribute> - A list of VServer Group attributes. See
vserver_attributes
below.
- loadbalancer
Id string - Loadbalancer server ID of VServer Group.
- vserver
Attributes ScalingGroup VServer Groups Vserver Group Vserver Attribute[] - A list of VServer Group attributes. See
vserver_attributes
below.
- loadbalancer_
id str - Loadbalancer server ID of VServer Group.
- vserver_
attributes Sequence[ScalingGroup VServer Groups Vserver Group Vserver Attribute] - A list of VServer Group attributes. See
vserver_attributes
below.
- loadbalancer
Id String - Loadbalancer server ID of VServer Group.
- vserver
Attributes List<Property Map> - A list of VServer Group attributes. See
vserver_attributes
below.
ScalingGroupVServerGroupsVserverGroupVserverAttribute, ScalingGroupVServerGroupsVserverGroupVserverAttributeArgs
- Port int
- The port will be used for VServer Group backend server.
- Vserver
Group stringId - ID of VServer Group.
- Weight int
- The weight of an ECS instance attached to the VServer Group.
- Port int
- The port will be used for VServer Group backend server.
- Vserver
Group stringId - ID of VServer Group.
- Weight int
- The weight of an ECS instance attached to the VServer Group.
- port Integer
- The port will be used for VServer Group backend server.
- vserver
Group StringId - ID of VServer Group.
- weight Integer
- The weight of an ECS instance attached to the VServer Group.
- port number
- The port will be used for VServer Group backend server.
- vserver
Group stringId - ID of VServer Group.
- weight number
- The weight of an ECS instance attached to the VServer Group.
- port int
- The port will be used for VServer Group backend server.
- vserver_
group_ strid - ID of VServer Group.
- weight int
- The weight of an ECS instance attached to the VServer Group.
- port Number
- The port will be used for VServer Group backend server.
- vserver
Group StringId - ID of VServer Group.
- weight 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
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.