All Products
Search
Document Center

Resource Orchestration Service:UpdateStackGroup

Last Updated:Feb 22, 2024

The region ID of the stack group. You can call the \[DescribeRegions]\(~~131035~~) operation to query the latest list of Alibaba Cloud regions.

Operation description

The name of the stack group. The name must be unique within a region.

The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). The name must start with a digit or a letter.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ros:UpdateStackGroupWRITE
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region IDs of stack instances. You can specify a maximum of 20 region IDs.

cn-hangzhou
StackGroupNamestringYes

The region IDs of stack instances. You can specify a maximum of 20 region IDs.

MyStackGroup
DescriptionstringNo

The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body exceeds the upper limit, we recommend that you add parameters to the HTTP POST request body to prevent request failures caused by excessively long URLs.

Note You must specify only one of the TemplateBody, TemplateURL, and TemplateId parameters.
My Stack Group
AccountIdsarrayNo

The URL of the file that contains the template body. The URL must point to a template that is located on an HTTP or HTTPS web server or in an Alibaba Cloud Object Storage Service (OSS) bucket. The template body must be 1 to 524,288 bytes in length. Examples: oss://ros/template/demo and oss://ros/template/demo?RegionId=cn-hangzhou. If you do not specify the region ID of the OSS bucket, the value of the RegionId parameter is used.

Note You must specify only one of the TemplateBody, TemplateURL, and TemplateId parameters.
stringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the token is unique among different requests.

The token can be up to 64 characters in length and can contain letters, digits, hyphens (-), and underscores (_).

For more information, see Ensure idempotence.

["151266687691****","141261387191****"]
RegionIdsarrayNo

The description of the operation to update the stack group.

stringNo

The preferences of the operation to update the stack group.

The following parameters are available:

  • {"FailureToleranceCount": N}

    The maximum number of accounts within which stack operation failures are allowed in each region. If the value is exceeded in a region, ROS stops the operation in the region. If ROS stops the operation in one region, the operation is not performed in other regions.

    Valid values of N: 0 to 20.

    If you do not specify a value for the FailureToleranceCount parameter, the default value 0 is used.

  • {"FailureTolerancePercentage": N}

    The percentage of accounts within which stack operation failures are allowed in each region. If the value is exceeded in a region, ROS stops the operation in the region.

    Valid values of N: 0 to 100. If the number of accounts specified by the percentage is not a whole number, ROS rounds down the number.

    If you do not specify a value for the FailureTolerancePercentage parameter, the default value 0 is used.

  • {"MaxConcurrentCount": N}

    The maximum number of accounts within which stacks can be deployed at a time in each region.

    Valid values of N: 1 to 20.

    If you do not specify a value for the MaxConcurrentCount parameter, the default value 1 is used.

  • {"MaxConcurrentPercentage": N}

    The percentage of accounts within which stacks can be deployed at a time in each region.

    Valid values of N: 1 to 100. If the number of accounts specified by the percentage is not a whole number, ROS rounds down the number.

    If you do not specify a value for the MaxConcurrentPercentage parameter, the default value 1 is used.

  • {"RegionConcurrencyType": N}

    Specifies whether stacks can be deployed in multiple regions in parallel. Valid values:

    • SEQUENTIAL: deploys stacks in the specified regions one by one in sequence. This way, stacks are deployed in only one region at a time. This is the default value.
    • PARALLEL: deploys stacks in all the specified regions in parallel.

Separate multiple parameters with commas (,).

