This topic provides an example on how to query the resources in a specified stack. In this example, the resources in the stack whose ID is \`4a6c9851-3b0f-4f5f-b4ca-a14bf691\*\*\*\*\` in the China (Hangzhou) region are queried.
Operation description
For more information about common request parameters, see Common parameters.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
StackId | string | Yes | The ID of the region to which the stack belongs. You can call the DescribeRegions operation to query the most recent region list. | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
RegionId | string | Yes | The ID of the request. | cn-hangzhou |
Error code | Error message | HTTP status code | Description |
---|---|---|---|
StackNotFound | The Stack ({name}) could not be found. | 404 | The error message returned because the specified stack does not exist. name indicates the name or ID of the stack. |
Response parameters
The operation that you want to perform. Set the value to ListStackResources.
Examples
Sample success responses
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
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-05-10 | The response structure of the API has changed | View Change Details |