All Products
Search
Document Center

Resource Orchestration Service:UpdateStackInstances

Last Updated:Apr 10, 2024

Updates stack instances in the specified accounts and regions.

Operation description

In this topic, the stack group named MyStackGroup that is created in the China (Hangzhou) region is used. The stack group is granted the self-managed permissions. In this example, stacks of the stack group are updated by using the Alibaba Cloud accounts whose IDs are 151266687691**** and 141261387191**** in the China (Hangzhou) region and China (Beijing) 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:UpdateStackInstancesWRITE
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
StackGroupNamestringYes

The name of the stack group. The name must be unique within a region.
The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or a letter.

MyStackGroup
AccountIdsarrayNo

The IDs of the execution accounts within which you want to deploy stacks in self-managed mode. You can specify up to 20 execution account IDs.

Note If you want to update stacks in self-managed permission mode, you must specify this parameter.
stringNo

The ID of the execution account within which you want to deploy stacks in self-managed mode. You can specify up to 20 execution account IDs.

Note If you want to update stacks in self-managed permission mode, you must specify this parameter.
["151266687691****","141261387191****"]
RegionIdsarrayYes

The IDs of the regions where you want to update the stacks. You can specify up to 20 region IDs.

stringYes

The ID of the region where you want to update the stacks. You can specify up to 20 region IDs.

["cn-hangzhou","cn-beijing"]
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests.
The token can contain letters, digits, hyphens (-), and underscores (_), and cannot exceed 64 characters in length.
For more information, see How to ensure idempotence.

123e4567-e89b-12d3-a456-42665544****
OperationDescriptionstringNo

The description of the update operation.

The description must be 1 to 256 characters in length.

Update stack instances in hangzhou and beijing
OperationPreferencesobjectNo

The preference settings of the update operation.

The following parameters are available:

  • {"FailureToleranceCount": N}

    The number of accounts within which stack operation failures are allowed in each region. If the value of this parameter is exceeded in a region, ROS stops the operation in the region. If ROS stops the operation in one region, ROS stops the operation in other regions.

    Valid values of N: 0 to 20.

    If you do not specify FailureToleranceCount, 0 is used as the default value.

  • {"FailureTolerancePercentage": N}

    The percentage of the number of accounts within which stack operation failures are allowed to the total number of accounts in each region. If the value of this parameter is exceeded, ROS stops the operation in the region.

    Valid values of N: 0 to 100. If the numeric value in the percentage is not an integer, ROS rounds the value down to the nearest integer.

    If you do not specify FailureTolerancePercentage, 0 is used as the default value.

  • {"MaxConcurrentCount": N}

    The maximum number of accounts within which multiple stacks are deployed at the same time in each region.

    Valid values of N: 1 to 20.

    If you do not specify MaxConcurrentCount, 1 is used as the default value.

  • {"MaxConcurrentPercentage": N}

    The percentage of the maximum number of accounts within which stacks are deployed at the same time to the total number of accounts in each region.

    Valid values: 1 to 100. If the numeric value in the percentage is not an integer, ROS rounds the value down to the nearest integer.

    If you do not specify MaxConcurrentPercentage, 1 is used as the default value.

  • {"RegionConcurrencyType": N}

    The mode that you want to use to deploy stacks across regions. Valid values:

    • SEQUENTIAL (default): deploys stacks in the specified regions one by one in sequence. This way, ROS deploys stacks in only one region at a time.

    • PARALLEL: deploys stacks in all the specified regions in parallel.

Separate multiple parameters with commas (,).

Note
  • You can specify only one of the following parameters: MaxConcurrentCount and MaxConcurrentPercentage.
  • You can specify only one of the following parameters: FailureToleranceCount and FailureTolerancePercentage.
  • {"FailureToleranceCount": 1,"MaxConcurrentCount": 2}
    TimeoutInMinuteslongNo

    The timeout period for the update operation.

    • Default value: 60.
    • Unit: minutes.
    10
    ParameterOverridesobject []No

    The parameters that are used to override specific parameters.

    ParameterKeystringYes

    The key of parameter N that you want to use to override a specific parameter. If you do not specify this parameter, ROS uses the name that you specified when you created the stack group.

    Maximum value of N: 200.

    Note
  • ParameterOverrides is optional.
  • If you specify ParameterOverrides, you must specify ParameterOverrides.N.ParameterKey and ParameterOverrides.N.ParameterValue.
  • Amount
    ParameterValuestringYes

    The value of parameter N that you want to use to override a specific parameter. If you do not specify this parameter, ROS uses the value that you specified when you created the stack group.

    Maximum value of N: 200.

    Note
  • ParameterOverrides is optional.
  • If you specify ParameterOverrides, you must specify ParameterOverrides.N.ParameterKey and ParameterOverrides.N.ParameterValue.
  • 1
    DeploymentTargetsobjectNo

    The folders in which you want to deploy stacks in service-managed mode.

    Note If you want to update stacks in service-managed permission mode, you must specify this parameter.
    RdFolderIdsarrayNo

    The folder IDs of the resource directory.

    stringNo

    The folder ID of the resource directory. You can specify up to five folder IDs.

    You must specify at least one of the following parameters: RdFolderIds and AccountIds. The following rules apply:

    • If you specify only RdFolderIds, stacks are deployed within all member accounts in the specified folders. If you select the Root folder, stacks are deployed within all member accounts in the resource directory.
    • If you specify only AccountIds, stacks are deployed only within the specified member accounts.
    • If you specify both parameters, the accounts specified by AccountIds must be contained in the folders specified by RdFolderIds. In this case, stacks are deployed within the specified member accounts that are contained in the specified folders.
    Note To view the folder IDs, go to the Overview page in the Resource Management console. For more information, see View the basic information about a folder.
    ["fd-4PvlVLOL8v"]
    AccountIdsarrayNo

    The IDs of the member accounts in the resource directory. You can specify up to 20 member account IDs.

    Note To view the member account IDs, go to the Overview page in the Resource Management console. For more information, see View the details of a member.
    stringNo

    The ID of the member account in the resource directory. You can specify up to 20 member account IDs.

    Note To view the member account IDs, go to the Overview page in the Resource Management console. For more information, see View the details of a member.
    ["151266687691****","141261387191****"]

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

    Response parameters

    ParameterTypeDescriptionExample
    object
    RequestIdstring

    The ID of the request.

    14A07460-EBE7-47CA-9757-12CC4761D47A
    OperationIdstring

    The ID of the operation.

    6da106ca-1784-4a6f-a7e1-e723863d****

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
      "OperationId": "6da106ca-1784-4a6f-a7e1-e723863d****"
    }

    Error codes

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    No change history