Note
  • You can specify only one of the MaxConcurrentCount and MaxConcurrentPercentage parameters.
  • You can specify only one of the FailureToleranceCount and FailureTolerancePercentage parameters.
  • ["cn-hangzhou","cn-beijing"]
    TemplateBodystringNo

    The name of the RAM role to be assumed by the administrator account in ROS. This parameter is required if you want to grant self-managed permissions to the stack group. If you do not specify a value for this parameter, the default value AliyunROSStackGroupAdministrationRole is used. You can use the administrator role in ROS to assume the execution role AliyunROSStackGroupExecutionRole to perform operations on the stacks that correspond to stack instances in the stack group.

    The name must be 1 to 64 characters in length, and can contain letters, digits, and hyphens (-).

    {"ROSTemplateFormatVersion": "2015-09-01"}
    TemplateURLstringNo

    The name of the RAM role to be assumed by the administrator role AliyunROSStackGroupAdministrationRole. This parameter is required if you want to grant self-managed permissions to the stack group. If you do not specify a value for this parameter, the default value AliyunROSStackGroupExecutionRole is used. You can use this role in ROS to perform operations on the stacks that correspond to stack instances in the stack group.

    The name must be 1 to 64 characters in length, and can contain letters, digits, and hyphens (-).

    oss://ros-template/demo
    ClientTokenstringNo

    The ID of the template. This parameter applies to shared and private templates.

    Note You must specify only one of the TemplateBody, TemplateURL, and TemplateId parameters.
    123e4567-e89b-12d3-a456-42665544****
    OperationDescriptionstringNo

    The version of the template. If you do not specify a version, the latest version is used.

    Note This parameter takes effect only if the TemplateId parameter is set.
    Update stack instances in hangzhou
    OperationPreferencesobjectNo

    The list of parameters.

    {"FailureToleranceCount": 1,"MaxConcurrentCount": 2}
    AdministrationRoleNamestringNo

    The key of parameter N. If you do not specify the key and value of the parameter, ROS uses the default key and value in the template.

    Maximum value of N: 200.

    Note The Parameters parameter is optional. If you set the Parameters parameter, you must set the Parameters.N.ParameterKey parameter.
    AliyunROSStackGroupAdministrationRole
    ExecutionRoleNamestringNo

    The value of parameter N.

    Maximum value of N: 200.

    Note The Parameters parameter is optional. If you set the Parameters parameter, you must set the Parameters.N.ParameterValue parameter.
    AliyunROSStackGroupExecutionRole
    TemplateIdstringNo

    The permission model.

    Valid values:

    • SELF_MANAGED: the self-managed permission model. This is the default value. If you use the self-managed model for the stack group, you must create RAM roles for the administrator and execution accounts, and establish a trust relationship between the accounts to deploy stacks within the execution account.
    • SERVICE_MANAGED: the service-managed permission model. If you use the service-managed model for the stack group, ROS creates service-linked roles for the administrator and execution accounts, and the administrator account uses its role to deploy stacks within the execution account.
    Note
  • If stack instances have been created in the stack group, you cannot switch the permission mode of the stack group.
  • If you want to use the service-managed permission model to deploy stacks, your account must be the management account or a delegated administrator account of your resource directory and the trusted access feature is enabled for the account. For more information, see Step 1: (Optional) Create a delegated administrator account and Step 2: Enable trusted access.
  • 5ecd1e10-b0e9-4389-a565-e4c15efc****
    TemplateVersionstringNo

    The information about automatic deployment settings.

    Note This parameter is required only if the PermissionModel parameter is set to SERVICE_MANAGED.
    v1
    Parametersobject []No

    Specifies whether to enable automatic deployment.

    Valid values:

    • true: enables automatic deployment. If you add a member to the folder to which the stack group belongs after you enable automatic deployment, the stack group deploys its stack instances within the member. If you remove a member from the folder, the stack group deletes stack instances that are deployed within the member.
    • false: disables automatic deployment. After you disable automatic deployment, the stack instances remain unchanged even if members in the folder change.
    ParameterKeystringYes

    Specifies whether to retain stacks in a member when you remove the member from the folder.

    Valid values:

    • true: retains the stacks.
    • false: deletes the stacks.
    Note This parameter is required if the Enabled parameter is set to true.
    Amount
    ParameterValuestringYes

    The folders in which you want to use service-managed permissions to update stacks.

    1
    PermissionModelstringNo

    The folder IDs in the resource directory. You can specify a maximum of five folder IDs.

    You must set at least one of the RdFolderIds and AccountIds parameters. The parameters are subject to the following items:

    • If you set only the RdFolderIds parameter, stacks are deployed within all the members in the specified folders. If you specify the Root folder, ROS deploys the stacks within all the members in the resource directory.
    • If you set only the AccountIds parameter, stacks are deployed within the specified members.
    • If you set both parameters, the accounts specified by AccountIds must be contained in the folders specified by RdFolderIds.
    Note To view the folder IDs, go to the Overview page in the Resource Management console. For more information, see View the basic information of a folder.
    SELF_MANAGED
    AutoDeploymentobjectNo

    The IDs of the folders in the resource directory. You can specify up to five folder IDs.

    You can create stacks within all members in the specified folders. If you create stacks in the Root folder, the stacks are created within all members in the resource directory.

    Note To view the folder IDs, go to the Overview page in the Resource Management console. For more information, see View the basic information of a folder.
    EnabledbooleanYes

    The IDs of the members in the resource directory. You can specify a maximum of 20 member IDs.

    Note To view the member IDs, go to the Overview page in the Resource Management console. For more information, see View the detailed information of a member.
    true
    RetainStacksOnAccountRemovalbooleanNo

    The IDs of the members in the resource directory. You can specify a maximum of 20 member IDs.

    Note To view the member IDs, go to the Overview page in the Resource Management console. For more information, see View the detailed information of a member.
    true
    DeploymentTargetsobjectNo

    The ID of the request.

    RdFolderIdsarrayNo

    The ID of the operation.

    stringNo

    The IDs of the folders in the resource directory. You can add up to five folder IDs.

    You can create stacks within all members in the specified folders. If you create stacks in the Root folder, the stacks are created within all members in the resource directory.

    Note To view the folder IDs, go to the Overview page in the Resource Management console. For more information, see View the basic information of a folder.
    ["fd-4PvlVLOL8v"]
    AccountIdsarrayNo

    The list of one or more Alibaba Cloud accounts with which you want to share or unshare the template.

    stringNo

    The IDs of the members in the resource directory. You can specify up to 20 member IDs.

    Note To view the member IDs, go to the Overview page in the Resource Management console. For more information, see View the detailed information of a member.
    ["151266687691****","141261387191****"]
    CapabilitiesarrayNo

    The option for the stack group. You can specify up to one option.

    stringNo

    The option for the stack group. Valid value: ExpandModules. A value of ExpandModules specifies to expand modules within the current account.

    Note
  • This parameter takes effect only when modules are used in the template.
  • By default, modules are not expanded within the current account. This requires that the modules exist in all execution accounts within which you want to deploy the stack group. If you want to expand modules within the current account, the modules must exist in the current account.
  • ExpandModules

    The description of the stack group.

    The description must be 1 to 256 characters in length.

    Response parameters

    ParameterTypeDescriptionExample
    object
    RequestIdstring

    The ID of the request.

    14A07460-EBE7-47CA-9757-12CC4761D47A
    OperationIdstring

    The ID of the operation.

    6da106ca-1784-4a6f-a7e1-e723863d****

    The IDs of the accounts within which you want to use self-managed permissions to deploy stacks. You can specify a maximum of 20 account IDs.

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
      "OperationId": "6da106ca-1784-4a6f-a7e1-e723863d****"
    }

    Error codes

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-01-11The internal configuration of the API is changed, but the call is not affectedsee changesets
    Change itemChange content
    The internal configuration of the API is changed, but the call is not affected.
    2023-05-10The request parameters of the API has changedsee changesets
    Change itemChange content
    Input ParametersThe request parameters of the API has changed.
      Added Input Parameters: Capabilities