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

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 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:

  • Recreate

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

    • Resources that fail to be created
    • Resources that you specify for the RecreatingResources.N parameter
    • Dependencies of the resources that you specify for the RecreatingResources.N parameter
    • Resources that you have not created
      Note The RecreatingResources.N, TemplateBody, and TemplateURL parameters, and the Parameters section take effect only when the Mode parameter is set to Recreate.
  • Ignore
    • ROS ignores and discards resources that fail to be created and you have not created, and marks the stack as successfully created.
    • The body of the template that you use to create the stack is changed.
      Note This value is valid only for ROS stacks.
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:

  • You can modify only the following sections in the template: Description, Metadata, Resources, and Outputs.
  • 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 change the template body for the resources that you do not want to continue to create.
    • You can delete the resources or change the template body for the resources that you want to continue to create.
    • You can add resources to this section.
      Note
      • This parameter takes effect only 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, 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
  • This parameter takes effect only when the Mode parameter is set to Recreate. When you specify the TemplateURL parameter in a template, the template is subject to the limits that are described for the TemplateBody parameter in this topic.
  • 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 in the request. Default value: false. Valid values:

  • true: only validates the stack.
  • false: validates and continues to create the stack.
TemplateId String No 5ecd1e10-b0e9-4389-a565-e4c15efc****

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

Note
  • This parameter takes effect when the Mode parameter is set to Recreate. When you specify the TemplateId parameter in a template, the template is subject to the limits that are described for the TemplateBody parameter in this topic.
  • 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 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:

  • You cannot change the condition values in the Conditions section of a template from true to false or from false to true.
  • The template parameters can be referenced only by resources that ROS continues to create.
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
  • If you set this parameter to an integer that is greater than 0, the integer is used.
  • If you set this parameter to 0, no limit is imposed on ROS stacks. However, the default value in Terraform is used for Terraform stacks. In most cases, the default value in Terraform is 10.
  • If you leave this parameter empty, the value that you specified for this parameter in the previous request is used. If you left this parameter empty in the previous request, no limit is imposed on ROS stacks. However, the default value in Terraform is used for Terraform stacks. In most cases, the default value in Terraform is 10.
  • If you set this parameter to a specific value, ROS associates the value with the stack. The value affects subsequent operations on the stack.
RecreatingOptions.N String No CreateNewPrepaidInstance

Option N that ROS adopts when ROS continues to create the stack. This parameter takes effect when the Mode parameter is set to Recreate. Valid values:

  • TryToFixSignalFailureByRerunEcsCommand: ROS tries to fix existing signals of the FAILURE type. When ALIYUN::ROS::WaitCondition resources fail to be created, ROS uses the associated and created ALIYUN::ECS::RunCommand and ALIYUN::ECS::Invocation resources and the relevant dependencies to recreate the ALIYUN::ROS::WaitCondition resources.
    Note This value is valid only for ROS stacks.
  • IgnoreExistingSignalFailure: ROS ignores existing signals of the FAILURE type. If ALIYUN::ROS::WaitCondition resources fail to be created, the resources are successfully created when ROS continues to create the stack.
    Note This value is valid only for ROS stacks.
  • AutoRecreatingResources: ROS automatically recreates the resources whose template content or referenced parameters are modified and the relevant dependencies. This option facilitates the configurations of the RecreatingResources.N parameter. However, unnecessary resources may also be recreated.
    Note This value is valid only for ROS stacks.
  • CreateNewPrepaidInstance: ROS creates a new subscription instance if subscription resources fail to be created, or if you use ROS to recreate subscription resources that are successfully created.
    Note
    • This value is valid only for ROS stacks.
    • If a subscription instance is already created, ROS retains the subscription instance because subscription resources cannot be deleted.
    • If you do not set the RecreatingOptions.N parameter to CreateNewPrepaidInstance, ROS tries to reuse an existing instance. If ROS reuses the instance, you cannot modify the resource properties, or you can modify only a small number of resource properties.

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.