File: //snap/google-cloud-cli/394/help/man/man1/gcloud_eventarc_message-buses_publish.1
.TH "GCLOUD_EVENTARC_MESSAGE\-BUSES_PUBLISH" 1
.SH "NAME"
.HP
gcloud eventarc message\-buses publish \- publish to an Eventarc message bus
.SH "SYNOPSIS"
.HP
\f5gcloud eventarc message\-buses publish\fR (\fIMESSAGE_BUS\fR\ :\ \fB\-\-location\fR=\fILOCATION\fR) (\fB\-\-avro\-message\fR=\fIAVRO_MESSAGE\fR\ |\ \fB\-\-json\-message\fR=\fIJSON_MESSAGE\fR\ |\ [\fB\-\-event\-data\fR=\fIEVENT_DATA\fR\ \fB\-\-event\-id\fR=\fIEVENT_ID\fR\ \fB\-\-event\-source\fR=\fIEVENT_SOURCE\fR\ \fB\-\-event\-type\fR=\fIEVENT_TYPE\fR\ :\ \fB\-\-event\-attributes\fR=[\fIATTRIBUTE\fR=\fIVALUE\fR,...]]) [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
Publish to an Eventarc message bus.
.SH "EXAMPLES"
To publish an event to the message bus \f5my\-message\-bus\fR with event id
\f51234\fR, event type \f5event\-provider.event.v1.eventType\fR, event source
\f5//event\-provider/event/source\fR, event data \f5{ "key": "value" }\fR and
event attributes of \f5attribute1=value\fR, run:
.RS 2m
$ gcloud eventarc message\-buses publish my\-message\-bus \e
\-\-location=us\-central1 \-\-event\-id=1234 \e
\-\-event\-type=event\-provider.event.v1.eventType \e
\-\-event\-source="//event\-provider/event/source" \e
\-\-event\-data='{"key": "value"}' \e
\-\-event\-attributes=attribute1=value
.RE
To publish an event to the message bus \f5my\-message\-bus\fR with a json
message, run:
.RS 2m
$ gcloud eventarc message\-buses publish my\-message\-bus \e
\-\-location=us\-central1 \e
\-\-json\-message='{"id": 1234, "type":
"event\-provider.event.v1.eventType", "source":
"//event\-provider/event/source", "specversion": "1.0", "data":
{"key": "value"}}'
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Message bus resource \- Message bus to publish to. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some attributes
are not given arguments in this group but can be set in other ways.
To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5message_bus\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp
This must be specified.
.RS 2m
.TP 2m
\fIMESSAGE_BUS\fR
ID of the message bus or fully qualified identifier for the message bus.
To set the \f5message\-bus\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5message_bus\fR on the command line.
.RE
.sp
This positional argument must be specified if any of the other arguments in this
group are specified.
.TP 2m
\fB\-\-location\fR=\fILOCATION\fR
The location for the Eventarc message bus, which should be one of the supported
regions. Alternatively, set the [eventarc/location] property.
To set the \f5location\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5message_bus\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-location\fR on the command line;
.IP "\(bu" 2m
set the property \f5eventarc/location\fR.
.RE
.sp
.RE
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-avro\-message\fR=\fIAVRO_MESSAGE\fR
An Avro message to publish to the message bus.
.TP 2m
\fB\-\-json\-message\fR=\fIJSON_MESSAGE\fR
A JSON message to publish to the message bus.
.TP 2m
\fB\-\-event\-data\fR=\fIEVENT_DATA\fR
An event data. The event data of a published event.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-event\-id\fR=\fIEVENT_ID\fR
An event id. The id of a published event.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-event\-source\fR=\fIEVENT_SOURCE\fR
An event source. The event source of a published event.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-event\-type\fR=\fIEVENT_TYPE\fR
An event type. The event type of a published event.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-event\-attributes\fR=[\fIATTRIBUTE\fR=\fIVALUE\fR,...]
Event attributes. The event attributes of a published event.This flag can be
repeated to add more attributes.
.RE
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.
Run \fB$ gcloud help\fR for details.
.SH "NOTES"
This variant is also available:
.RS 2m
$ gcloud beta eventarc message\-buses publish
.RE