- NAME
-
- gcloud alpha pubsub message-transforms test - tests messages 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 messages 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 has the 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 message
transforms are taken to be applied to the message. 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
project
attribute:-
provide the argument
--subscription
on the command line with a fully specified name; -
provide the argument
--project
on the command line; -
set the property
core/project
.
--subscription
=SUBSCRIPTION
-
ID of the subscription or fully qualified identifier for the subscription.
To set the
subscription
attribute:-
provide the argument
--subscription
on the command line.
-
provide the argument
-
provide the argument
-
Topic resource - Name of the topic from which the message transforms are taken
to be applied to the message. The arguments in this group can be used to specify
the attributes of this resource.
--topic
=TOPIC
-
ID of the topic or fully qualified identifier for the topic.
To set the
topic
attribute:-
provide the argument
--topic
on the command line.
This flag argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--topic-project
=TOPIC_PROJECT
-
Project ID of the Google Cloud project for the topic.
To set the
project
attribute:-
provide the argument
--topic
on the command line with a fully specified name; -
provide the argument
--topic-project
on the command line; -
provide the argument
--project
on 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 help
for details. - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-04 UTC.