Continues to create a stack after the stack fails to be created.

In this example, a stack that fails to be created is used. The stack is named 4a6c9851-3b0f-4f5f-b4ca-a14bf691∗∗∗∗ and is deployed in the China (Hangzhou) region.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 credential of the role to call the APIs of Alibaba Cloud services.

ROS assumes the role to perform operations on the stack. If you are authorized to perform operations on the stack but do not have permissions to use the role, ROS uses the role and you must make sure that least privileges are granted to this role.

If you do not specify this parameter, ROS uses the existing role that is associated with the stack. If no roles are available for ROS to assume, ROS uses the temporary credential that is generated from the credentials of your account.

The name can be up to 64 bytes in length.

Mode String No Recreate

The mode of the operation that continues to create the stack. Default value: Recreate. Valid values:

  • Recreate

    If you set this parameter to Recreate, you need ROS to continue to create only the following types of resources:

    • Resources that fail to be created
    • Resources that you specify for the RecreatingResources.N parameter
    • Resources that depend on the resources that you specify for the RecreatingResources.N parameter
    • Resources that you have not created
      Note RecreatingResources.N, TemplateBody, TemplateURL, and Parameters only take effect when the Mode parameter is set to Recreate.
  • Ignore
    • ROS ignores and discards resources that fail to be created and you have not created. ROS marks the creation operation on the stack as successful.
    • The content of the template that you use to create the stack is changed.
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 is longer than required, we recommend that you add parameters to the HTTP POST request body to prevent request failures caused by the excessively long URLs.

The template is subject to the following limits:

  • You can modify only the Description, Metadata, Resources, and Outputs sections in the template.
  • You cannot add sections to or remove sections from the template.
  • The Resources section is subject to the following limits:
    • You cannot delete the resources or modify the template content for the resources that you do not want to continue to create.
    • You can delete the resources and modify the template content for the resources that you want to continue to create.
    • You can add resources to this section.
Note
  • This parameter only takes effect when the Mode parameter is set to Recreate.
  • You can specify only one of the following parameters: TemplateBody, TemplateURL, and TemplateId. If you do not specify the parameters, the existing template is used.
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. Examples: oss://ros/template/demo and oss://ros/template/demo?RegionId=cn-hangzhou. The template can be up to 524,288 bytes in length.

If you do not specify RegionId in the URL, the region ID of the stack is used.

Note
  • This parameter only takes effect when the Mode parameter is set to Recreate. The limits on the template that is specified for this parameter are the same as those described for the TemplateBody parameter.
  • You can specify only one of the following parameters: TemplateBody, TemplateURL, and TemplateId. If you do not specify the parameters, the existing template is used.
DryRun Boolean No false

Specifies whether only to validate the stack. Default value: false. Valid values:

  • true: only validates the stack.
  • false: validates the stack and continues to create the stack that fails to be created.
TemplateId String No 5ecd1e10-b0e9-4389-a565-e4c15efc∗∗∗∗

The ID of the template. This parameter applies to shared and private templates.

Note You can specify only one of the following parameters: TemplateBody, TemplateURL, and TemplateId. If you do not specify the parameters, the existing template is used.
TemplateVersion String No v1

The version of the template. This parameter only takes effect when the TemplateId parameter is specified.

Parallelism Long No 1

The maximum number of operations that are concurrently performed on a resource. This parameter only takes effect for Terraform stacks.

This parameter is empty by default. You can set this parameter to an integer greater than or equal to 0.

Note
  • If you set this parameter to an integer greater than 0, the integer is used as the maximum number of operations.
  • If you set this parameter to 0, the default value of Terraform is used as the maximum number of resources. In most cases, the default value of Terraform is 10.
  • If you do not set this parameter, the value that you set for this parameter in the last operation is used. If you did not set this parameter in the last operation, the default value of Terraform is used. In most cases, the default value of Terraform is 10.
  • If you set this parameter, ROS associates the value with the stack and the value can affect subsequent operations on the stack.
RecreatingResources.N String No WebServer

Resource N that ROS continues to create after the resource fails to be created. You can add other resources that you want ROS to continue to create. ROS continues to create all resources that depend on the resources.

Parameters.N.ParameterKey String Yes Amount

The key of template parameter N that you want to override. If you do not specify the key and value of the parameter, ROS uses the key and value that were used in the last operation performed to create the stack. Maximum value of N: 200.

Note This parameter only takes effect when the Mode parameter is set to Recreate.
Parameters.N.ParameterValue String Yes 12

The value of template parameter N that you want to override. Maximum value of N: 200.

The parameter that is overridden is subject to the following limits:

  • This parameter cannot change values of the Conditions section in the template from true to false or from false to true.
  • The overridden parameter can be referenced only by resources that ROS continues to create.
Note This parameter only takes effect when the Mode parameter is set to Recreate.

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.

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, visit the API Error Center.

HttpCode

Error code

Error message

Description

400

CircularDependency

Circular Dependency Found: {reason}.

The error message returned because the template contains a circular dependency. reason indicates the specific reason.

400

InvalidSchema

{reason}.

The error message returned because the template format is invalid. reason indicates the specific reason.

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 specified resource property that is defined in the template 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 specific cause.

400

StackValidationFailed

{reason}.

The error message returned because the stack fails to be validated. reason indicates the specific cause.

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 set for the parameter specified in the template. name indicates the parameter name.

400

ContinueCreateStackValidationFailed

{reason}.

The error message returned because the operation that continues to create the stack fails to be validated. reason indicates the specific reason.

404

ResourceNotFound

The Resource ({name}) could not be found in Stack {stack}.

The error message returned because the specified 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 specified 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 specified 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 specified template does not exist. ID indicates the template ID.

404

TemplateNotFound

The Template { ID } with version { version } could not be found.

The error message returned because the specified template or template version does not exist. ID indicates the template ID. version indicates the template version.