Queries the resource list of a specified stack.

In this topic, the resource list of a stack whose ID is 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** is queried. The stack is deployed in the China (Hangzhou) region.

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 parameter

Parameter Type Required Example Description
Action String Yes ListStackResources

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

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

The ID of the stack.

RegionId String Yes cn-hangzhou

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

For more information about common request parameters, see Common parameters.

Response parameters

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

The ID of the request.

Resources Array of Resource

The list of resources.

Status String UPDATE_COMPLETE

The status of the resource. Valid values:

  • CREATE_COMPLETE: The stack has been created.
  • CREATE_FAILED: The stack failed to be created.
  • CREATE_IN_PROGRESS: The stack is being created.
  • UPDATE_IN_PROGRESS: The stack is being updated.
  • UPDATE_FAILED: The stack failed to be updated.
  • UPDATE_COMPLETE: The stack has been updated.
  • DELETE_IN_PROGRESS: The stack is being deleted.
  • DELETE_FAILED: The stack failed to be deleted.
  • DELETE_COMPLETE: The stack has been deleted.
  • CHECK_IN_PROGRESS: The stack is being verified.
  • CHECK_FAILED: The stack failed to be verified.
  • CHECK_COMPLETE: The stack has been verified.
  • IMPORT_IN_PROGRESS: The stack is being imported.
  • IMPORT_FAILED: The stack failed to be imported.
  • IMPORT_COMPLETE: The stack has been imported.
LogicalResourceId String dummy

The logical ID of the resource. It is the resource name defined in the template.

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.

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

The ID of the stack.

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

The physical ID of the resource.

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

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

ResourceType String ALIYUN::ROS::Stack

The type of the resource.

ResourceDriftStatus String IN_SYNC

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

  • DELETED: The configuration of the resource differs from its expected template configuration because the resource has been deleted.
  • MODIFIED: The configuration of the resource differs from its expected template configuration.
  • NOT_CHECKED: ROS has not checked whether the configuration of the resource differs from its expected template configuration.
  • IN_SYNC: The configuration of the resource matches its expected template configuration.
StatusReason String state changed

The reason why the resource is in its current state.

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

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

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.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListStackResourcesResponse>
	<RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6F</RequestId>
	<Resources>
		<CreationTime>2019-08-01T06:01:23</CreationTime>
		<LogicalResourceId>WaitConditionHandle</LogicalResourceId>
		<PhysicalResourceId></PhysicalResourceId>
		<ResourceType>ALIYUN::ROS::WaitConditionHandle</ResourceType>
		<StackId>4a6c9851-3b0f-4f5f-b4ca-a14bf691****</StackId>
		<StackName>test-describe-resource</StackName>
		<Status>UPDATE_COMPLETE</Status>
		<StatusReason>state changed</StatusReason>
		<UpdatedTime>2019-08-01T06:01:29</UpdatedTime>
		<DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
		<ResourceDriftStatus>IN_SYNC</ResourceDriftStatus>
	</Resources>
	<Resources>
		<CreationTime>2019-08-01T06:01:23</CreationTime>
		<LogicalResourceId>nested</LogicalResourceId>
		<PhysicalResourceId>d04af923-e6b7-4272-aeaa-47ec9777****</PhysicalResourceId>
		<ResourceType>ALIYUN::ROS::Stack</ResourceType>
		<StackId>4a6c9851-3b0f-4f5f-b4ca-a14bf691****</StackId>
		<StackName>test-describe-resource</StackName>
		<Status>UPDATE_COMPLETE</Status>
		<StatusReason>state changed</StatusReason>
		<UpdatedTime>2019-08-01T06:01:28</UpdatedTime>
		<DriftDetectionTime>2020-02-27T07:47:47</DriftDetectionTime>
		<ResourceDriftStatus>IN_SYNC</ResourceDriftStatus>
	</Resources>
</ListStackResourcesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
  "Resources" : [ {
    "CreationTime" : "2019-08-01T06:01:23",
    "LogicalResourceId" : "WaitConditionHandle",
    "PhysicalResourceId" : "",
    "ResourceType" : "ALIYUN::ROS::WaitConditionHandle",
    "StackId" : "4a6c9851-3b0f-4f5f-b4ca-a14bf691****",
    "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" : "4a6c9851-3b0f-4f5f-b4ca-a14bf691****",
    "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.