Creates stack instances in the specified accounts and regions.
Operation description
Before you call this operation, make sure that a stack group is created. For more information, see CreateStackGroup .
In this topic, the stack group named MyStackGroup
is used. The stack group is created in the China (Hangzhou) region and granted the self-managed permissions. In this example, stacks are created by using Alibaba Cloud accounts whose IDs are 151266687691****
and 141261387191****
in the China (Hangzhou) region and China (Beijing) region.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ros:CreateStackInstances | create |
|
| 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. | MyStackGroup |
AccountIds | array | No | The IDs of the execution accounts within which you want to deploy stacks in self-managed mode. You can specify up to 20 execution account IDs. Note
You must specify one of the following parameters: AccountIds and DeploymentTargets .
| |
string | No | The ID of the execution account within which you want to deploy stacks in self-managed mode. You can specify up to 20 execution account IDs. Note
You must specify one of the following parameters: AccountIds and DeploymentTargets .
| ["151266687691****", "141261387191****"] | |
RegionIds | array | Yes | The IDs of the regions where you want to create the stacks. You can specify up to 20 region IDs. | |
string | Yes | The ID of the region where you want to create the stacks. You can specify up to 20 region IDs. | ["cn-hangzhou","cn-beijing"] | |
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. | 123e4567-e89b-12d3-a456-42665544**** |
OperationDescription | string | No | The description of the stack creation operation. The description must be 1 to 256 characters in length. | Create stack instances in hangzhou and beijing |
OperationPreferences | object | No | The preference settings of the stack creation operation. The following parameters are available:
Separate multiple parameters with commas (,). Note
| {"FailureToleranceCount": 1, "MaxConcurrentCount": 2} |
TimeoutInMinutes | long | No | The timeout period within which you can create the stack.
| 10 |
DisableRollback | boolean | No | Specifies whether to disable rollback when the stack fails to be created. Valid values:
| false |
ParameterOverrides | array<object> | No | The parameters that are used to override specific parameters. | |
object | No | |||
ParameterKey | string | Yes | The key of parameter N that you want to use to override a specific parameter. If you do not specify this parameter, ROS uses the name that you specified when you created the stack group. Maximum value of N: 200. Note
| Amount |
ParameterValue | string | Yes | The value of parameter N that you want to use to override a specific parameter. If you do not specify this parameter, ROS uses the value that you specify when you create the stack group. Maximum value of N: 200. Note
| 1 |
DeploymentTargets | object | No | The folders in which ROS deploy stacks in service-managed permission model. Note
You must specify one of the following parameters: AccountIds and DeploymentTargets .
| |
RdFolderIds | array | Yes | The folder IDs of the resource directory. You can add up to five folder IDs. You can create stacks within all the member accounts in the specified folders. If you create stacks in the Root folder, the stacks are created within all member accounts 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 about a folder.
| |
string | No | The folder ID of the resource directory. You can add up to five folder IDs. You can create stacks within all the member accounts in the specified folders. If you create stacks in the Root folder, the stacks are created within all member accounts 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 about a folder.
| ["fd-4PvlVLOL8v"] |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"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 time | Summary of changes | Operation |
---|---|---|
2024-06-17 | The internal configuration of the API is changed, but the call is not affected | View Change Details |