You can call this operation to query the resource list of a specific stack.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListStackResources

The operation that you want to perform. Set the value to ListStackResources.

RegionId String Yes cn-hangzhou

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

StackId String Yes 4a6c9851-3b0f-4f5f-b4ca-a14bf691****

The ID of the stack.

Response parameters

Parameter Type Example Description
RequestId String B288A0BE-D927-4888-B0F7-B35EF84B6E6

The ID of the request.

Resources Array

The list of resources.

CreateTime String 2019-08-01T06:01:23

The time when the task was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

DriftDetectionTime String 2020-02-27T07:47:47

The time when the last successful drift detection operation was initiated.

LogicalResourceId String dummy

The logical resource ID defined in the template.

PhysicalResourceId String d04af923-e6b7-4272-aeaa-47ec9777****

The physical ID of the resource.

ResourceDriftStatus String IN_SYNC

The drift status of the resource in the last successful drift detection. Valid values:

  • DELETED: The actual configuration of the resource differs from its expected template configuration because the resource has been deleted.
  • MODIFIED: The actual configuration of the resource differs from its expected template configuration.
  • NOT_CHECKED: ROS has not checked whether the actual configuration of the resource differs from its expected template configuration.
  • IN_SYNC: The actual configuration of the resource matches its expected template configuration.
ResourceType String ALIYUN::ROS::Stack

The type of the resource.

StackId String 4a6c9851-3b0f-4f5f-b4ca-a14bf691****

The ID of the stack.

StackName String test-describe-resource

The name of the stack.

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 letter.

Status String UPDATE_COMPLETE

The status of the resource. Valid values:

  • CREATE_COMPLETE
  • CREATE_FAILED
  • CREATE_IN_PROGRESS
  • UPDATE_IN_PROGRESS
  • UPDATE_FAILED
  • UPDATE_COMPLETE
  • DELETE_IN_PROGRESS
  • DELETE_FAILED
  • DELETE_COMPLETE
  • CHECK_IN_PROGRESS
  • CHECK_FAILED
  • CHECK_COMPLETE
  • IMPORT_IN_PROGRESS
  • IMPORT_FAILED
  • IMPORT_COMPLETE
StatusReason String state changed

The reason that the resource is in its current status.

UpdateTime String 2019-08-01T06:01:29

The time when the resource was last updated. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

Examples

Sample requests

http(s)://ros.aliyuncs.com/? Action=ListStackResources
&RegionId=cn-hangzhou
&StackId=4a6c9851-3b0f-4f5f-b4ca-a14bf691****
&<Common request parameters>

Sample success responses

XML format

<ListStackResourcesResponse>
       <RequestId type="string">B288A0BE-D927-4888-B0F7-B35EF84B6E6F</RequestId>
       <Resources class="array">
              <Resource class="object">
                     <CreationTime type="string">2019-08-01T06:01:23</CreationTime>
                     <LogicalResourceId type="string">dummy</LogicalResourceId>
                     <PhysicalResourceId type="string">a</PhysicalResourceId>
                     <ResourceType type="string">ALIYUN::DEBUG::Dummy</ResourceType>
                     <StackId type="string">efdf5c10-96a5-4fd7-ab89-68e7baa2****</StackId>
                     <StackName type="string">test-describe-resource</StackName>
                     <Status type="string">UPDATE_COMPLETE</Status>
                     <StatusReason type="string">state changed</StatusReason>
                     <UpdatedTime type="string">2019-08-01T06:01:29</UpdatedTime>
                     <DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
                     <ResourceDriftStatus>IN_SYNC</ResourceDriftStatus>
              </Resource>
              <Resource class="object">
                     <CreationTime type="string">2019-08-01T06:01:28</CreationTime>
                     <LogicalResourceId type="string">dummy3</LogicalResourceId>
                     <PhysicalResourceId type="string">a</PhysicalResourceId>
                     <ResourceType type="string">ALIYUN::DEBUG::Dummy</ResourceType>
                     <StackId type="string">efdf5c10-96a5-4fd7-ab89-68e7baa2****</StackId>
                     <StackName type="string">test-describe-resource</StackName>
                     <Status type="string">CREATE_COMPLETE</Status>
                     <StatusReason type="string">state changed</StatusReason>
                     <UpdatedTime type="string">2019-08-01T06:01:29</UpdatedTime>
                     <DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
                     <ResourceDriftStatus>IN_SYNC</ResourceDriftStatus>
              </Resource>
              <Resource class="object">
                     <CreationTime type="string">2019-08-01T06:01:23</CreationTime>
                     <LogicalResourceId type="string">WaitConditionHandle</LogicalResourceId>
                     <PhysicalResourceId type="string"></PhysicalResourceId>
                     <ResourceType type="string">ALIYUN::ROS::WaitConditionHandle</ResourceType>
                     <StackId type="string">efdf5c10-96a5-4fd7-ab89-68e7baa2****</StackId>
                     <StackName type="string">test-describe-resource</StackName>
                     <Status type="string">UPDATE_COMPLETE</Status>
                     <StatusReason type="string">state changed</StatusReason>
                     <UpdatedTime type="string">2019-08-01T06:01:29</UpdatedTime>
                     <DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
                     <ResourceDriftStatus>IN_SYNC</ResourceDriftStatus>
              </Resource>
              <Resource class="object">
                     <CreationTime type="string">2019-08-01T06:01:23</CreationTime>
                     <LogicalResourceId type="string">nested</LogicalResourceId>
                     <PhysicalResourceId type="string">d04af923-e6b7-4272-aeaa-47ec9777****</PhysicalResourceId>
                     <ResourceType type="string">ALIYUN::ROS::Stack</ResourceType>
                     <StackId type="string">efdf5c10-96a5-4fd7-ab89-68e7baa2****</StackId>
                     <StackName type="string">test-describe-resource</StackName>
                     <Status type="string">UPDATE_COMPLETE</Status>
                     <StatusReason type="string">state changed</StatusReason>
                     <UpdatedTime type="string">2019-08-01T06:01:28</UpdatedTime>
                     <DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
                     <ResourceDriftStatus>IN_SYNC</ResourceDriftStatus>
              </Resource>
       </Resources>
