Query resource details

Last Updated: Apr 20, 2017

Query resource information

Description

This interface is used to query the details of a specific resource.

Request parameters

Name Location Type Required? Description
StackName URI String Yes Name of the stack, which must comply with the regular expression ^[a-zA-Z][a-zA-Z0-9_.-]*$. It can contain up to 255 characters.
StackId URI String Yes Stack ID.
ResourceName URI String Yes Resource name.

Return parameters

Name Parameter type Description
Name String Name of the resource.
Id String Physical ID of the resource.
Type String Resource type.
Status String Resource status; value options: CREATE_COMPLETE, CREATE_FAILED, CREATE_IN_PROGRESS, DELETE_FAILED, DELETE_IN_PROGRESS, ROLLBACK_COMPLETE, ROLLBACK_FAILED, and ROLLBACK_IN_PROGRESS.
StatusReason String Reason of the resource status.
Updated String Update time, which follows the ISO8601 standard and uses UTC time. The format is YYYY-MM-DDThh:mm:ssZ.
PhysicalId String Physical ID of the resource.

Error codes

Error code Description HTTP status code Meaning
InternalError Server error. 500 Server-side unknown exception.
StackNotFound The Stack (%(stack_name)s) could not be found. 404 The stack does not exist.
ResourceNotFound The Resource (%(resource_name)s) could not be found in Stack %(stack_name)s. 404 The resource does not exist.

Example

Request example

  1. GET http://ros.aliyuncs.com/stacks/myStack/28087440-3701-40ef-bbe8-6e80787d307f/resources/secret1 HTTP/1.1
  2. x-acs-signature-method: HMAC-SHA1
  3. Authorization: acs ACSTQDkNtSMrZtwL:niea/6wW/HHwwiafneHX+oM3ALU=
  4. Date: Fri, 11 Sep 2015 05:30:54 GMT
  5. x-acs-signature-version: 1.0
  6. x-sdk-client: Java/2.0.0
  7. Accept: application/octet-stream
  8. x-acs-version: 2015-09-01
  9. Cache-Control: no-cache
  10. Pragma: no-cache
  11. User-Agent: Java/1.6.0_27
  12. Host: ros.aliyuncs.com
  13. Connection: keep-alive

Response example

  1. HTTP/1.1 200 OK
  2. Date: Fri, 11 Sep 2015 05:30:12 GMT
  3. Content-Type: application/json; charset=UTF-8
  4. Content-Length: 1694
  5. Connection: close
  6. Vary: Accept-Encoding
  7. Access-Control-Allow-Origin: *
  8. Access-Control-Allow-Methods: POST, GET, OPTIONS
  9. Access-Control-Allow-Headers: X-Requested-With, X-Sequence, _aop_secret, _aop_signature
  10. Access-Control-Max-Age: 172800
  11. X-Acs-Request-Id: A21A4B12-CCD7-42F0-9A62-DE8347D88385
  12. Server: Jetty(7.2.2.v20101205)
  13. {
  14. "Status":"CREATE_COMPLETE",
  15. "Updated":"2015-09-11T07:38:03Z",
  16. "PhysicalId":"myStack-secret1-mfhzo5mfbhmb",
  17. "Id":"secret1",
  18. "Type":"ALIYUN::RandomString",
  19. "StatusReason":"state changed",
  20. "Name":"secret1"
  21. }
Thank you! We've received your feedback.