File: //snap/google-cloud-cli/394/help/man/man1/gcloud_pubsub_schemas_commit.1
.TH "GCLOUD_PUBSUB_SCHEMAS_COMMIT" 1
.SH "NAME"
.HP
gcloud pubsub schemas commit \- commit a Pub/Sub schema revision
.SH "SYNOPSIS"
.HP
\f5gcloud pubsub schemas commit\fR \fISCHEMA\fR \fB\-\-type\fR=\fITYPE\fR (\fB\-\-definition\fR=\fIDEFINITION\fR\ |\ \fB\-\-definition\-file\fR=\fIPATH_TO_FILE\fR) [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
Commit a Pub/Sub schema revision.
.SH "EXAMPLES"
To commit a PROTOCOL_BUFFER schema revision called "key\-schema" that requires
exactly one\-string field named "key", run:
.RS 2m
$ gcloud pubsub schemas commit key\-schema \e
\-\-definition="syntax = 'proto3'; message Message { optional \e
string key = 1; }" \-\-type=protocol\-buffer To commit an equivalent \e
AVRO schema revision, run:
.RE
.RS 2m
$ gcloud pubsub schemas commit key\-schema \e
\-\-definition="{ 'type': 'record', 'namespace': 'my.ns', 'name': \e
'KeyMsg', 'fields': [ { 'name': 'key', 'type': 'string' } ] }" \e
\-\-type=avro
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Schema resource \- Name of the schema to revise. This represents a Cloud
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 \f5schema\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
\fISCHEMA\fR
ID of the schema or fully qualified identifier for the schema.
To set the \f5schema\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5schema\fR on the command line.
.RE
.sp
.RE
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-type\fR=\fITYPE\fR
The type of the schema.
.TP 2m
Schema definition
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-definition\fR=\fIDEFINITION\fR
The new definition of the schema.
.TP 2m
\fB\-\-definition\-file\fR=\fIPATH_TO_FILE\fR
File containing the new schema definition. Use a full or relative path to a
local file containing the value of definition_file.
.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"
These variants are also available:
.RS 2m
$ gcloud alpha pubsub schemas commit
.RE
.RS 2m
$ gcloud beta pubsub schemas commit
.RE