Queries the resources in a specified stack.
Operation description
This topic provides an example on how to query the resources in a stack whose ID is 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** in the China (Hangzhou) region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:ListStackResources |
get |
*stack
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| StackId |
string |
Yes |
The stack ID. |
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 |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
B288A0BE-D927-4888-B0F7-B35EF84B6E6 |
| Resources |
array<object> |
The list of resource objects. |
|
|
array<object> |
|||
| Status |
string |
The resource status. Valid values:
|
UPDATE_COMPLETE |
| LogicalResourceId |
string |
The logical resource ID, which is the name defined in the template. |
dummy |
| UpdateTime |
string |
The time when the resource was last updated. The time is displayed in UTC+0 and follows the ISO 8601 standard. The time is in the YYYY-MM-DDThh:mm:ss format without the Z suffix. |
2019-08-01T06:01:29 |
| StackId |
string |
The stack ID. |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
| PhysicalResourceId |
string |
The physical resource ID, which is the actual resource ID. |
d04af923-e6b7-4272-aeaa-47ec9777**** |
| DriftDetectionTime |
string |
The time when the resource drift was detected during the most recent successful drift detection on the stack. |
2020-02-27T07:47:47 |
| ResourceType |
string |
The resource type. |
ALIYUN::ROS::Stack |
| ResourceDriftStatus |
string |
The drift status of the resource in the most recent successful drift detection on the stack. Valid values:
|
IN_SYNC |
| StatusReason |
string |
The reason for the resource status. |
state changed |
| CreateTime |
string |
The time when the resource was created. The time is displayed in UTC+0 and follows the ISO 8601 standard. The time is in the YYYY-MM-DDThh:mm:ss format without the Z suffix. |
2019-08-01T06:01:23 |
| StackName |
string |
The stack name. The name can be up to 255 characters in length and must start with a digit or a letter. It can contain digits, letters, hyphens (-), and underscores (_). |
test-describe-resource |
| ModuleInfo |
object |
The information about the module from which the resource is created. This parameter is returned only if the resource is created from a module. |
|
| LogicalIdHierarchy |
string |
The logical IDs of the modules that contain the resource, listed from outermost to innermost and separated by forward slashes ( Example: the resource is created from Module B nested within Module A:
|
moduleA/moduleB |
| TypeHierarchy |
string |
The types of the modules that contain the resource, listed from outermost to innermost and separated by forward slashes ( Example: a
|
MODULE::ROS::Parent::Example/MODULE::ROS::Child::Example |
Examples
Success response
JSON format
{
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6",
"Resources": [
{
"Status": "UPDATE_COMPLETE",
"LogicalResourceId": "dummy",
"UpdateTime": "2019-08-01T06:01:29",
"StackId": "4a6c9851-3b0f-4f5f-b4ca-a14bf691****",
"PhysicalResourceId": "d04af923-e6b7-4272-aeaa-47ec9777****",
"DriftDetectionTime": "2020-02-27T07:47:47",
"ResourceType": "ALIYUN::ROS::Stack",
"ResourceDriftStatus": "IN_SYNC",
"StatusReason": "state changed",
"CreateTime": "2019-08-01T06:01:23",
"StackName": "test-describe-resource",
"ModuleInfo": {
"LogicalIdHierarchy": "moduleA/moduleB",
"TypeHierarchy": "MODULE::ROS::Parent::Example/MODULE::ROS::Child::Example"
}
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.