ListStackEvents
This API lists all deployment events of a stack.
GET /v1/{project_id}/stacks/{stack_name}/events
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
A project ID is obtained by calling an API or from the console. Minimum: 3 Maximum: 64 |
stack_name |
Yes |
String |
A stack name is unique within its domain (domain_id), region, and project (project_id). It is case-sensitive and starts with a letter. Only letters, digits, underscores (_), and hyphens (-) are allowed. Minimum: 1 Maximum: 128 |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
stack_id |
No |
String |
Unique stack ID. It is a UUID generated by RFS when a stack is created. Stack names are unique at one specific time, so you can create a stack named HelloWorld and another stack with the same name after deleting the first one. For parallel development, team members may want to ensure that they are operating the stack they created, not one with the same name created by other members after deleting the previous one. To avoid this mismatch, check the ID, since RFS ensures each stack has a unique ID that does not change with updates. If the stack_id value differs from the current stack ID, 400 is returned. Minimum: 36 Maximum: 36 |
deployment_id |
No |
String |
Unique deployment ID. It is a UUID generated by RFS when deployment or rollback is triggered. Minimum: 36 Maximum: 36 |
filter |
No |
String |
Filter criteria.
Minimum: 0 Maximum: 512 |
field |
No |
String |
Specified attribute name.
Minimum: 0 Maximum: 128 |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
Client-Request-Id |
Yes |
String |
A unique request ID is specified by a user to locate a request. UUID is recommended. Minimum: 36 Maximum: 128 |
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
stack_events |
Array of StackEvent objects |
List of stack events. |
Parameter |
Type |
Description |
|---|---|---|
resource_type |
String |
Resource type. For example, in the following HCL template, the value of resource_type is opentelekomcloud_vpc_v1. resource "opentelekomcloud_vpc_v1" "my_hello_world_vpc" {
name = "test_vpc"
}
In a JSON template, the value of resource_type is opentelekomcloud_vpc_v1. {
"resource": {
"opentelekomcloud_vpc_v1": {
"my_hello_world_vpc": {
"name": "test_vpc"
}
}
}
}
|
resource_name |
String |
Resource name. The default value is the logical name of a resource. For example, in the following HCL template, the value of resource_name is my_hello_world_vpc. resource "opentelekomcloud_vpc_v1" "my_hello_world_vpc" {
name = "test_vpc"
}
In a JSON template, the value of resource_name is my_hello_world_vpc. {
"resource": {
"opentelekomcloud_vpc_v1": {
"my_hello_world_vpc": {
"name": "test_vpc"
}
}
}
}
|
resource_id_key |
String |
Name of resource ID. If a resource is not created, resource_id_key is not returned. The ID is defined by a provider. Different providers may comply with different naming rules. For details about the naming rules, contact provider developers or read provider's documentation. |
resource_id_value |
String |
Resource ID value. If a resource is not created, resource_id_value is not returned. |
resource_key |
String |
Resource key. If count or for_each is used in a template, resource_key will be returned. If count is used in a template, resource_key is a number starting from 0. For example, in the following HCL template, if the count is 2, two resources will be generated and the value of resource_key is 0 and 1. resource "opentelekomcloud_vpc_v1" "my_hello_world_vpc" {
count = 2
name = "test_vpc"
}
In a JSON template, the value of resource_key is 0 and 1. {
"resource": {
"opentelekomcloud_vpc_v1": {
"my_hello_world_vpc": {
"name": "test_vpc",
"count": 2
}
}
}
}
If for_each is used in a template, resource_key is a user-defined string. In the following HCL template, the value of resource_key is vpc1 and vpc2. resource "opentelekomcloud_vpc_v1" "my_hello_world_vpc" {
for_each = {
"vpc1" = "test_vpc"
"vpc2" = "test_vpc"
}
name = each.value
}
In the following JSON template, the value of resource_key is vpc1 and vpc2. {
"resource": {
"opentelekomcloud_vpc_v1": {
"my_hello_world_vpc": {
"for_each": {
"vpc1": "test_vpc",
"vpc2": "test_vpc"
}
"name": "${each.value}"
}
}
}
}
|
time |
String |
Occurrence time of an event. The format complies with RFC 3339 (YYYY-MM-DDTHH:MM:SSZ), for example, 1970-01-01T00:00:00Z. |
event_type |
String |
Event types may include:
Enumeration values:
|
event_message |
String |
Details about a stack event. |
elapsed_seconds |
Integer |
Event execution duration (Unit: seconds) |
Status code: 400
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Response code. Minimum: 11 Maximum: 11 |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
Status code: 401
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Response code. Minimum: 11 Maximum: 11 |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
Status code: 403
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Response code. Minimum: 11 Maximum: 11 |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
Status code: 404
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Response code. Minimum: 11 Maximum: 11 |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
Status code: 429
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Response code. Minimum: 11 Maximum: 11 |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
Status code: 500
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Response code. Minimum: 11 Maximum: 11 |
error_msg |
String |
Response message. |
encoded_authorization_message |
String |
The message contains information about unauthorized requests. |
GET https://{endpoint}/v1/ba2b9930c977f71edaeaa3a5e96a8ff1/stacks/my_hello_world_stack/events?filter=event_type==LOG,resource_name==my_hello_world_resource
GET https://{endpoint}/v1/ba2b9930c977f71edaeaa3a5e96a8ff1/stacks/my_hello_world_stack/events?field=resource_key,resource_name
GET https://{endpoint}/v1/ba2b9930c977f71edaeaa3a5e96a8ff1/stacks/my_hello_world_stack/events?deployment_id=81edbb3e-00d9-42fd-94c8-59c7525d0f28
Status code: 200
Stack events listed.
{
"stack_events" : [ {
"event_message" : "Apply required resource success. ",
"event_type" : "LOG",
"time" : "2023-05-17T11:56:47Z"
}, {
"event_message" : "Apply complete! Resources: 1 added, 0 changed, 0 destroyed.",
"event_type" : "SUMMARY",
"time" : "2023-05-17T11:56:45Z"
}, {
"resource_type" : "opentelekomcloud_vpc_v1",
"resource_name" : "vpc",
"elapsed_seconds" : 8,
"event_message" : "opentelekomcloud_vpc_v1.vpc: Creation complete after 8s [id=38d617da-9b7f-4550-9ff7-d0e271dd4735]",
"event_type" : "CREATION_COMPLETE",
"resource_id_key" : "id",
"resource_id_value" : "38d617da-9b7f-4550-9ff7-d0e271dd4735",
"time" : "2023-05-17T11:56:40Z"
}, {
"resource_type" : "opentelekomcloud_vpc_v1",
"resource_name" : "vpc",
"event_message" : "opentelekomcloud_vpc_v1.vpc: Creating...",
"event_type" : "CREATION_IN_PROGRESS",
"time" : "2023-05-17T11:56:32Z"
}, {
"event_message" : "Creating required resource now",
"event_type" : "LOG",
"time" : "2023-05-17T11:56:31Z"
} ]
}
Status Code |
Description |
|---|---|
200 |
Stack events listed. |
400 |
Invalid request. |
401 |
Authentication failed. |
403 |
The user does not have the permission to call this API. |
404 |
The stack or the specified deployment does not exist. |
429 |
Too frequent requests. |
500 |
Internal server error. |