Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Environment/ Querying the Events of a Resource Enabling Record Based on the Environment ID
Updated on 2024-12-16 GMT+08:00

Querying the Events of a Resource Enabling Record Based on the Environment ID

Function

This API is used to query the events of a resource enabling record based on the environment ID.

URI

GET /v3/{project_id}/cas/environments/{environment_id}/iac-resources/provision-histories/{history_id}/events

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID. See Obtaining a Project ID.

environment_id

Yes

String

Environment ID. See Obtaining All Environments.

history_id

Yes

String

Deployment record ID. See Querying Resource Enabling Records Based on the Environment ID.

Request

None

Response parameters

Table 2 Response body parameter

Parameter

Type

Description

stack_events

Array of stack_event objects

Events of a deployment record.

Table 3 stack_event

Parameter

Type

Description

resource_type

String

Resource type.

resource_name

String

Resource name. The default value is the logical name of a resource.

elapsed_seconds

Integer

Execution time of an event, in seconds.

event_message

String

Detailed information about a stack event.

event_type

String

Event type.

resource_id_key

String

Key of a resource ID. If the resource is not created, resource_id_key is not returned.

resource_id_value

String

Value of a resource ID. If the resource is not created, resource_id_value is not returned.

time

String

Time when an event occurs. The format complies with RFC 3339, that is, yyyy-mm-ddTHH:MM:SSZ. For example, 1970-01-01T00:00:00Z.

Example Request

None

Example Response

{
  "stack_events": [
    {
      "event_type": "LOG",
      "event_message": "Apply required resource success. ",
      "resource_name": null,
      "resource_type": null
    },
    {
      "event_type": "SUMMARY",
      "event_message": "Apply complete! Resources: 0 added, 1 changed, 0 destroyed.",
      "resource_name": null,
      "resource_type": null
    },
    {
      "event_type": "UPDATE_COMPLETE",
      "event_message": "hcs_vpc_eip.eipe05: Modifications complete after 3s [id=e38529c4-fb0a-42a4-8dbb-94f1af43489b]",
      "resource_name": "eipe05",
      "resource_type": "hcs_vpc_eip"
    },
    {
      "event_type": "UPDATE_IN_PROGRESS",
      "event_message": "hcs_vpc_eip.eipe05: Modifying... [id=e38529c4-fb0a-42a4-8dbb-94f1af43489b]",
      "resource_name": "eipe05",
      "resource_type": "hcs_vpc_eip"
    },
    {
      "event_type": "LOG",
      "event_message": "Creating required resource now",
      "resource_name": null,
      "resource_type": null
    }
  ]
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

The error code format is SVCSTG.00100.[Error_ID], for example, SVCSTG.00100400. For details, see ServiceStage Error Codes.