gcloud alpha pubsub schemas commit Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha pubsub schemas commit - commit a Pub/Sub schema revision
- SYNOPSIS
gcloud alpha pubsub schemas commitSCHEMA--type=TYPE(--definition=DEFINITION|--definition-file=PATH_TO_FILE)[GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Commit a Pub/Sub schema revision.- EXAMPLES
- To commit a PROTOCOL_BUFFER schema revision called "key-schema" that requiresexactly one-string field named "key", run:
gcloudalphapubsubschemascommitkey-schema--definition="syntax = 'proto3'; message Message { optional string key = 1; }"--type=protocol-bufferTocommitanequivalentAVROschemarevision,run:gcloudalphapubsubschemascommitkey-schema--definition="{ 'type': 'record', 'namespace': 'my.ns', 'name': 'KeyMsg', 'fields': [ { 'name': 'key', 'type': 'string' } ] }"--type=avro - POSITIONAL ARGUMENTS
- Schema resource - Name of the schema to revise. This represents a Cloudresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.
To set the
projectattribute:- provide the argument
schemaon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
SCHEMA- ID of the schema or fully qualified identifier for the schema.
To set the
schemaattribute:- provide the argument
schemaon the command line.
- provide the argument
- provide the argument
- Schema resource - Name of the schema to revise. This represents a Cloudresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.
- REQUIRED FLAGS
--type=TYPE- The type of the schema.
- Schema definition
Exactly one of these must be specified:
--definition=DEFINITION- The new definition of the schema.
--definition-file=PATH_TO_FILE- File containing the new schema definition. Use a full or relative path to alocal file containing the value of definition_file.
- 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
$gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudpubsubschemascommitgcloudbetapubsubschemascommit
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 2025-05-07 UTC.