gcloud alpha pubsub message-transforms test Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha pubsub message-transforms test - tests message transforms against a given message
- SYNOPSIS
gcloud alpha pubsub message-transforms test(--attribute=[ATTRIBUTE,…]--message=MESSAGE)(--message-transforms-file=MESSAGE_TRANSFORMS_FILE|--subscription=SUBSCRIPTION| [--topic=TOPIC:--topic-project=TOPIC_PROJECT])[GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Tests message transforms against a given message.- REQUIRED FLAGS
- Message to test the message transforms against.
At least one of these must be specified:
--attribute=[ATTRIBUTE,…]- Comma-separated list of attributes to attach to the message. Each ATTRIBUTE hasthe form name="value". You can specify up to 100 attributes.
--message=MESSAGE- Message body to test the message transforms against.
- Exactly one of these must be specified:
--message-transforms-file=MESSAGE_TRANSFORMS_FILE- Path to YAML or JSON file containing message transforms.
- Subscription resource - Name of the subscription from which the messagetransforms are taken to be applied to the message. 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
--subscriptionon the command line with afully specified name; - provide the argument
--projecton the command line; - set the property
core/project.
--subscription=SUBSCRIPTION- ID of the subscription or fully qualified identifier for the subscription.
To set the
subscriptionattribute:- provide the argument
--subscriptionon the command line.
- provide the argument
- provide the argument
- Topic resource - Name of the topic from which the message transforms are takento be applied to the message. The arguments in this group can be used to specifythe attributes of this resource.
--topic=TOPIC- ID of the topic or fully qualified identifier for the topic.
To set the
topicattribute:- provide the argument
--topicon the command line.
This flag argument must be specified if any of the other arguments in this groupare specified.
- provide the argument
--topic-project=TOPIC_PROJECT- Project ID of the Google Cloud project for the topic.
To set the
projectattribute:- provide the argument
--topicon the command line with a fullyspecified name; - provide the argument
--topic-projecton the command line; - provide the argument
--projecton the command line; - set the property
core/project.
- provide the argument
- Message to test the message transforms against.
- 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:
gcloudpubsubmessage-transformstestgcloudbetapubsubmessage-transformstest
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.