Continues to create a stack that failed to be created.
This topic provides an example on how to continue to create a stack that failed to be created. In this example, the stack whose ID is 4a6c9851-3b0f-4f5f-b4ca-a14bf691****
failed to be created in the China (Hangzhou) region.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ContinueCreateStack | The operation that you want to perform. Set the value to ContinueCreateStack. |
StackId | String | Yes | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** | The ID of the stack. |
RegionId | String | Yes | cn-hangzhou | The region ID of the stack. You can call the DescribeRegions operation to query the most recent region list. |
RamRoleName | String | No | test-role | 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. ROS assumes the RAM role to perform operations on the stack. If you have permissions to perform operations on the stack but do not have permissions to use the RAM role, ROS still assumes the RAM role. You must make sure that the least privileges are granted to the RAM role. If you do not specify this parameter, ROS assumes the existing RAM role that is associated with the stack. If no RAM roles are available, ROS uses a temporary credential that is generated from the credentials of your account. The name of the RAM role can be up to 64 bytes in length. |
Mode | String | No | Recreate | The mode in which ROS continues to create the stack. Default value: Recreate. Valid values:
|
TemplateBody | String | No | {"ROSTemplateFormatVersion": "2015-09-01"} | 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. An ROS template is subject to the following limits:
|
TemplateURL | String | No | oss://ros-template/demo | 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 the RegionId parameter is used. Note
|
DryRun | Boolean | No | false | Specifies whether only to validate the stack in the request. Default value: false. Valid values:
|
TemplateId | String | No | 5ecd1e10-b0e9-4389-a565-e4c15efc**** | The ID of the template. This parameter applies to shared templates and private templates. Note
|
TemplateVersion | String | No | v1 | The version of the template. This parameter takes effect only when the TemplateId parameter is specified. |
RecreatingResources.N | String | No | WebServer | Resource N 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 takes effect only for ROS stacks. |
Parameters.N.ParameterKey | String | Yes | Amount | The name of template parameter N that you want to use to override another 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 the Mode parameter is set to Recreate. |
Parameters.N.ParameterValue | String | Yes | 12 | The value of template parameter N that you want to use to override another parameter. Maximum value of N: 200. For ROS stacks, the following limits are imposed on the template parameters that you use to override other parameters:
Note This parameter takes effect only when the Mode parameter is set to Recreate. |
Parallelism | Long | No | 1 | 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
|
RecreatingOptions.N | String | No | CreateNewPrepaidInstance | Option N that ROS adopts when ROS continues to create the stack. This parameter takes effect when the
|
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | B288A0BE-D927-4888-B0F7-B35EF84B6E6 | The ID of the request. |
StackId | String | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** | The ID of the stack. |
DryRunResult | Object | The validation result. |
|
ParametersAllowedToBeModified | Array of String | description | The parameters that can be modified. The operation that is performed to modify the parameters does not cause a validation error. Note This parameter is returned only if the DryRun parameter is set to true . The value of the ParametersAllowedToBeModified parameter varies based on the values of the Mode, Template*, RecreatingResources.N, and RecreatingOptions.N parameters. |
ParametersConditionallyAllowedToBeModified | Array of String | name | The parameters that can be modified under specific conditions. The new values of the parameters determine whether the operation that is performed to modify the parameters causes a validation error. Note This parameter is returned only if the DryRun parameter is set to true . The value of the ParametersConditionallyAllowedToBeModified parameter varies based on the values of the Mode, Template*, RecreatingResources.N, and RecreatingOptions.N parameters. |
ParametersNotAllowedToBeModified | Array of String | cidr | The parameters that cannot be modified. The operation that is performed to modify the parameters causes a validation error. Note This parameter is returned only if the DryRun parameter is set to true . The value of the ParametersNotAllowedToBeModified parameter varies based on the values of the Mode, Template*, RecreatingResources.N, and RecreatingOptions.N parameters. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/?Action=ContinueCreateStack
&RegionId=cn-hangzhou
&StackId=4a6c9851-3b0f-4f5f-b4ca-a14bf691****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ContinueCreateStackResponse>
<RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6</RequestId>
<StackId>4a6c9851-3b0f-4f5f-b4ca-a14bf691****</StackId>
</ContinueCreateStackResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "B288A0BE-D927-4888-B0F7-B35EF84B6E6",
"StackId" : "4a6c9851-3b0f-4f5f-b4ca-a14bf691****"
}
Error codes
For a list of error codes, see Service error codes.
Http status code |
Error code |
Error message |
Description |
---|---|---|---|
400 |
CircularDependency |
Circular Dependency Found: {reason}. |
The error message returned because the template contains circular dependencies. reason indicates the cause of the error. |
400 |
InvalidSchema |
{reason}. |
The error message returned because the template format is invalid. reason indicates the cause of the error. |
400 |
InvalidTemplateAttribute |
The Referenced Attribute ({resource} {name}) is incorrect. |
The error message returned because the resource property that is referenced in the Outputs section of the template is invalid. resource indicates the resource name. name indicates the property name. |
400 |
InvalidTemplatePropertyType |
The specified value type of ({resource} {section}) is incorrect. |
The error message returned because the type of the resource property that is defined in a template section is invalid. resource indicates the resource name. section indicates the section name. |
400 |
InvalidTemplateReference |
The specified reference "{name}" (in {referencer}) is incorrect. |
The error message returned because the template contains an invalid reference. name indicates the reference name. referencer indicates the referencer name. |
400 |
InvalidTemplateSection |
The template section is invalid: {section}. |
The error message returned because the template contains an invalid section. section indicates the section name. |
400 |
InvalidTemplateVersion |
The template version is invalid: {reason}. |
The error message returned because the template version is invalid. reason indicates the cause of the error. |
400 |
StackValidationFailed |
{reason}. |
The error message returned because the stack failed to be validated. reason indicates the cause of the error. |
400 |
UnknownUserParameter |
The Parameter ({name}) was not defined in template. |
The error message returned because the specified parameter is not defined in the template. name indicates the parameter name. |
400 |
UserParameterMissing |
The Parameter {name} was not provided. |
The error message returned because no value is specified for the parameter that is defined in the template. name indicates the parameter name. |
400 |
ContinueCreateStackValidationFailed |
{reason}. |
The error message returned because the operation that was performed to continue to create the stack failed to be validated. reason indicates the cause of the error. |
404 |
ResourceNotFound |
The Resource ({name}) could not be found in Stack {stack}. |
The error message returned because the resource does not exist in the stack. name indicates the resource name. stack indicates the stack name or ID. |
404 |
StackNotFound |
The Stack ({name}) could not be found. |
The error message returned because the stack does not exist. name indicates the stack name or ID. |
409 |
ActionInProgress |
Stack {name} already has an action ({action}) in progress. |
The error message returned because the stack is being changed. name indicates the stack name or ID. action indicates the change operation. |
404 |
TemplateNotFound |
The Tempalte ({ ID }) could not be found. |
The error message returned because the template does not exist. ID indicates the ID of the template. |
404 |
TemplateNotFound |
The Template { ID } with version { version } could not be found. |
The error message returned because the template or template version does not exist. ID indicates the ID of the template. version indicates the version of the template. |