gcloud eventarc pipelines update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud eventarc pipelines update - update an Eventarc pipeline
- SYNOPSIS
gcloud eventarc pipelines update(PIPELINE:--location=LOCATION)[--async][--destinations=[http_endpoint_uri=URI],[http_endpoint_message_binding_template=HTTP_ENDPOINT_MESSAGE_BINDING_TEMPLATE],[workflow=WORKFLOW],[message_bus=MESSAGE_BUS],[pubsub_topic=PUBSUB_TOPIC],[project=PROJECT],[location=LOCATION],[network_attachment=NETWORK_ATTACHMENT],[google_oidc_authentication_service_account=GOOGLE_OIDC_AUTHENTICATION_SERVICE_ACCOUNT],[google_oidc_authentication_audience=GOOGLE_OIDC_AUTHENTICATION_AUDIENCE],[oauth_token_authentication_service_account=OAUTH_TOKEN_AUTHENTICATION_SERVICE_ACCOUNT],[oauth_token_authentication_scope=OAUTH_TOKEN_AUTHENTICATION_SCOPE],[output_payload_format_json=OUTPUT_PAYLOAD_FORMAT_JSON],[output_payload_format_avro_schema_definition=OUTPUT_PAYLOAD_FORMAT_AVRO_SCHEMA_DEFINITION],[output_payload_format_protobuf_schema_definition=OUTPUT_PAYLOAD_FORMAT_PROTOBUF_SCHEMA_DEFINITION]#[…]][--logging-config=LOGGING_CONFIG][--mediations=[transformation_template=TRANSFORMATION_TEMPLATE#…]][--update-labels=[KEY=VALUE,…]][--clear-crypto-key|--crypto-key=CRYPTO_KEY][--clear-labels|--remove-labels=[KEY,…]][--input-payload-format-avro-schema-definition=INPUT_PAYLOAD_FORMAT_AVRO_SCHEMA_DEFINITION|--input-payload-format-json=INPUT_PAYLOAD_FORMAT_JSON|--input-payload-format-protobuf-schema-definition=INPUT_PAYLOAD_FORMAT_PROTOBUF_SCHEMA_DEFINITION][--max-retry-attempts=MAX_RETRY_ATTEMPTS--max-retry-delay=MAX_RETRY_DELAY--min-retry-delay=MIN_RETRY_DELAY][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
- Update an Eventarc pipeline.
- EXAMPLES
- To update the pipeline
my-pipelinewith its destination targetingHTTP endpoint URI 'https://example-endpoint.com' and network attachment'my-network-attachment', run:gcloudeventarcpipelinesupdatemy-pipeline--location=us-central1--destinations=http_endpoint_uri='https://example-endpoint.com',network_attachment=my-network-attachment - POSITIONAL ARGUMENTS
- Pipeline resource - The pipeline to update. The arguments in this group can beused to specify the attributes of this resource. (NOTE) Some attributes are notgiven arguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
pipelineon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
PIPELINE- ID of the pipeline or fully qualified identifier for the pipeline.
To set the
pipelineattribute:- provide the argument
pipelineon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- The location for the Eventarc pipeline, which should be one of the supportedregions. Alternatively, set the [eventarc/location] property.
To set the
locationattribute:- provide the argument
pipelineon the command line with a fullyspecified name; - provide the argument
--locationon the command line; - set the property
eventarc/location.
- provide the argument
- provide the argument
- Pipeline resource - The pipeline to update. The arguments in this group can beused to specify the attributes of this resource. (NOTE) Some attributes are notgiven arguments in this group but can be set in other ways.
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--destinations=[http_endpoint_uri=URI],[http_endpoint_message_binding_template=HTTP_ENDPOINT_MESSAGE_BINDING_TEMPLATE],[workflow=WORKFLOW],[message_bus=MESSAGE_BUS],[pubsub_topic=PUBSUB_TOPIC],[project=PROJECT],[location=LOCATION],[network_attachment=NETWORK_ATTACHMENT],[google_oidc_authentication_service_account=GOOGLE_OIDC_AUTHENTICATION_SERVICE_ACCOUNT],[google_oidc_authentication_audience=GOOGLE_OIDC_AUTHENTICATION_AUDIENCE],[oauth_token_authentication_service_account=OAUTH_TOKEN_AUTHENTICATION_SERVICE_ACCOUNT],[oauth_token_authentication_scope=OAUTH_TOKEN_AUTHENTICATION_SCOPE],[output_payload_format_json=OUTPUT_PAYLOAD_FORMAT_JSON],[output_payload_format_avro_schema_definition=OUTPUT_PAYLOAD_FORMAT_AVRO_SCHEMA_DEFINITION],[output_payload_format_protobuf_schema_definition=OUTPUT_PAYLOAD_FORMAT_PROTOBUF_SCHEMA_DEFINITION]#[…]- The pipeline's destinations. This flag can be repeated to add more destinationsto the list. Currently, only one destination is supported per pipeline. Adestination is specified in a dict format. For more information, seeCreatean enrollment to receive events.
Note: Exactly one of the
http_endpoint_uri,workflow,message_bus, orpubsub_topickeys must be set.Valid keys are:
http_endpoint_uri- The URI of the HTTP endpoint. The value must be a RFC2396 URI string. Only HTTPSprotocol is supported. The host can be either a static IP addressable from theVPC specified by the network config, or an internal DNS hostname of the serviceresolvable via Cloud DNS. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com' http_endpoint_message_binding_template- The CEL expression used to construct a new HTTP request to be sent to the finaldestination. It can be optionally specified alongside with
http_endpoint_uri. It represents a configuration used to bind amessage to the final HTTP request that will be sent to the destination. If abinding is not specified, by default the message is treated as a CloudEvent andis mapped to the HTTP request according to the CloudEvent HTTP Protocol BindingBinary Content Mode. The pipeline converts the data field of the message to theformat provided inoutput_payload_formatand maps it to the bodyfield of the result. It also sets the corresponding Content-Type header to theoutput_payload_formattype. If theoutput_payload_formatis unspecified, then the pipeline will treatthe data field of the message as opaque binary data and attach it to the requestbody as bytes. In this case, the Content-Type header will be set to the value ofthe datacontenttype attribute set on the incoming CloudEvent message if present,or theapplication/octet-streamMIME type otherwise. The pipelineexpects that the content of the message will adhere to the standard CloudEventformat. If not then the outgoing message request may fail with a persistenterror.Note: When
http_endpoint_uriis not set,http_endpoint_message_binding_templatecan't be set.The result of the CEL expression must be a map of key-value pairs such that:
1. If a map named
headersexists on the result of the expression,then its key-value pairs are directly mapped to the HTTP request headers. Theheaders values are constructed from the corresponding value type's canonicalrepresentation. If theheadersfield does not exist, then theresulting HTTP request will not contain headers.2. If a field named
bodyexists on the result of the expression,then its value is directly mapped to the body of the request. If the value ofthebodyfield is of type bytes or string, then it is used as theHTTP request body as-is withouth any conversion. If thebodyfieldis of any other type, then it is converted to a JSON string. If thebodyfield does not exist, then the resulting HTTP request will notcontain a body.3. Any other fields in the resulting expression will be ignored.
The CEL expression may access the incoming CloudEvent message in its definition,as follows:
1. The
datafield of the incoming CloudEvent message can beaccessed using themessage.datavalue.2. Each attribute of the incoming CloudEvent message can be accessed using the
message.<key>value, where <key> is the name of theattribute.Headers added to the request by previous filters in the chain can be accessed inthe CEL expression using the
headersvariable. Theheadersvariable defines a map of key-value pairs corresponding tothe HTTP headers added by previous mediation steps and not the headers presenton the original incoming request. For example, the following CEL expression canbe used to construct a headers-only HTTP request by adding an additional headerto the headers added by previous mediations in the pipeline:{"headers":headers.merge({"new-header-key":"new-header-value"})}
Additionally, the following CEL extension functions can be used in this CELexpression:
toBase64Url: map.toBase64Url() -> string- Converts a CelValue to a base64url encoded string.
toJsonString: map.toJsonString() -> string- Converts a CelValue to a JSON string.
merge: map1.merge(map2) -> map3- Merges the passed CEL map with the existing CEL map the function is applied to.If the same key exists in both maps, or if the key's value is type map, thenboth maps are merged; Otherwise, the value from the passed map is used.
toMap: list(map).toMap() -> map- Converts a CEL list of CEL maps to a single CEL map.
toDestinationPayloadFormat:message.data.toDestinationPayloadFormat() -> string or bytes- Converts the message data to the destination payload format specified in
output_payload_format. This function is meant to be applied to themessage.data field. If the destination payload format is not set, the functionwill return the message data unchanged.
- Converts the message data to the destination payload format specified in
toCloudEventJsonWithPayloadFormat:message.toCloudEventJsonWithPayloadFormat() -> map- Converts a message to the corresponding structure of JSON format forCloudEvents. This function applies toDestinationPayloadFormat() to the messagedata. It also sets the corresponding datacontenttype of the CloudEvent, asindicated by the
output_payload_formatfield. Ifoutput_payload_formatis not set, it will use the existingdatacontenttype on the CloudEvent if present; Otherwise, it leaves thedatacontenttype unset. This function expects that the content of the messagewill adhere to the standard CloudEvent format. If it doesn't then this functionwill fail. The result is a CEL map that corresponds to the JSON representationof the CloudEvent. To convert that data to a JSON string it can be chained withthe toJsonString() function.
For example:
- Converts a message to the corresponding structure of JSON format forCloudEvents. This function applies toDestinationPayloadFormat() to the messagedata. It also sets the corresponding datacontenttype of the CloudEvent, asindicated by the
gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com',http_endpoint_message_binding_template='{"headers":headers.merge({"new-header-key": "new-header-value"}),"body": "new-body"}' workflow- The destination Workflow ID. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=workflow=my-workflow message_bus- The destination Message Bus ID. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=message_bus=my-message-bus pubsub_topic- The destination Pub/Sub topic ID. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=pubsub_topic=my-topic project- The project ID of the destination resource. If
projectis not set,then the project ID of the pipeline is used. For example:gcloudeventarcpipelinescreateexample-pipeline--destinations=project=example-project,workflow=my-workflowNote: When
http_endpoint_uriis set,projectcan't beset. location- The location of the destination resource. If
locationis not set,then the location of the pipeline is used. For example:gcloudeventarcpipelinescreateexample-pipeline--destinations=location=us-east1,workflow=my-workflowNote: When
http_endpoint_uriis set,locationcan't beset. network_attachment- The ID of the network attachment that allows access to the consumer VPC. Forexample:
gcloudeventarcpipelinescreateexample-pipeline--destinations=network_attachment=my-network-attachment,http_endpoint_uri='https://example.com'Note:
network_attachmentcan only be set whenhttp_endpoint_uriis set as well. google_oidc_authentication_service_account- The service account email used to generate the OIDC token. The token can be usedto invoke Cloud Run and Cloud Run functions destinations or HTTP endpoints thatsupport Google OIDC. Note that the principal who calls this API must have
iam.serviceAccounts.actAspermission on the service account. Formore information, seeServiceaccounts overview. For example:gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com',google_oidc_authentication_service_account=example-service-account@example-project.gserviceaccount.iam.com google_oidc_authentication_audience- The audience claim which identifies the recipient that the JWT is intended for.If unspecified, the destination URI will be used. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com',google_oidc_authentication_service_account=example-service-account@example-project.gserviceaccount.iam.com,google_oidc_authentication_audience='https://example.com'Note:
google_oidc_authentication_audiencecan only be set ifgoogle_oidc_authentication_service_accountis set. oauth_token_authentication_service_account- The service account email used to generate the OAuth token. OAuth authorizationshould generally only be used when calling Google APIs hosted on*.googleapis.com. Note that the principal who calls this API must haveiam.serviceAccounts.actAs permission in the service account. For moreinformation, seeServiceaccounts overview. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com',oauth_token_authentication_service_account=example-service-account@example-project.gserviceaccount.iam.com oauth_token_authentication_scope- The scope used to generate the OAuth token. If unspecified,"https://www.googleapis.com/auth/cloud-platform" will be used. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com',oauth_token_authentication_service_account=example-service-account@example-project.gserviceaccount.iam.com,oauth_token_authentication_scope=https://www.googleapis.com/auth/\cloud-platformNote: At most one of
google_oidc_authentication_service_accountoroauth_token_authentication_service_accountcan be set; andoauth_token_authentication_scopecan only be set ifoauth_token_authentication_service_accountis set. output_payload_format_json- Indicates that the output payload format is JSON. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com',output_payload_format_json=--input-payload-format-json=Note: JSON schemas are not supported. Any value specified by this key isignored.
output_payload_format_avro_schema_definition- The schema definition of the Avro output payload format. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com',output_payload_format_avro_schema_definition='{"type": "record","name": "my_record", "fields": [{"name": "field1", "type": "string"}]}'\--input-payload-format-avro-schema-definition='{"type": "record", "name": "my_record", "fields": [{"name": "field1", "type": "string"}]}' output_payload_format_protobuf_schema_definition- The schema definition of the Protobuf output payload format. For example:
gcloudeventarcpipelinescreateexample-pipeline--destinations=http_endpoint_uri='https://example.com',output_payload_format_protobuf_schema_definition='syntax ="proto3"; message Location { string home_address = 1; }'\--input-payload-format-protobuf-schema-definition='syntax = "proto3"; message Location { string home_address = 1; }'Note: If none of the
input_payload_format_json,input_payload_format_avro_schema_definition, orinput_payload_format_protobuf_schema_definitionis set, then themessage data is treated as an opaque binary and no output format can be set onthe pipeline through theoutput_payload_format_json,output_payload_format_avro_schema_definition, oroutput_payload_format_protobuf_schema_definitionfield. Anymediations on the pipeline that involve access to the data field will fail aspersistent errors.
--logging-config=LOGGING_CONFIG- The logging config of the pipeline.
LOGGING_CONFIGmustbe one of:NONE,DEBUG,INFO,NOTICE,WARNING,ERROR,CRITICAL,ALERT,EMERGENCY. --mediations=[transformation_template=TRANSFORMATION_TEMPLATE#…]- The different ways to modify the pipeline. Currently, only one mediation issupported per pipeline.
A mediation is specified in a dict format. Currently, the only valid choice is
transformation_template.This is the template to apply to transform messages.
For complex transformations, shell parameter processing may fail to parse theCEL expressions. Please see
gcloud topic flags-filefor how to usehttps://cloud.google.com/sdk/gcloud/reference/topic/flags-filefeature of gcloud to pass in CEL expressions.Examples:
gcloudeventarcpipelinescreateexample-pipeline--mediations=transformation_template='message.removeFields(["data.credit_card_number","data.ssn"])' --update-labels=[KEY=VALUE,…]- List of label KEY=VALUE pairs to update. If a label exists, its value ismodified. Otherwise, a new label is created.
Keys must start with a lowercase character and contain only hyphens(
-), underscores (_), lowercase characters, andnumbers. Values must contain only hyphens (-), underscores(_), lowercase characters, and numbers. - At most one of these can be specified:
--clear-crypto-key- Remove the previously configured crypto key. The channel will continue to beencrypted using Google-managed keys.
--crypto-key=CRYPTO_KEY- Fully qualified name of the crypto key to use for customer-managed encryption.If this is unspecified, Google-managed keys will be used for encryption.
- At most one of these can be specified:
--clear-labels- Remove all labels. If
--update-labelsis also specified then--clear-labelsis applied first.For example, to remove all labels:
gcloudeventarcpipelinesupdate--clear-labelsTo remove all existing labels and create two new labels,
andfoo:bazgcloudeventarcpipelinesupdate--clear-labels--update-labelsfoo=bar,baz=qux --remove-labels=[KEY,…]- List of label keys to remove. If a label does not exist it is silently ignored.If
--update-labelsis also specified then--update-labelsis applied first.
- At most one of these can be specified:
--input-payload-format-avro-schema-definition=INPUT_PAYLOAD_FORMAT_AVRO_SCHEMA_DEFINITION- The pipeline's input payload Avro schema definition. If this is set, then anymessages not matching this format will be treated as persistent errors.
--input-payload-format-json=INPUT_PAYLOAD_FORMAT_JSON- The pipeline's input payload format is JSON. If this is set, then any messagesnot matching this format will be treated as persistent errors.
--input-payload-format-protobuf-schema-definition=INPUT_PAYLOAD_FORMAT_PROTOBUF_SCHEMA_DEFINITION- The pipeline's input payload Protobuf schema definition. If this is set, thenany messages not matching this format will be treated as persistent errors.
--max-retry-attempts=MAX_RETRY_ATTEMPTS- The maximum number of delivery attempts. If not set, the default value is 5.
--max-retry-delay=MAX_RETRY_DELAY- The maximum retry delay in seconds. If not set, the default value is 60.
--min-retry-delay=MIN_RETRY_DELAY- The minimum retry delay in seconds. If not set, the default value is 1.
- 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 variant is also available:
gcloudbetaeventarcpipelinesupdate
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-12-16 UTC.