gcloud alpha pubsub message-transforms test

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 theproject attribute:

  • provide the argument--subscription on the command line with afully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.
--subscription=SUBSCRIPTION
ID of the subscription or fully qualified identifier for the subscription.

To set thesubscription attribute:

  • provide the argument--subscription on the command line.
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 thetopic attribute:

  • provide the argument--topic on the command line.

This flag argument must be specified if any of the other arguments in this groupare specified.

--topic-project=TOPIC_PROJECT
Project ID of the Google Cloud project for the topic.

To set theproject attribute:

  • provide the argument--topic on the command line with a fullyspecified name;
  • provide the argument--topic-project on the command line;
  • provide the argument--project on the command line;
  • set the propertycore/project.
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 help for 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-transformstest
gcloudbetapubsubmessage-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.