Querying Details of a Stack Resource Event

Function

This API is used to query details of a stack resource event.

URI

GET /v1/{project_id}/stacks/{stack_name}/{stack_id}/resources/{resource_name}/events/{event_id}

For details about the parameters, see Table 1.

Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies the project ID.

stack_name

String

Yes

Specifies the stack name.

stack_id

String

Yes

Specifies the stack UUID.

resource_name

String

Yes

Specifies the name of the resource in the stack.

event_id

String

Yes

Specifies the UUID of the event related to the resource in the stack.

Request Parameter

N/A

Response Parameter

Parameter

In

Type

Description

event

body

Dict

Specifies a resource event.

event structure information

Parameter

In

Type

Description

event_time

body

String

Specifies the time when an event occurs.

id

body

String

Specifies the UUID of the event object.

links

body

List <dict>

Specifies the event URL list. Each URL is a JSON object with one href keyword for identifying the URL and one rel keyword indicating the event relationship. Multiple URLs may be returned.

logical_resource_id

body

String

Specifies the logical stack resource ID.

physical_resource_id

body

String

Specifies the physical stack resource ID.

resource_name

body

String

Specifies the resource name.

resource_properties

body

Dict

Specifies the mapping between resource attributes and events.

resource_status

body

String

Specifies the resource status.

resource_status_reason

body

String

Specifies the cause causing the current stack resource status.

resource_type

body

String

Specifies the resource type name.

Request Example

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

Response Example

{
    "event": {
        "event_time": "2014-02-18T18:23:27Z",
        "id": "485",
        "links": [
            {
                "href":  "http://x.x.x.x:8004/v1/8443bcd779f3435e86e1cbf73d98a89c/stacks/heat168714801/e6d10493-8d85-46cb-bf3c-e5572f255ef5/resources/random_str/events/1313",
                "rel": "self"
            },
            {
                "href":  "http://x.x.x.x:8004/v1/8443bcd779f3435e86e1cbf73d98a89c/stacks/heat168714801/e6d10493-8d85-46cb-bf3c-e5572f255ef5/resources/random_str",
                "rel": "resource"
            },
            {
                "href":  "http://x.x.x.x:8004/v1/8443bcd779f3435e86e1cbf73d98a89c/stacks/heat168714801/e6d10493-8d85-46cb-bf3c-e5572f255ef5",
                "rel": "stack"
            }
        ],
        "logical_resource_id": "random_key_name",
        "physical_resource_id": null,
        "resource_name": "random_key_name",
        "resource_properties": {
            "character_classes": null,
            "character_sequences": null,
            "length": 8,
            "salt": null,
            "sequence": null
        },
        "resource_status": "CREATE_IN_PROGRESS",
        "resource_status_reason": "state changed",
        "resource_type": "OS::Heat::RandomString"
    }
}

Return Code

Table 2 Normal return code

Return Code

Type

Description

200

OK

Request was successful.

Table 3 Error return code

Return Code

Type

Description

400

Bad Request

The server failed to process the request.

401

Unauthorized

Authorization failed.

404

Not found

The requested resources are not found.

500

Internal Server Error

Failed to complete the request because of an internal service error.