Creates stack instances within specified accounts in specified regions.
Syntax
{
"Type": "ALIYUN::ROS::StackInstances",
"Properties": {
"OperationPreferences": Map,
"RetainStacks": Boolean,
"RegionIds": List,
"AccountIds": List,
"ParameterOverrides": Map,
"StackGroupName": String,
"DeploymentTargets": Map,
"OperationDescription": String,
"DisableRollback": Boolean,
"TimeoutInMinutes": Integer
}
}
Properties
| Property | Type | Required | Editable | Description | Constraint |
| OperationPreferences | Map | No | No | The operation preferences for creating stack instances. | For more information, see OperationPreferences properties. Note
|
| RetainStacks | Boolean | No | No | Specifies whether to retain the associated stacks when stack instances are deleted. | Valid values:
|
| RegionIds | List | Yes | No | The regions in which to create stack instances. | You can specify a maximum of 20 region IDs. |
| AccountIds | List | No | No | The accounts in which to deploy stacks by using self-managed permissions. | You can specify a maximum of 20 account IDs. |
| ParameterOverrides | Map | No | No | The parameters to override. | None |
| StackGroupName | String | Yes | No | 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 letter. |
| DeploymentTargets | Map | No | No | The folders in which to deploy stacks by using service-managed permissions. | For more information, see DeploymentTargets property. |
| OperationDescription | String | No | No | The description of the operation to create stack instances. | The description must be 1 to 256 characters in length. |
| DisableRollback | Boolean | No | No | Specifies whether to disable rollback when stack instances fail to be created. | Valid values:
|
| TimeoutInMinutes | Integer | No | No | The timeout period for creating stack instances. | Default value: 60. Unit: minutes. |
OperationPreferences syntax
"OperationPreferences": {
"MaxConcurrentPercentage": Integer,
"MaxConcurrentCount": Integer,
"FailureTolerancePercentage": Integer,
"FailureToleranceCount": Integer
}
OperationPreferences properties
| Property | Type | Required | Editable | Description | Constraint |
| MaxConcurrentPercentage | Integer | No | No | The maximum percentage of accounts in each region in which stack operations can be performed concurrently. |
If the numeric value in the percentage is not an integer, Resource Orchestration Service (ROS) rounds the number down to the nearest integer. If you do not set the MaxConcurrentPercentage parameter, the default value 1 is used. Valid values: 1 to 100. |
| MaxConcurrentCount | Integer | No | No | The maximum number of accounts in each region in which stack operations can be performed concurrently. |
If you do not set the MaxConcurrentCount parameter, the default value 1 is used. Valid values: 1 to 20. |
| FailureTolerancePercentage | Integer | No | No | The maximum percentage of accounts in each region in which stack operation failures are allowed. | If the value is exceeded in a region, ROS stops the operation in the region. If the numeric value in the percentage is not an integer, ROS rounds the number down to the nearest integer. If you do not set the FailureTolerancePercentage parameter, the default value 0 is used. Valid values: 0 to 100. |
| FailureToleranceCount | Integer | No | No | The maximum number of accounts in each region in which stack operation failures are allowed. | If the value is exceeded in a region, ROS stops the operation in the region. If ROS stops the operation in one region, ROS also stops the operation in other regions. If you do not set the FailureToleranceCount parameter, the default value 0 is used. Valid values: 0 to 100. |
DeploymentTargets syntax
"DeploymentTargets": {
"RdFolderIds": List
}
DeploymentTargets property
| Property | Type | Required | Editable | Description | Constraint |
| RdFolderIds | List | No | No | The resource directory folder IDs. | You can specify a maximum of five folder IDs. You can create stack instances in all members that are contained in the specified folders. If you specify the Root folder, stack instances are created in 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 Folder basic information. |
Response parameters
Fn::GetAtt
- LastOperationId: the ID of the last operation.
- Stacks: the stack details.
Example
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RegionIds": {
"Type": "Json"
},
"ParameterOverrides": {
"Type": "Json"
},
"StackGroupName": {
"Type": "String"
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ROS::StackInstances",
"Properties": {
"RegionIds": {
"Ref": "RegionIds"
},
"ParameterOverrides": {
"Ref": "ParameterOverrides"
},
"StackGroupName": {
"Ref": "StackGroupName"
}
}
}
},
"Outputs": {
"LastOperationId": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"LastOperationId"
]
}
},
"Stacks": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Stacks"
]
}
}
}
}