</ListStackResourcesResponse>

JSON format

{
   "RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
   "Resources": [
       {
           "CreationTime": "2019-08-01T06:01:23",
           "LogicalResourceId": "dummy",
           "PhysicalResourceId": "a",
           "ResourceType": "ALIYUN::DEBUG::Dummy",
           "StackId": "efdf5c10-96a5-4fd7-ab89-68e7baa2****",
           "StackName": "test-describe-resource",
           "Status": "UPDATE_COMPLETE",
           "StatusReason": "state changed",
           "UpdatedTime": "2019-08-01T06:01:29",
           "DriftDetectionTime": "2020-02-27T07:47:47",
           "ResourceDriftStatus": "IN_SYNC"
       },
       {
           "CreationTime": "2019-08-01T06:01:28",
           "LogicalResourceId": "dummy3",
           "PhysicalResourceId": "a",
           "ResourceType": "ALIYUN::DEBUG::Dummy",
           "StackId": "efdf5c10-96a5-4fd7-ab89-68e7baa2****",
           "StackName": "test-describe-resource",
           "Status": "CREATE_COMPLETE",
           "StatusReason": "state changed",
           "UpdatedTime": "2019-08-01T06:01:29",
           "DriftDetectionTime": "2020-02-27T07:47:47",
           "ResourceDriftStatus": "IN_SYNC"
       },
       {
           "CreationTime": "2019-08-01T06:01:23",
           "LogicalResourceId": "WaitConditionHandle",
           "PhysicalResourceId": "",
           "ResourceType": "ALIYUN::ROS::WaitConditionHandle",
           "StackId": "efdf5c10-96a5-4fd7-ab89-68e7baa2****",
           "StackName": "test-describe-resource",
           "Status": "UPDATE_COMPLETE",
           "StatusReason": "state changed",
           "UpdatedTime": "2019-08-01T06:01:29",
           "DriftDetectionTime": "2020-02-27T07:47:47",
           "ResourceDriftStatus": "IN_SYNC"
       },
       {
           "CreationTime": "2019-08-01T06:01:23",
           "LogicalResourceId": "nested",
           "PhysicalResourceId": "d04af923-e6b7-4272-aeaa-47ec9777****",
           "ResourceType": "ALIYUN::ROS::Stack",
           "StackId": "efdf5c10-96a5-4fd7-ab89-68e7baa2e0d5",
           "StackName": "test-describe-resource",
           "Status": "UPDATE_COMPLETE",
           "StatusReason": "state changed",
           "UpdatedTime": "2019-08-01T06:01:28",
           "DriftDetectionTime": "2020-02-27T07:47:47",
           "ResourceDriftStatus": "IN_SYNC"
       }
   ]
}

Error codes

For a list of error codes, visit the API Error Center.

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.