CloudEvent interface Stay organized with collections Save and categorize content based on your preferences.
A CloudEvent describes event data.
Signature:
exportinterfaceCloudEventProperties
| Property | Type | Description |
|---|---|---|
| data | object | string | Data payload of the event. Objects are stringified with JSON and strings are be passed along as-is. |
| datacontenttype | string | MIME type of the data being sent with the event in thedata field. Onlyapplication/json andtext/plain are currently supported. If not specified, it is automatically inferred from the type of provided data. |
| id | string | Identifier for the event. If not provided, it is auto-populated with a UUID. |
| source | string | Identifies the context in which an event happened. If not provided, the value ofEVENTARC_CLOUD_EVENT_SOURCE environment variable is used and if that is not set, a validation error is thrown. |
| specversion | CloudEventVersion | The version of the CloudEvents specification which the event uses. If not provided, is set to1.0 -- the only supported value. |
| subject | string | Subject (context) of the event in the context of the event producer. |
| time | string | Timestamp of the event. Must be in ISO time format. If not specified, current time (at the moment of publishing) is used. |
| type | string | Type of the event. Should be prefixed with a reverse-DNS name (com.my-org.v1.something.happended). |
CloudEvent.data
Data payload of the event. Objects are stringified with JSON and strings are be passed along as-is.
Signature:
data?:object|string;CloudEvent.datacontenttype
MIME type of the data being sent with the event in thedata field. Onlyapplication/json andtext/plain are currently supported. If not specified, it is automatically inferred from the type of provided data.
Signature:
datacontenttype?:string;CloudEvent.id
Identifier for the event. If not provided, it is auto-populated with a UUID.
Signature:
id?:string;CloudEvent.source
Identifies the context in which an event happened. If not provided, the value ofEVENTARC_CLOUD_EVENT_SOURCE environment variable is used and if that is not set, a validation error is thrown.
Signature:
source?:string;CloudEvent.specversion
The version of the CloudEvents specification which the event uses. If not provided, is set to1.0 -- the only supported value.
Signature:
specversion?:CloudEventVersion;CloudEvent.subject
Subject (context) of the event in the context of the event producer.
Signature:
subject?:string;CloudEvent.time
Timestamp of the event. Must be in ISO time format. If not specified, current time (at the moment of publishing) is used.
Signature:
time?:string;CloudEvent.type
Type of the event. Should be prefixed with a reverse-DNS name (com.my-org.v1.something.happended).
Signature:
type:string;Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-29 UTC.