Skip to main content

instanceEvents

Subscribe to events for a specific instance via WebSocket.

Receives events when the instance's configuration changes, a deployment is created, an incoming connection is added or removed, or a cloud metric alarm on the instance is registered, updated, deleted, or changes firing state. Requires read access to the instance's project.

subscription {
instanceEvents(organizationId: "my-org", instanceId: "my-database") {
... on Event { action timestamp }
... on InstanceEvent {
instance { id name status }
}
... on ConnectionEvent {
connection { id fromField toField }
}
... on AlarmEvent {
alarm { id displayName currentState { status message } }
}
}
}
instanceEvents(
organizationId: ID!
instanceId: ID!
): InstanceEventsPayload

Arguments

instanceEvents.organizationId ● ID! non-null scalar {#organization-id}

Your organization's unique identifier.

instanceEvents.instanceId ● ID! non-null scalar {#instance-id}

The identifier of the instance to subscribe to.

Type

InstanceEventsPayload union

Events delivered by the instanceEvents subscription.

Covers the instance itself, incoming connections that terminate on it, alarms attached to it, and deployments run against it.