Continues to create a stack after the stack fails to be created.
Operation description
This topic provides an example on how to continue to create a stack after the stack fails to be created. In this example, the stack whose ID is 4a6c9851-3b0f-4f5f-b4ca-a14bf691****
is created in the China (Hangzhou) 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:ContinueCreateStack | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
StackId | string | Yes | The stack ID. | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
RegionId | string | Yes | The region ID of the stack. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
RamRoleName | string | No | The name of the RAM role. Resource Orchestration Service (ROS) assumes the RAM role to create the stack and uses the credentials of the role to call the APIs of Alibaba Cloud services. | test-role |
Mode | string | No | The mode in which ROS continues to create the stack. Valid values:
Note
RecreatingResources.N, TemplateBody, TemplateURL, and Parameters take effect only when Mode is set to Recreate.
Note
This mode is available only for ROS stacks.
| Recreate |
TemplateBody | string | No | The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. A ROS template is subject to the following limits:
Note
| {"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, such as oss://ros/template/demo or oss://ros/template/demo?RegionId=cn-hangzhou. The template body can be up to 524,288 bytes in length. If you do not specify the region ID of the OSS bucket, the value of RegionId is used. Note
| oss://ros-template/demo |
DryRun | boolean | No | Specifies whether only to validate the stack in the request. Valid values:
| false |
TemplateId | string | No | The template ID. This parameter applies to shared and private templates. Note
Mode is set to Recreate . When you specify TemplateId of a template, the template is subject to the limits that are described for TemplateBody in this topic.TemplateBody , TemplateURL , and TemplateId . If you do not specify the parameters, the existing template is used. | 5ecd1e10-b0e9-4389-a565-e4c15efc**** |
TemplateVersion | string | No | The version of the template. This parameter takes effect only when TemplateId is specified. | v1 |
RecreatingResources | array | No | The resources that ROS continues to create after the resources failed to be created. You can add new resources to the resources that ROS continues to create. ROS continues to create all dependencies of the new resources. Note
This parameter is available only for ROS stacks.
| |
string | No | The resource that ROS continues to create after the resource failed to be created. You can add new resources to the resources that ROS continues to create. ROS continues to create all dependencies of the new resources. Note
This parameter is available only for ROS stacks.
| WebServer | |
Parameters | array<object> | No | The template parameters that you want to use to override specific parameters. | |
object | No | |||
ParameterKey | string | Yes | The name of template parameter N that you want to use to override a specific parameter. If you do not specify the name and value of a template parameter, ROS uses the name and value specified in the previous operation that was performed to create the stack. Maximum value of N: 200. Note
This parameter takes effect only when Mode is set to Recreate.
| Amount |
ParameterValue | string | Yes | The value of template parameter N that you want to use to override a specific parameter. Maximum value of N: 200. For ROS stacks, the template parameters that you use to override specific parameters are subject to the following limits:
Note
This parameter takes effect only when Mode is set to Recreate.
| 12 |
Parallelism | long | No | The maximum number of concurrent operations that can be performed on resources. By default, this parameter is empty. You can set this parameter to an integer that is greater than or equal to 0. Note
| 1 |
RecreatingOptions | array | No | The options that ROS adopts when ROS continues to create the stack. | |
string | No | The option that ROS adopts when ROS continues to create the stack. This parameter takes effect when
Note
| CreateNewPrepaidInstance |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6",
"StackId": "4a6c9851-3b0f-4f5f-b4ca-a14bf691****",
"DryRunResult": {
"ParametersAllowedToBeModified": [
"description"
],
"ParametersConditionallyAllowedToBeModified": [
"name"
],
"ParametersNotAllowedToBeModified": [
"cidr"
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|