Queries the list of stacks.
Operation description
Operation description
This topic provides an example of how to query the list of stacks in the China (Hangzhou) region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:ListStacks |
get |
*Stack
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageSize |
integer |
No |
The number of entries per page when paging is used. Maximum value: 50. Default value: 10. |
10 |
| ParentStackId |
string |
No |
The ID of the parent stack. |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
| RegionId |
string |
Yes |
The region ID of the stack. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| PageNumber |
integer |
No |
The page number of the stack list. Start value: 1. Default value: 1. |
1 |
| ShowNestedStack |
boolean |
No |
Specifies whether to list nested stacks. Valid values:
Note
If ParentStackId is specified, this value is set to true. |
true |
| StackId |
string |
No |
The stack ID. If you do not need detailed stack information, you can specify this parameter instead of calling the GetStack operation. |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
| Status |
array |
No |
The stack status. |
CREATE_COMPLETE |
|
string |
No |
The stack status. Valid values:
|
CREATE_COMPLETE |
|
| StackName |
array |
No |
The stack name. |
MyStack |
|
string |
No |
The stack name. Valid values of N: 1 to 5. |
MyStack |
|
| Tag |
array<object> |
No |
The tags of the stack. |
|
|
object |
No |
|||
| Key |
string |
No |
The tag key of the stack. |
usage |
| Value |
string |
No |
The tag value of the stack. |
test |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-acfmxazb4ph6aiy**** |
| StackIds |
array |
No |
The list of stack IDs. |
|
|
string |
No |
The stack ID. You can specify multiple stack IDs to query the details of multiple stacks at a time. Valid values of N: 1 to 10. |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
|
| StartTime |
string |
No |
The beginning of the time range for filtering by creation time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0. |
2023-04-01T15:10:00Z |
| EndTime |
string |
No |
The end of the time range for filtering by creation time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0. |
2023-04-01T15:16:00Z |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of stacks. |
2 |
| PageSize |
integer |
The number of entries per page in paging Settings. Maximum value: 50. Default value: 10. |
10 |
| RequestId |
string |
The request ID. |
FBAC80B4-9C27-529D-BC9C-4155FA5CD7A7 |
| PageNumber |
integer |
The page number of the stack list. |
1 |
| Stacks |
array<object> |
The list of stacks. |
|
|
array<object> |
|||
| Status |
string |
The stack status. |
CREATE_COMPLETE |
| UpdateTime |
string |
The time when the stack was last updated. The time is displayed in UTC+0 in the ISO 8601 standard format without the Z suffix. Format: YYYY-MM-DDThh:mm:ss. |
2022-03-10T07:44:36 |
| DriftDetectionTime |
string |
The time when the most recent successful drift detection was performed on the stack. |
2022-03-10T06:46:36 |
| StatusReason |
string |
The reason why the stack is in its current status. |
Stack CREATE completed successfully |
| CreateTime |
string |
The time when the stack was created. The time is displayed in UTC+0 in the ISO 8601 standard format without the Z suffix. Format: YYYY-MM-DDThh:mm:ss. |
2022-03-10T06:44:36 |
| DisableRollback |
boolean |
Indicates whether rollback is disabled when the stack fails to be created. Valid values:
|
false |
| Tags |
array<object> |
The tags of the stack. |
|
|
object |
|||
| Key |
string |
The tag key of the stack. |
acs:rm:rgId |
| Value |
string |
The tag value of the stack. |
rg-aek2frunvw7**** |
| StackName |
string |
The stack name. |
MyStack |
| TimeoutInMinutes |
integer |
The timeout period for creating the stack. Unit: minutes. Valid values: 10, 20, 60, 120, and 1440. This information is generated based on call logs and may be incomplete. Verify the information. |
60 |
| RegionId |
string |
The region ID of the stack. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| ParentStackId |
string |
The ID of the parent stack. |
4a6c9851-3b0f-4f5f-b4ca-a14bf692**** |
| StackId |
string |
The stack ID. |
67805444-a605-45ee-a57f-83908ff6**** |
| StackDriftStatus |
string |
The drift status of the stack in the most recent successful drift detection. Valid values:
|
IN_SYNC |
| StackType |
string |
The stack type. Valid values:
|
ROS |
| ResourceGroupId |
string |
The resource group ID. |
rg-aek2frunvw7**** |
| ServiceManaged |
boolean |
Indicates whether the stack is a managed stack. Valid values:
|
false |
| ServiceName |
string |
The service name to which the managed stack belongs. |
ACVS |
| OperationInfo |
object |
The supplementary information that is returned when an error occurs during a stack operation. Note
This response property is returned only in specific cases and contains at least one sub-property. For example, an error occurs when another cloud service API is called. |
|
| Code |
string |
The error code. |
DependencyViolation |
| Message |
string |
The error message. |
There is still instance(s) in the specified security group. |
| RequestId |
string |
The ID of the request that is initiated to call the API operation of another Alibaba Cloud service. |
071D6166-3F6B-5C7B-A1F0-0113FBB643A8 |
| Action |
string |
The name of the API operation that belongs to another Alibaba Cloud service. |
DeleteSecurityGroup |
| ResourceType |
string |
The type of the resource on which the operation error occurred. |
ALIYUN::ECS::SecurityGroup |
| LogicalResourceId |
string |
The logical ID of the resource on which the operation error occurred. |
EcsSecurityGroup |
| DeletionProtection |
string |
Indicates whether deletion protection is enabled for the stack. Valid values:
Note
The deletion protection mechanism of a nested stack is the same as that of the root stack. Valid values:
|
Disabled |
Examples
Success response
JSON format
{
"TotalCount": 2,
"PageSize": 10,
"RequestId": "FBAC80B4-9C27-529D-BC9C-4155FA5CD7A7",
"PageNumber": 1,
"Stacks": [
{
"Status": "CREATE_COMPLETE",
"UpdateTime": "2022-03-10T07:44:36",
"DriftDetectionTime": "2022-03-10T06:46:36",
"StatusReason": "Stack CREATE completed successfully",
"CreateTime": "2022-03-10T06:44:36",
"DisableRollback": false,
"Tags": [
{
"Key": "acs:rm:rgId",
"Value": "rg-aek2frunvw7****"
}
],
"StackName": "MyStack",
"TimeoutInMinutes": 60,
"RegionId": "cn-hangzhou",
"ParentStackId": "4a6c9851-3b0f-4f5f-b4ca-a14bf692****",
"StackId": "67805444-a605-45ee-a57f-83908ff6****",
"StackDriftStatus": "IN_SYNC",
"StackType": "ROS",
"ResourceGroupId": "rg-aek2frunvw7****",
"ServiceManaged": false,
"ServiceName": "ACVS",
"OperationInfo": {
"Code": "DependencyViolation",
"Message": "There is still instance(s) in the specified security group.",
"RequestId": "071D6166-3F6B-5C7B-A1F0-0113FBB643A8",
"Action": "DeleteSecurityGroup",
"ResourceType": "ALIYUN::ECS::SecurityGroup",
"LogicalResourceId": "EcsSecurityGroup"
},
"DeletionProtection": "Disabled"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.