• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Heat
  5. Stack Resources
  6. List Resources

List Resources

Function Description

This interface is used to query stack resources.

Interface Format

Method

URI

Description

GET

/v1/{tenant_id}/stacks/{stack_name}/{stack_id}/resources

Queries stack resources.

Request Parameter

N/A

Response Parameter

Parameter

Type

Mandatory

Description

resources

List(dict)

No

Specifies resource information of the stack.

resources structure

Parameter

Type

Description

resource_name

String

Specifies the resource name.

links

String

Specifies the resource URI.

logical_resource_id

String

Specifies the logical resource ID.

physical_resource_id

String

Specifies the physical resource ID.

resource_type

String

Specifies the resource type.

resource_status

String

Specifies the resource status.

resource_status_reason

String

Specifies the resource operation reason.

updated_time

String

Specifies the time when the resource was updated.

creation_time

String

Specifies the time when the resource was created.

required_by

List(str)

Specifies the resource dependency.

Request Example

GET /v1/95d02433133a4c0a87ba6967474a2ad3/stacks/HeatStack/c89c4bb3-96cb-4a55-aafa-076a7939a306/resources

Response Example

{"resources": [
      {
      "resource_name": "instacne_port",
      "links":       [
                  {
            "href": "http://172.25.150.29:8004/v1/95d02433133a4c0a87ba6967474a2ad3/stacks/HeatStack/c89c4bb3-96cb-4a55-aafa-076a7939a306/resources/instacne_port",
            "rel": "self"
         },
                  {
            "href": "http://172.25.150.29:8004/v1/95d02433133a4c0a87ba6967474a2ad3/stacks/HeatStack/c89c4bb3-96cb-4a55-aafa-076a7939a306",
            "rel": "stack"
         }
      ],
      "logical_resource_id": "instacne_port",
      "resource_status_reason": "state changed",
      "updated_time": "2014-01-27T16:28:03Z",
      "required_by": ["my_instance"],
      "resource_status": "RESUME_COMPLETE",
      "physical_resource_id": "202307c7-d10e-4bcf-af85-6253f5d6b022",
      "resource_type": "OS::Neutron::Port"
   },
      {
      "resource_name": "my_instance",
      "links":       [
                  {
            "href": "http://172.25.150.29:8004/v1/95d02433133a4c0a87ba6967474a2ad3/stacks/HeatStack/c89c4bb3-96cb-4a55-aafa-076a7939a306/resources/my_instance",
            "rel": "self"
         },
                  {
            "href": "http://172.25.150.29:8004/v1/95d02433133a4c0a87ba6967474a2ad3/stacks/HeatStack/c89c4bb3-96cb-4a55-aafa-076a7939a306",
            "rel": "stack"
         }
      ],
      "logical_resource_id": "my_instance",
      "resource_status_reason": "state changed",
      "updated_time": "2014-01-27T16:28:06Z",
      "required_by": [],
      "resource_status": "RESUME_COMPLETE",
      "physical_resource_id": "e722ad16-ff09-4622-aa5c-0466ae4ef8d8",
      "resource_type": "OS::Nova::Server"
   }
]}

Returned Code

See section Return Code Processing.