- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- IAM Permissions
- EventUpdateFilter
- SpecialMode
- EventUpdateType
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 |
The parent of the resource. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"watcherId": string,
"streams": [
string
],
"eventUpdateFilter": {
object ( |
Fields | |
---|---|
watcherId |
Unique ID identifies the watcher of the streams. |
streams[] |
The name of the stream or the set of streams to watch. |
eventUpdateFilter |
The filter that the watchers can speficy on which event updates that they want to receive. |
heartbeatIntervalSecond |
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 ( |
Fields | |
---|---|
updateType |
The type of the Event update. |
stream |
The name of the stream that the event is attached to. |
event |
The name of the event. |
series |
The name of the series. |
updateTime |
The timestamp when the Event update happens. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
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 |
Fields | |
---|---|
Union field
|
|
specialMode |
Special modes other than a specific timestamp. |
specificTime |
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: |
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. |