Reference For: developers

gRPC: tasks

Services, methods, messages and enums of tasks.proto.

Tasks, events and alarms.

TaskService

Tasks: long-running operations with state, progress and result.

MethodRequestResponseDescription
GetTaskGetTaskRequestTask

One task by id.

ListTasksListTasksRequestListTasksResponse

Tasks that match a filter.

CancelTaskCancelTaskRequestTask

Asks a running or queued task to stop; returns the task.

WaitTaskWaitTaskRequestTask

Blocks until the task is terminal or timeout_seconds elapses.

EventService

The event log of the inventory.

MethodRequestResponseDescription
QueryEventsQueryEventsRequestQueryEventsResponse

Events that match a filter.

AlarmService

Alarm states of inventory objects.

MethodRequestResponseDescription
ListAlarmsListAlarmsRequestListAlarmsResponse

Alarm states.

AcknowledgeAlarmAcknowledgeAlarmRequestEmpty

Acknowledges a triggered alarm on an object.

Messages

Task

A long-running operation.

FieldNumberTypeDescription
id1string

Id of the task.

description_id2string

Message id of what the task does (task.virtual_machine.power_on).

entity3string

Id of the object the task works on.

entity_name4string

Name of that object when the task started.

state5TaskState

State of the task.

progress6uint32

Progress in percent, 0 to 100.

result_json7string

Result of a successful task as JSON; empty otherwise.

error8ErrorDetail

Error of a failed task.

user9string

User who started the task.

chain_id10string

Id shared by the task and the events and tasks it caused.

queued_at11string

Time the task was queued, RFC 3339.

started_at12string

Time the task started, RFC 3339; empty while queued.

completed_at13string

Time the task ended, RFC 3339; empty while it runs.

attempt14uint32

Attempt number, 1 for the first run.

cancel_requested15bool

A cancellation was asked for and the task has not ended yet.

GetTaskRequest

Reads one task.

FieldNumberTypeDescription
id1string

Id of the task.

ListTasksRequest

Lists tasks.

FieldNumberTypeDescription
entity1string

Only the tasks of this object.

states2repeated TaskState

Only the tasks in these states.

user3string

Only the tasks of this user.

chain_id4string

Only the tasks of this chain.

page5PageRequest

Paging.

ListTasksResponse

A page of tasks.

FieldNumberTypeDescription
items1repeated Task

The tasks of the page.

page2PageInfo

Store version and cursor of the next page.

CancelTaskRequest

Asks a task to stop.

FieldNumberTypeDescription
id1string

Id of the task.

WaitTaskRequest

Waits for a task to end.

FieldNumberTypeDescription
id1string

Id of the task.

timeout_seconds2uint32

Longest wait in seconds; the answer is the task as it is then.

Event

One entry of the event log.

FieldNumberTypeDescription
id1string

Id of the event.

event_type2string

Event type (VmPoweredOnEvent).

severity3Severity

Severity.

message_key4string

Message id the console localises.

message_args5map<string, string>

Arguments of the message id.

entity6string

Id of the object the event is about.

entity_name7string

Name of that object when the event happened.

related8repeated string

Ids of further objects involved.

user9string

User whose action caused the event.

chain_id10string

Id of the chain of tasks and events it belongs to.

task11string

Id of the task that caused the event.

created_at12string

Time of the event, RFC 3339.

attributes13map<string, string>

Further attributes of the event type.

QueryEventsRequest

Queries the event log.

FieldNumberTypeDescription
entity1string

Only the events of this object.

recursive2bool

Also the events of the objects under it.

event_types3repeated string

Only these event types.

user4string

Only the events caused by this user.

chain_id5string

Only the events of this chain.

begin6string

Earliest time, RFC 3339.

end7string

Latest time, RFC 3339.

after_id8uint64

Collector cursor: only events with id number greater than this.

page9PageRequest

Paging.

QueryEventsResponse

A page of events.

FieldNumberTypeDescription
items1repeated Event

The events of the page.

page2PageInfo

Store version and cursor of the next page.

AlarmState

The status of an alarm on one object.

FieldNumberTypeDescription
entity1string

Id of the object.

status2AlarmStatus

Status.

since3string

Time of the last status change, RFC 3339.

acknowledged4bool

Someone acknowledged the triggered status.

Alarm

An alarm definition with its states.

FieldNumberTypeDescription
id1string

Id of the alarm.

name2string

Name.

description3string

What the alarm watches.

scope4string

Id of the object the alarm applies to and below.

enabled5bool

The alarm is evaluated.

trigger_json6string

Trigger definition as JSON, the same shape as in the REST API.

states7repeated AlarmState

Status on each object in scope.

ListAlarmsRequest

Lists the alarms.

FieldNumberTypeDescription
entity1string

Only alarms applicable to this entity (empty = all).

ListAlarmsResponse

The alarms.

FieldNumberTypeDescription
items1repeated Alarm

Every alarm with its states.

AcknowledgeAlarmRequest

Acknowledges a triggered alarm.

FieldNumberTypeDescription
alarm1string

Id of the alarm.

entity2string

Id of the object it triggered on.

Enums

TaskState

State of a task.

ValueNumberDescription
TASK_STATE_QUEUED0
TASK_STATE_RUNNING1
TASK_STATE_SUCCESS2
TASK_STATE_ERROR3
TASK_STATE_CANCELLED4

Severity

Severity of an event.

ValueNumberDescription
SEVERITY_INFO0
SEVERITY_WARNING1
SEVERITY_ERROR2
SEVERITY_USER3

AlarmStatus

Status of an alarm on an object; gray means not evaluated.

ValueNumberDescription
ALARM_STATUS_GRAY0
ALARM_STATUS_GREEN1
ALARM_STATUS_YELLOW2
ALARM_STATUS_RED3

Version 0.1.