ListStacks
Queries the list of stacks.
Operation description
Usage notes
This topic provides an example of how to query the list of stacks in the 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 Settings for paging, specifying the number of entries per page in a paged query. 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 the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| PageNumber |
integer |
No |
The page number of the stack list. Starting value: 1. Default value: 1. |
1 |
| ShowNestedStack |
boolean |
No |
Specifies whether to list nested stacks. Valid values:
Note
If ParentStackId is specified, the value is set to true. |
true |
| StackId |
string |
No |
The ID of the stack. If you do not need the detailed information of the stack, you can specify this parameter instead of calling the GetStack operation. |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
| Status |
array |
No |
The status of the stack. |
CREATE_COMPLETE |
|
string |
No |
The status of the stack. Valid values:
|
CREATE_COMPLETE |
|
| StackName |
array |
No |
The name of the stack. |
MyStack |
|
string |
No |
The name of the stack. 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 ID of the resource group. |
rg-acfmxazb4ph6aiy**** |
| StackIds |
array |
No |
The list of stack IDs. |
|
|
string |
No |
The ID of the stack. You can specify multiple stack IDs to query the details of multiple stacks at the same time. Valid values of N: 1 to 10. |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
|
| StartTime |
string |
No |
The start time of the creation time range for the query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
2023-04-01T15:10:00Z |
| EndTime |
string |
No |
The end time of the creation time range for the query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
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 Settings for paging, specifying the number of entries per page in a paged query. Maximum value: 50. Default value: 10. |
10 |
| RequestId |
string |
The ID of the request. |
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 status of the stack. |
CREATE_COMPLETE |
| UpdateTime |
string |
The time when the stack was updated. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format without the Z suffix. |
2022-03-10T07:44:36 |
| DriftDetectionTime |
string |
The time when the last successful drift detection was performed on the stack. The time is in the YYYY-MM-DDThh:mm:ss format. |
2022-03-10T06:46:36 |
| StatusReason |
string |
The reason for the stack status. |
Stack CREATE completed successfully |
| CreateTime |
string |
The time when the stack was created. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format without the Z suffix. |
2022-03-10T06:44:36 |
| DisableRollback |
boolean |
Specifies whether to disable the rollback policy 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 name of the stack. |
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. Please verify it. |
60 |
| RegionId |
string |
The region ID of the stack. You can call the DescribeRegions operation 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 ID of the stack. |
67805444-a605-45ee-a57f-83908ff6**** |
| StackDriftStatus |
string |
The drift status of the stack in the last successful drift detection. Valid values:
|
IN_SYNC |
| StackType |
string |
The type of the stack. Valid values:
|
ROS |
| ResourceGroupId |
string |
The ID of the resource group. |
rg-aek2frunvw7**** |
| ServiceManaged |
boolean |
Indicates whether the stack is a managed stack. Valid values:
|
false |
| ServiceName |
string |
The service name of the managed stack. |
ACVS |
| OperationInfo |
object |
The supplementary information when an error occurs during a stack operation. Note
This response parameter is returned only in specific scenarios and at least one sub-parameter is returned. For example, an error is reported when calling an API operation of another Alibaba Cloud service. |
|
| Code |
string |
The error code. Valid values:
This information is generated based on call logs and may be incomplete. Please verify it. |
DependencyViolation |
| Message |
string |
The error message. |
There is still instance(s) in the specified security group. |
| RequestId |
string |
The ID of the request to call the API operation of another Alibaba Cloud service. |
071D6166-3F6B-5C7B-A1F0-0113FBB643A8 |
| Action |
string |
The name of the API operation of another Alibaba Cloud service that is called. |
DeleteSecurityGroup |
| ResourceType |
string |
The resource type for which the operation fault occurred. |
ALIYUN::ECS::SecurityGroup |
| LogicalResourceId |
string |
The logical ID of the resource for which the operation error occurred. |
EcsSecurityGroup |
| DeletionProtection |
string |
Indicates whether deletion protection is enabled for the stack. Valid values:
Note
The deletion protection mechanism for a nested stack is the same as that for 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.