UpdateStackGroup
Updates an existing stack group.
Operation description
This topic provides an example on how to update the template of an existing stack group named MyStackGroup that uses the self-managed permissions mode in the China (Hangzhou) region to {"ROSTemplateFormatVersion": "2015-09-01"}.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:UpdateStackGroup |
update |
*StackGroup
Template
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the stack group. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| StackGroupName |
string |
Yes |
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 must start with a digit or a letter. It can contain digits, letters, hyphens (-), and underscores (_). |
MyStackGroup |
| Description |
string |
No |
The description of the stack group. The description must be 1 to 256 characters in length. |
My Stack Group |
| AccountIds |
array |
No |
The list of execution account IDs used to deploy stacks in the self-managed permissions mode. You can add up to 50 execution account IDs. |
["12****"] |
|
string |
No |
The list of execution account IDs used to deploy stacks in the self-managed permissions mode. You can add up to 50 execution account IDs. |
["151266687691****","141261387191****"] |
|
| RegionIds |
array |
No |
The list of target regions where stacks are deployed. You can add up to 20 regions. |
["cn-hangzhou", "cn-beijing"] |
|
string |
No |
The list of target regions where stacks are deployed. You can add up to 20 regions. |
["cn-hangzhou","cn-beijing"] |
|
| TemplateBody |
string |
No |
The structure of the template body. The template body must be 1 to 524,288 bytes in length. If the template body is large, use the HTTP POST method and include the parameter in the request body to prevent request failures caused by an excessively long URL. Note
You must specify only one of the following parameters: TemplateBody, TemplateURL, and TemplateId. |
{"ROSTemplateFormatVersion": "2015-09-01"} |
| TemplateURL |
string |
No |
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 Object Storage Service (OSS) bucket. The template must be 1 to 524,288 bytes in length. Example of an OSS bucket URL: oss://ros/template/demo or oss://ros/template/demo?RegionId=cn-hangzhou. If the region of the OSS bucket is not specified, the region of the OSS bucket is the same as the value of the RegionId parameter. Note
You must specify only one of the following parameters: TemplateBody, TemplateURL, and TemplateId. |
oss://ros-template/demo |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, 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. |
123e4567-e89b-12d3-a456-42665544**** |
| OperationDescription |
string |
No |
The description of the stack group update operation. |
Update stack instances in hangzhou |
| OperationPreferences |
object |
No |
The operation settings for updating the stack group. This parameter includes the following fields:
Separate multiple parameters with commas (,). Note
|
{"FailureToleranceCount": 1,"MaxConcurrentCount": 2} |
| AdministrationRoleName |
string |
No |
The name of the Resource Access Management (RAM) administrator role that is assumed by ROS when you create a stack group with self-managed permissions. If you do not specify this parameter, AliyunROSStackGroupAdministrationRole is used by default. ROS assumes this role to further assume the execution role (AliyunROSStackGroupExecutionRole) and manage the stacks that correspond to the stack instances in the stack group. The name must be 1 to 64 characters in length, and can contain letters, digits, and hyphens (-). |
AliyunROSStackGroupAdministrationRole |
| ExecutionRoleName |
string |
No |
The name of the RAM execution role that is assumed by the administrator role (AliyunROSStackGroupAdministrationRole) when you create a stack group with self-managed permissions. If you do not specify this parameter, AliyunROSStackGroupExecutionRole is used by default. ROS assumes this role to manage the stacks that correspond to the stack instances in the stack group. The name must be 1 to 64 characters in length, and can contain letters, digits, and hyphens (-). |
AliyunROSStackGroupExecutionRole |
| TemplateId |
string |
No |
The ID of the template. Shared templates and private templates are supported. Note
You must specify only one of the following parameters: TemplateBody, TemplateURL, and TemplateId. |
5ecd1e10-b0e9-4389-a565-e4c15efc**** |
| TemplateVersion |
string |
No |
The version of the template. If you do not specify this parameter, the latest version is used by default. Note
TemplateVersion takes effect only when TemplateId is specified. |
v1 |
| Parameters |
array<object> |
No |
The list of parameters for the stack group. |
|
|
object |
No |
|||
| ParameterKey |
string |
Yes |
The name of the parameter. If you do not specify the name and value of the parameter, ROS uses the default value that is specified in the template. Maximum value of N: 200. Note
The Parameters parameter is optional. If you specify Parameters, Parameters.N.ParameterKey is required. |
Amount |
| ParameterValue |
string |
Yes |
The value of the parameter. Maximum value of N: 200. Note
The Parameters parameter is optional. If you specify Parameters, Parameters.N.ParameterValue is required. |
1 |
| PermissionModel |
string |
No |
The authorization pattern. Valid values:
Note
|
SELF_MANAGED |
| AutoDeployment |
object |
No |
The auto-deployment settings. Note
This parameter is required only when PermissionModel is set to SERVICE_MANAGED. |
{"Enabled": true, "RetainStacksOnAccountRemoval": true} |
| Enabled |
boolean |
Yes |
Specifies whether to enable auto-deployment. Valid values:
|
true |
| RetainStacksOnAccountRemoval |
boolean |
No |
Specifies whether to retain the stacks in member accounts when member accounts are removed from the target folder. Valid values:
Note
RetainStacksOnAccountRemoval is required when Enabled is set to true. |
true |
| DeploymentTargets |
object |
No |
The deployment targets for updating stacks in the service-managed permissions mode. |
{"RdFolderIds": ["fd-4PvlVLOL8v"]} |
| RdFolderIds |
array |
No |
The list of folder IDs in the resource directory. |
|
|
string |
No |
The list of folder IDs in the resource directory. You can add up to 20 folder IDs. You must specify at least one of the RdFolderIds and AccountIds parameters based on the following rules:
Note
You can view the folder IDs on the Overview page of the Resource Management console. For more information, see View the basic information of a folder. |
["fd-4PvlVLOL8v"] |
|
| AccountIds |
array |
No |
The list of IDs of member accounts in the resource directory (folder). You can add up to 30 IDs of member accounts. Note
You can view the IDs of member accounts on the Overview page of the Resource Management console. For more information, see View the details of a member account. |
|
|
string |
No |
The list of IDs of member accounts in the resource directory (folder). You can add up to 30 IDs of member accounts. Note
You can view the IDs of member accounts on the Overview page of the Resource Management console. For more information, see View the details of a member account. |
["151266687691****","141261387191****"] |
|
| Capabilities |
array |
No |
The list of options for the stack group. Maximum length: 1. |
|
|
string |
No |
The options for the stack group. Valid value: ExpandModules, which expands modules in the current account. Note
|
ExpandModules |
|
| DeploymentOptions |
array |
No |
The list of deployment options for updating the stack group in the service-managed permissions mode. You can specify up to 1 deployment option. |
|
|
string |
No |
Valid values:
|
Deploy |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
14A07460-EBE7-47CA-9757-12CC4761D47A |
| OperationId |
string |
The operation ID. |
6da106ca-1784-4a6f-a7e1-e723863d**** |
Examples
Success response
JSON format
{
"RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
"OperationId": "6da106ca-1784-4a6f-a7e1-e723863d****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.