1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ess
  5. ScalingGroupVServerGroups
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

alicloud.ess.ScalingGroupVServerGroups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi

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

    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=[alicloud.ess.ScalingGroupVServerGroupsVserverGroupArgs(
            loadbalancer_id="string",
            vserver_attributes=[alicloud.ess.ScalingGroupVServerGroupsVserverGroupVserverAttributeArgs(
                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

    The ScalingGroupVServerGroups resource accepts the following input properties:

    ScalingGroupId 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 string
    ID of the scaling group.
    VserverGroups []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 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 string
    ID of the scaling group.
    vserverGroups 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 str
    ID of the scaling group.
    vserver_groups 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 String
    ID of the scaling group.
    vserverGroups 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.
    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 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 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 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 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 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 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 string
    Loadbalancer server ID of VServer Group.
    VserverAttributes List<Pulumi.AliCloud.Ess.Inputs.ScalingGroupVServerGroupsVserverGroupVserverAttribute>
    A list of VServer Group attributes. See vserver_attributes below.
    LoadbalancerId string
    Loadbalancer server ID of VServer Group.
    VserverAttributes []ScalingGroupVServerGroupsVserverGroupVserverAttribute
    A list of VServer Group attributes. See vserver_attributes below.
    loadbalancerId String
    Loadbalancer server ID of VServer Group.
    vserverAttributes List<ScalingGroupVServerGroupsVserverGroupVserverAttribute>
    A list of VServer Group attributes. See vserver_attributes below.
    loadbalancerId string
    Loadbalancer server ID of VServer Group.
    vserverAttributes ScalingGroupVServerGroupsVserverGroupVserverAttribute[]
    A list of VServer Group attributes. See vserver_attributes below.
    loadbalancer_id str
    Loadbalancer server ID of VServer Group.
    vserver_attributes Sequence[ScalingGroupVServerGroupsVserverGroupVserverAttribute]
    A list of VServer Group attributes. See vserver_attributes below.
    loadbalancerId String
    Loadbalancer server ID of VServer Group.
    vserverAttributes List<Property Map>
    A list of VServer Group attributes. See vserver_attributes below.

    ScalingGroupVServerGroupsVserverGroupVserverAttribute, ScalingGroupVServerGroupsVserverGroupVserverAttributeArgs

    port Integer
    vserverGroupId String
    weight Integer
    port number
    vserverGroupId string
    weight number
    port Number
    vserverGroupId String
    weight Number

    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.
    alicloud logo
    Alibaba Cloud v3.56.0 published on Friday, May 31, 2024 by Pulumi