All Products
Search
Document Center

Resource Orchestration Service:ContinueCreateStack

Last Updated:Sep 12, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ros:ContinueCreateStackupdate
  • stack
    acs:ros:{#regionId}:{#accountId}:stack/{#stackId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
StackIdstringYes

The stack ID.

4a6c9851-3b0f-4f5f-b4ca-a14bf691****
RegionIdstringYes

The region ID of the stack. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
RamRoleNamestringNo

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 role that is associated with the stack. If no 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.

test-role
ModestringNo

The mode in which ROS continues to create the stack. Valid values:

  • Recreate (default)

    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 RecreatingResources.N
    • Dependencies of the resources that you specify for RecreatingResources.N
    • Resources that you have not created
Note RecreatingResources.N, TemplateBody, TemplateURL, and Parameters take effect only when Mode is set to Recreate.
  • Ignore

    • ROS ignores and discards resources that fail to be created and you have not created, and considers that the stack is successfully created.
    • The body of the template that you use to create the stack is changed.
Note This mode is available only for ROS stacks.
Recreate
TemplateBodystringNo

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.

A 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 Mode 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.
  • {"ROSTemplateFormatVersion": "2015-09-01"}
    TemplateURLstringNo

    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
  • This parameter takes effect only when Mode is set to Recreate. When you specify TemplateURL of a template, the template is subject to the limits that are described for TemplateBody 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.
  • oss://ros-template/demo
    DryRunbooleanNo

    Specifies whether only to validate the stack in the request. Valid values:

    • true: only validates the stack.
    • false (default): validates and continues to create the stack.
    false
    TemplateIdstringNo

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

    Note
  • This parameter takes effect when 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.
  • 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.
  • 5ecd1e10-b0e9-4389-a565-e4c15efc****
    TemplateVersionstringNo

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

    v1
    RecreatingResourcesarrayNo

    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.
    stringNo

    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
    Parametersarray<object>No

    The template parameters that you want to use to override specific parameters.

    objectNo
    ParameterKeystringYes

    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
    ParameterValuestringYes

    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:

    • 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 Mode is set to Recreate.
    12
    ParallelismlongNo

    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.
  • 1
    RecreatingOptionsarrayNo

    The options that ROS adopts when ROS continues to create the stack.

    stringNo

    The option that ROS adopts when ROS continues to create the stack. This parameter takes effect when Mode 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 RecreatingResources.N. 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 RecreatingOptions.N 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.
  • CreateNewPrepaidInstance

    For more information about common request parameters, see Common parameters.

    Response parameters

    ParameterTypeDescriptionExample
    object
    RequestIdstring

    The request ID.

    B288A0BE-D927-4888-B0F7-B35EF84B6E6
    StackIdstring

    The stack ID.

    4a6c9851-3b0f-4f5f-b4ca-a14bf691****
    DryRunResultobject

    The validation result.

    ParametersAllowedToBeModifiedarray

    The parameters that can be modified.

    string

    The parameter 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 DryRun is set to true. The value of ParametersAllowedToBeModified varies based on the values of Mode, Template*, RecreatingResources.N, and RecreatingOptions.N.
    description
    ParametersConditionallyAllowedToBeModifiedarray

    The parameters that can be modified under specific conditions.

    string

    The parameter 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 DryRun is set to true. The value of ParametersConditionallyAllowedToBeModified varies based on the values of Mode, Template*, RecreatingResources.N, and RecreatingOptions.N.
    name
    ParametersNotAllowedToBeModifiedarray

    The parameters that cannot be modified.

    string

    The parameter that cannot be modified. The operation that is performed to modify the parameters causes a validation error.

    Note This parameter is returned only if DryRun is set to true. The value of ParametersNotAllowedToBeModified varies based on the values of Mode, Template*, RecreatingResources.N, and RecreatingOptions.N.
    cidr

    Examples

    Sample success responses

    JSONformat

    {
      "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 timeSummary of changesOperation
    No change history