Method: projects.locations.clusters.watchEvents

Watch for event updates happening on the given streams.

HTTP request

POST https://{endpoint}/v1/{cluster=projects/*/locations/*/clusters/*}:watchEvents

Where {endpoint} is one of the supported service endpoints.

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
cluster

string

The parent of the resource.

Request body

The request body contains data with the following structure:

JSON representation
{
  "watcherId": string,
  "streams": [
    string
  ],
  "eventUpdateFilter": {
    object (EventUpdateFilter)
  },
  "heartbeatIntervalSecond": number
}
Fields
watcherId

string

Unique ID identifies the watcher of the streams.

streams[]

string

The name of the stream or the set of streams to watch.

eventUpdateFilter

object (EventUpdateFilter)

The filter that the watchers can speficy on which event updates that they want to receive.

heartbeatIntervalSecond

number

HeartbeatIntervalSecond defines the interval (in second) of heartbeat response returned from the gRPC streaming server. Default 0 means no heartbeat will be returned.

Response body

If successful, the response body contains data with the following structure:

Each response message will contain one Event update.

JSON representation
{
  "updateType": enum (EventUpdateType),
  "stream": string,
  "event": string,
  "series": string,
  "updateTime": string
}
Fields
updateType

enum (EventUpdateType)

The type of the Event update.

stream

string

The name of the stream that the event is attached to.

event

string

The name of the event.

series

string

The name of the series.

updateTime

string (Timestamp format)

The timestamp when the Event update happens.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the cluster resource:

  • visionai.clusters.watch

For more information, see the IAM documentation.

EventUpdateFilter

EventUpdateFilter is the filter that the watchers can speficy on which event updates that they want to receive.

JSON representation
{

  // Union field start_time can be only one of the following:
  "specialMode": enum (SpecialMode),
  "specificTime": string
  // End of list of possible types for union field start_time.
}
Fields

Union field start_time.

start_time can be only one of the following:

specialMode

enum (SpecialMode)

Special modes other than a specific timestamp.

specificTime

string (Timestamp format)

Specific timestamp after which the event updates happens.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

SpecialMode

Special modes other than a specific timestamp.

Enums
SPECIAL_MODE_UNSPECIFIED Special mode unspecified.
BEGINNING BEGINNING special mode means all currently available events and incoming event updates.
LATEST LATEST special mode means only the latest events and incoming event updates.

EventUpdateType

The type of the event updates. Can be extended in the future for other use cases. e.g. EVENT_DETACHED_FROM_STREAM, and more.

Enums
EVENT_UPDATE_TYPE_UNSPECIFIED Event update type unspecified.
EVENT_AVAILABLE_ON_STREAM Event is available to read from on a stream.
EVENT_HEARTBEAT Heartbeat message that is used to track liveliness of the gRPC connection.