Class: Google::Cloud::Eventarc::V1::Pipeline::Destination
- Inherits:
-
Object
- Object
- Google::Cloud::Eventarc::V1::Pipeline::Destination
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/eventarc/v1/pipeline.rb
Overview
Represents a target of an invocation over HTTP.
Defined Under Namespace
Classes: AuthenticationConfig, HttpEndpoint, NetworkConfig
Instance Attribute Summary collapse
-
#authentication_config ⇒ ::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig
Optional.
-
#http_endpoint ⇒ ::Google::Cloud::Eventarc::V1::Pipeline::Destination::HttpEndpoint
Optional.
-
#message_bus ⇒ ::String
Optional.
-
#network_config ⇒ ::Google::Cloud::Eventarc::V1::Pipeline::Destination::NetworkConfig
Optional.
-
#output_payload_format ⇒ ::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat
Optional.
-
#topic ⇒ ::String
Optional.
-
#workflow ⇒ ::String
Optional.
Instance Attribute Details
#authentication_config ⇒ ::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig
Returns Optional. An authentication config used to authenticate message requests, such that destinations can verify the source. For example, this can be used with private GCP destinations that require GCP credentials to access like Cloud Run. This field is optional and should be set only by users interested in authenticated push.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'proto_docs/google/cloud/eventarc/v1/pipeline.rb', line 179 class Destination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a network config to be used for destination resolution and # connectivity. # @!attribute [rw] network_attachment # @return [::String] # Required. Name of the NetworkAttachment that allows access to the # consumer VPC. Format: # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a HTTP endpoint destination. # @!attribute [rw] uri # @return [::String] # Required. The URI of the HTTP enpdoint. # # The value must be a RFC2396 URI string. # Examples: `https://svc.us-central1.p.local:8080/route`. # Only the HTTPS protocol is supported. # @!attribute [rw] message_binding_template # @return [::String] # Optional. The CEL expression used to modify how the destination-bound # HTTP request is constructed. # # If a binding expression is not specified here, the message # is treated as a CloudEvent and is mapped to the HTTP request according # to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this # representation, all fields except the `data` and `datacontenttype` # field on the message are mapped to HTTP request headers with a prefix # of `ce-`. # # To construct the HTTP request payload and the value of the content-type # HTTP header, the payload format is defined as follows: # 1) Use the output_payload_format_type on the Pipeline.Destination if it # is set, else: # 2) Use the input_payload_format_type on the Pipeline if it is set, # else: # 3) Treat the payload as opaque binary data. # # The `data` field of the message is converted to the payload format or # left as-is for case 3) and then attached as the payload of the HTTP # request. The `content-type` header on the HTTP request is set to the # payload format type or left empty for case 3). However, if a mediation # has updated the `datacontenttype` field on the message so that it is # not the same as the payload format type but it is still a prefix of the # payload format type, then the `content-type` header on the HTTP request # is set to this `datacontenttype` value. For example, if the # `datacontenttype` is "application/json" and the payload format type is # "application/json; charset=utf-8", then the `content-type` header on # the HTTP request is set to "application/json; charset=utf-8". # # If a non-empty binding expression is specified then this expression is # used to modify the default CloudEvent HTTP Protocol Binding Binary # Content representation. # The result of the CEL expression must be a map of key/value pairs # which is used as follows: # - If a map named `headers` exists on the result of the expression, # then its key/value pairs are directly mapped to the HTTP request # headers. The headers values are constructed from the corresponding # value type’s canonical representation. If the `headers` field doesn’t # exist then the resulting HTTP request will be the headers of the # CloudEvent HTTP Binding Binary Content Mode representation of the final # message. Note: If the specified binding expression, has updated the # `datacontenttype` field on the message so that it is not the same as # the payload format type but it is still a prefix of the payload format # type, then the `content-type` header in the `headers` map is set to # this `datacontenttype` value. # - If a field named `body` exists on the result of the expression then # its value is directly mapped to the body of the request. If the value # of the `body` field is of type bytes or string then it is used for # the HTTP request body as-is, with no conversion. If the body field is # of any other type then it is converted to a JSON string. If the body # field does not exist then the resulting payload of the HTTP request # will be data value of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message as described earlier. # - Any other fields in the resulting expression will be ignored. # # The CEL expression may access the incoming CloudEvent message in its # definition, as follows: # - The `data` field of the incoming CloudEvent message can be accessed # using the `message.data` value. Subfields of `message.data` may also be # accessed if an input_payload_format has been specified on the Pipeline. # - Each attribute of the incoming CloudEvent message can be accessed # using the `message.<key>` value, where <key> is replaced with the # name of the attribute. # - Existing headers can be accessed in the CEL expression using the # `headers` variable. The `headers` variable defines a map of key/value # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding # Binary Content Mode representation of the final message as described # earlier. For example, the following CEL expression can be used to # construct an HTTP request by adding an additional header to the HTTP # headers of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message and by overwriting the body of the # request: # # ``` # { # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), # "body": "new-body" # } # ``` # # Additionally, the following CEL extension functions are provided for # use in this CEL expression: # - 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, if the key's value is type # map both maps are merged else the value from the passed map is # used. # - denormalize: # map.denormalize() -> map # - Denormalizes a CEL map such that every value of type map or key # in the map is expanded to return a single level map. # - The resulting keys are "." separated indices of the map keys. # - For example: # { # "a": 1, # "b": { # "c": 2, # "d": 3 # } # "e": [4, 5] # } # .denormalize() # -> { # "a": 1, # "b.c": 2, # "b.d": 3, # "e.0": 4, # "e.1": 5 # } # - setField: # map.setField(key, value) -> message # - Sets the field of the message with the given key to the # given value. # - If the field is not present it will be added. # - If the field is present it will be overwritten. # - The key can be a dot separated path to set a field in a nested # message. # - Key must be of type string. # - Value may be any valid type. # - removeFields: # map.removeFields([key1, key2, ...]) -> message # - Removes the fields of the map with the given keys. # - The keys can be a dot separated path to remove a field in a # nested message. # - If a key is not found it will be ignored. # - Keys must be of type string. # - toMap: # [map1, map2, ...].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 Pipeline.Destination.output_payload_format # - This function is meant to be applied to the message.data field. # - If the destination payload format is not set, the function will # return the message data unchanged. # - toCloudEventJsonWithPayloadFormat: # message.toCloudEventJsonWithPayloadFormat() -> map # - Converts a message to the corresponding structure of JSON # format for CloudEvents # - This function applies toDestinationPayloadFormat() to the # message data. It also sets the corresponding datacontenttype of # the CloudEvent, as indicated by # Pipeline.Destination.output_payload_format. If no # output_payload_format is set it will use the existing # datacontenttype on the CloudEvent if present, else leave # datacontenttype absent. # - This function expects that the content of the message will # adhere to the standard CloudEvent format. If it doesn’t then this # function will fail. # - The result is a CEL map that corresponds to the JSON # representation of the CloudEvent. To convert that data to a JSON # string it can be chained with the toJsonString function. # # The Pipeline expects that the message it receives adheres to the # standard CloudEvent format. If it doesn’t then the outgoing message # request may fail with a persistent error. class HttpEndpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a config used to authenticate message requests. # @!attribute [rw] google_oidc # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] # Optional. This authenticate method will apply Google OIDC tokens # signed by a GCP service account to the requests. # @!attribute [rw] oauth_token # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] # Optional. If specified, an [OAuth # token](https://developers.google.com/identity/protocols/OAuth2) will # be generated and attached as an `Authorization` header in the HTTP # request. # # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. class AuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a config used to authenticate with a Google OIDC token using # a GCP service account. Use this authentication method to invoke your # Cloud Run and Cloud Functions destinations or HTTP endpoints that # support Google OIDC. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the OIDC Token. # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow the # Pipeline to create OpenID tokens for authenticated requests. # @!attribute [rw] audience # @return [::String] # Optional. Audience to be used to generate the OIDC Token. The # audience claim identifies the recipient that the JWT is intended for. # If unspecified, the destination URI will be used. class OidcToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Contains information needed for generating an # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the [OAuth # token](https://developers.google.com/identity/protocols/OAuth2). # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline # to create OAuth2 tokens for authenticated requests. # @!attribute [rw] scope # @return [::String] # Optional. OAuth scope to be used for generating OAuth access token. # If not specified, "https://www.googleapis.com/auth/cloud-platform" # will be used. class OAuthToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#http_endpoint ⇒ ::Google::Cloud::Eventarc::V1::Pipeline::Destination::HttpEndpoint
Returns Optional. An HTTP endpoint destination described by an URI. If a DNS FQDN is provided as the endpoint, Pipeline will create a peering zone to the consumer VPC and forward DNS requests to the VPC specified by network config to resolve the service endpoint. See: https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'proto_docs/google/cloud/eventarc/v1/pipeline.rb', line 179 class Destination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a network config to be used for destination resolution and # connectivity. # @!attribute [rw] network_attachment # @return [::String] # Required. Name of the NetworkAttachment that allows access to the # consumer VPC. Format: # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a HTTP endpoint destination. # @!attribute [rw] uri # @return [::String] # Required. The URI of the HTTP enpdoint. # # The value must be a RFC2396 URI string. # Examples: `https://svc.us-central1.p.local:8080/route`. # Only the HTTPS protocol is supported. # @!attribute [rw] message_binding_template # @return [::String] # Optional. The CEL expression used to modify how the destination-bound # HTTP request is constructed. # # If a binding expression is not specified here, the message # is treated as a CloudEvent and is mapped to the HTTP request according # to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this # representation, all fields except the `data` and `datacontenttype` # field on the message are mapped to HTTP request headers with a prefix # of `ce-`. # # To construct the HTTP request payload and the value of the content-type # HTTP header, the payload format is defined as follows: # 1) Use the output_payload_format_type on the Pipeline.Destination if it # is set, else: # 2) Use the input_payload_format_type on the Pipeline if it is set, # else: # 3) Treat the payload as opaque binary data. # # The `data` field of the message is converted to the payload format or # left as-is for case 3) and then attached as the payload of the HTTP # request. The `content-type` header on the HTTP request is set to the # payload format type or left empty for case 3). However, if a mediation # has updated the `datacontenttype` field on the message so that it is # not the same as the payload format type but it is still a prefix of the # payload format type, then the `content-type` header on the HTTP request # is set to this `datacontenttype` value. For example, if the # `datacontenttype` is "application/json" and the payload format type is # "application/json; charset=utf-8", then the `content-type` header on # the HTTP request is set to "application/json; charset=utf-8". # # If a non-empty binding expression is specified then this expression is # used to modify the default CloudEvent HTTP Protocol Binding Binary # Content representation. # The result of the CEL expression must be a map of key/value pairs # which is used as follows: # - If a map named `headers` exists on the result of the expression, # then its key/value pairs are directly mapped to the HTTP request # headers. The headers values are constructed from the corresponding # value type’s canonical representation. If the `headers` field doesn’t # exist then the resulting HTTP request will be the headers of the # CloudEvent HTTP Binding Binary Content Mode representation of the final # message. Note: If the specified binding expression, has updated the # `datacontenttype` field on the message so that it is not the same as # the payload format type but it is still a prefix of the payload format # type, then the `content-type` header in the `headers` map is set to # this `datacontenttype` value. # - If a field named `body` exists on the result of the expression then # its value is directly mapped to the body of the request. If the value # of the `body` field is of type bytes or string then it is used for # the HTTP request body as-is, with no conversion. If the body field is # of any other type then it is converted to a JSON string. If the body # field does not exist then the resulting payload of the HTTP request # will be data value of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message as described earlier. # - Any other fields in the resulting expression will be ignored. # # The CEL expression may access the incoming CloudEvent message in its # definition, as follows: # - The `data` field of the incoming CloudEvent message can be accessed # using the `message.data` value. Subfields of `message.data` may also be # accessed if an input_payload_format has been specified on the Pipeline. # - Each attribute of the incoming CloudEvent message can be accessed # using the `message.<key>` value, where <key> is replaced with the # name of the attribute. # - Existing headers can be accessed in the CEL expression using the # `headers` variable. The `headers` variable defines a map of key/value # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding # Binary Content Mode representation of the final message as described # earlier. For example, the following CEL expression can be used to # construct an HTTP request by adding an additional header to the HTTP # headers of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message and by overwriting the body of the # request: # # ``` # { # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), # "body": "new-body" # } # ``` # # Additionally, the following CEL extension functions are provided for # use in this CEL expression: # - 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, if the key's value is type # map both maps are merged else the value from the passed map is # used. # - denormalize: # map.denormalize() -> map # - Denormalizes a CEL map such that every value of type map or key # in the map is expanded to return a single level map. # - The resulting keys are "." separated indices of the map keys. # - For example: # { # "a": 1, # "b": { # "c": 2, # "d": 3 # } # "e": [4, 5] # } # .denormalize() # -> { # "a": 1, # "b.c": 2, # "b.d": 3, # "e.0": 4, # "e.1": 5 # } # - setField: # map.setField(key, value) -> message # - Sets the field of the message with the given key to the # given value. # - If the field is not present it will be added. # - If the field is present it will be overwritten. # - The key can be a dot separated path to set a field in a nested # message. # - Key must be of type string. # - Value may be any valid type. # - removeFields: # map.removeFields([key1, key2, ...]) -> message # - Removes the fields of the map with the given keys. # - The keys can be a dot separated path to remove a field in a # nested message. # - If a key is not found it will be ignored. # - Keys must be of type string. # - toMap: # [map1, map2, ...].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 Pipeline.Destination.output_payload_format # - This function is meant to be applied to the message.data field. # - If the destination payload format is not set, the function will # return the message data unchanged. # - toCloudEventJsonWithPayloadFormat: # message.toCloudEventJsonWithPayloadFormat() -> map # - Converts a message to the corresponding structure of JSON # format for CloudEvents # - This function applies toDestinationPayloadFormat() to the # message data. It also sets the corresponding datacontenttype of # the CloudEvent, as indicated by # Pipeline.Destination.output_payload_format. If no # output_payload_format is set it will use the existing # datacontenttype on the CloudEvent if present, else leave # datacontenttype absent. # - This function expects that the content of the message will # adhere to the standard CloudEvent format. If it doesn’t then this # function will fail. # - The result is a CEL map that corresponds to the JSON # representation of the CloudEvent. To convert that data to a JSON # string it can be chained with the toJsonString function. # # The Pipeline expects that the message it receives adheres to the # standard CloudEvent format. If it doesn’t then the outgoing message # request may fail with a persistent error. class HttpEndpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a config used to authenticate message requests. # @!attribute [rw] google_oidc # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] # Optional. This authenticate method will apply Google OIDC tokens # signed by a GCP service account to the requests. # @!attribute [rw] oauth_token # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] # Optional. If specified, an [OAuth # token](https://developers.google.com/identity/protocols/OAuth2) will # be generated and attached as an `Authorization` header in the HTTP # request. # # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. class AuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a config used to authenticate with a Google OIDC token using # a GCP service account. Use this authentication method to invoke your # Cloud Run and Cloud Functions destinations or HTTP endpoints that # support Google OIDC. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the OIDC Token. # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow the # Pipeline to create OpenID tokens for authenticated requests. # @!attribute [rw] audience # @return [::String] # Optional. Audience to be used to generate the OIDC Token. The # audience claim identifies the recipient that the JWT is intended for. # If unspecified, the destination URI will be used. class OidcToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Contains information needed for generating an # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the [OAuth # token](https://developers.google.com/identity/protocols/OAuth2). # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline # to create OAuth2 tokens for authenticated requests. # @!attribute [rw] scope # @return [::String] # Optional. OAuth scope to be used for generating OAuth access token. # If not specified, "https://www.googleapis.com/auth/cloud-platform" # will be used. class OAuthToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#message_bus ⇒ ::String
Returns Optional. The resource name of the Message Bus to which events should
be published. The Message Bus resource should exist in the same project
as the Pipeline. Format:
projects/{project}/locations/{location}/messageBuses/{message_bus}
.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'proto_docs/google/cloud/eventarc/v1/pipeline.rb', line 179 class Destination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a network config to be used for destination resolution and # connectivity. # @!attribute [rw] network_attachment # @return [::String] # Required. Name of the NetworkAttachment that allows access to the # consumer VPC. Format: # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a HTTP endpoint destination. # @!attribute [rw] uri # @return [::String] # Required. The URI of the HTTP enpdoint. # # The value must be a RFC2396 URI string. # Examples: `https://svc.us-central1.p.local:8080/route`. # Only the HTTPS protocol is supported. # @!attribute [rw] message_binding_template # @return [::String] # Optional. The CEL expression used to modify how the destination-bound # HTTP request is constructed. # # If a binding expression is not specified here, the message # is treated as a CloudEvent and is mapped to the HTTP request according # to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this # representation, all fields except the `data` and `datacontenttype` # field on the message are mapped to HTTP request headers with a prefix # of `ce-`. # # To construct the HTTP request payload and the value of the content-type # HTTP header, the payload format is defined as follows: # 1) Use the output_payload_format_type on the Pipeline.Destination if it # is set, else: # 2) Use the input_payload_format_type on the Pipeline if it is set, # else: # 3) Treat the payload as opaque binary data. # # The `data` field of the message is converted to the payload format or # left as-is for case 3) and then attached as the payload of the HTTP # request. The `content-type` header on the HTTP request is set to the # payload format type or left empty for case 3). However, if a mediation # has updated the `datacontenttype` field on the message so that it is # not the same as the payload format type but it is still a prefix of the # payload format type, then the `content-type` header on the HTTP request # is set to this `datacontenttype` value. For example, if the # `datacontenttype` is "application/json" and the payload format type is # "application/json; charset=utf-8", then the `content-type` header on # the HTTP request is set to "application/json; charset=utf-8". # # If a non-empty binding expression is specified then this expression is # used to modify the default CloudEvent HTTP Protocol Binding Binary # Content representation. # The result of the CEL expression must be a map of key/value pairs # which is used as follows: # - If a map named `headers` exists on the result of the expression, # then its key/value pairs are directly mapped to the HTTP request # headers. The headers values are constructed from the corresponding # value type’s canonical representation. If the `headers` field doesn’t # exist then the resulting HTTP request will be the headers of the # CloudEvent HTTP Binding Binary Content Mode representation of the final # message. Note: If the specified binding expression, has updated the # `datacontenttype` field on the message so that it is not the same as # the payload format type but it is still a prefix of the payload format # type, then the `content-type` header in the `headers` map is set to # this `datacontenttype` value. # - If a field named `body` exists on the result of the expression then # its value is directly mapped to the body of the request. If the value # of the `body` field is of type bytes or string then it is used for # the HTTP request body as-is, with no conversion. If the body field is # of any other type then it is converted to a JSON string. If the body # field does not exist then the resulting payload of the HTTP request # will be data value of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message as described earlier. # - Any other fields in the resulting expression will be ignored. # # The CEL expression may access the incoming CloudEvent message in its # definition, as follows: # - The `data` field of the incoming CloudEvent message can be accessed # using the `message.data` value. Subfields of `message.data` may also be # accessed if an input_payload_format has been specified on the Pipeline. # - Each attribute of the incoming CloudEvent message can be accessed # using the `message.<key>` value, where <key> is replaced with the # name of the attribute. # - Existing headers can be accessed in the CEL expression using the # `headers` variable. The `headers` variable defines a map of key/value # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding # Binary Content Mode representation of the final message as described # earlier. For example, the following CEL expression can be used to # construct an HTTP request by adding an additional header to the HTTP # headers of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message and by overwriting the body of the # request: # # ``` # { # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), # "body": "new-body" # } # ``` # # Additionally, the following CEL extension functions are provided for # use in this CEL expression: # - 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, if the key's value is type # map both maps are merged else the value from the passed map is # used. # - denormalize: # map.denormalize() -> map # - Denormalizes a CEL map such that every value of type map or key # in the map is expanded to return a single level map. # - The resulting keys are "." separated indices of the map keys. # - For example: # { # "a": 1, # "b": { # "c": 2, # "d": 3 # } # "e": [4, 5] # } # .denormalize() # -> { # "a": 1, # "b.c": 2, # "b.d": 3, # "e.0": 4, # "e.1": 5 # } # - setField: # map.setField(key, value) -> message # - Sets the field of the message with the given key to the # given value. # - If the field is not present it will be added. # - If the field is present it will be overwritten. # - The key can be a dot separated path to set a field in a nested # message. # - Key must be of type string. # - Value may be any valid type. # - removeFields: # map.removeFields([key1, key2, ...]) -> message # - Removes the fields of the map with the given keys. # - The keys can be a dot separated path to remove a field in a # nested message. # - If a key is not found it will be ignored. # - Keys must be of type string. # - toMap: # [map1, map2, ...].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 Pipeline.Destination.output_payload_format # - This function is meant to be applied to the message.data field. # - If the destination payload format is not set, the function will # return the message data unchanged. # - toCloudEventJsonWithPayloadFormat: # message.toCloudEventJsonWithPayloadFormat() -> map # - Converts a message to the corresponding structure of JSON # format for CloudEvents # - This function applies toDestinationPayloadFormat() to the # message data. It also sets the corresponding datacontenttype of # the CloudEvent, as indicated by # Pipeline.Destination.output_payload_format. If no # output_payload_format is set it will use the existing # datacontenttype on the CloudEvent if present, else leave # datacontenttype absent. # - This function expects that the content of the message will # adhere to the standard CloudEvent format. If it doesn’t then this # function will fail. # - The result is a CEL map that corresponds to the JSON # representation of the CloudEvent. To convert that data to a JSON # string it can be chained with the toJsonString function. # # The Pipeline expects that the message it receives adheres to the # standard CloudEvent format. If it doesn’t then the outgoing message # request may fail with a persistent error. class HttpEndpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a config used to authenticate message requests. # @!attribute [rw] google_oidc # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] # Optional. This authenticate method will apply Google OIDC tokens # signed by a GCP service account to the requests. # @!attribute [rw] oauth_token # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] # Optional. If specified, an [OAuth # token](https://developers.google.com/identity/protocols/OAuth2) will # be generated and attached as an `Authorization` header in the HTTP # request. # # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. class AuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a config used to authenticate with a Google OIDC token using # a GCP service account. Use this authentication method to invoke your # Cloud Run and Cloud Functions destinations or HTTP endpoints that # support Google OIDC. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the OIDC Token. # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow the # Pipeline to create OpenID tokens for authenticated requests. # @!attribute [rw] audience # @return [::String] # Optional. Audience to be used to generate the OIDC Token. The # audience claim identifies the recipient that the JWT is intended for. # If unspecified, the destination URI will be used. class OidcToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Contains information needed for generating an # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the [OAuth # token](https://developers.google.com/identity/protocols/OAuth2). # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline # to create OAuth2 tokens for authenticated requests. # @!attribute [rw] scope # @return [::String] # Optional. OAuth scope to be used for generating OAuth access token. # If not specified, "https://www.googleapis.com/auth/cloud-platform" # will be used. class OAuthToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#network_config ⇒ ::Google::Cloud::Eventarc::V1::Pipeline::Destination::NetworkConfig
Returns Optional. Network config is used to configure how Pipeline resolves and connects to a destination.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'proto_docs/google/cloud/eventarc/v1/pipeline.rb', line 179 class Destination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a network config to be used for destination resolution and # connectivity. # @!attribute [rw] network_attachment # @return [::String] # Required. Name of the NetworkAttachment that allows access to the # consumer VPC. Format: # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a HTTP endpoint destination. # @!attribute [rw] uri # @return [::String] # Required. The URI of the HTTP enpdoint. # # The value must be a RFC2396 URI string. # Examples: `https://svc.us-central1.p.local:8080/route`. # Only the HTTPS protocol is supported. # @!attribute [rw] message_binding_template # @return [::String] # Optional. The CEL expression used to modify how the destination-bound # HTTP request is constructed. # # If a binding expression is not specified here, the message # is treated as a CloudEvent and is mapped to the HTTP request according # to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this # representation, all fields except the `data` and `datacontenttype` # field on the message are mapped to HTTP request headers with a prefix # of `ce-`. # # To construct the HTTP request payload and the value of the content-type # HTTP header, the payload format is defined as follows: # 1) Use the output_payload_format_type on the Pipeline.Destination if it # is set, else: # 2) Use the input_payload_format_type on the Pipeline if it is set, # else: # 3) Treat the payload as opaque binary data. # # The `data` field of the message is converted to the payload format or # left as-is for case 3) and then attached as the payload of the HTTP # request. The `content-type` header on the HTTP request is set to the # payload format type or left empty for case 3). However, if a mediation # has updated the `datacontenttype` field on the message so that it is # not the same as the payload format type but it is still a prefix of the # payload format type, then the `content-type` header on the HTTP request # is set to this `datacontenttype` value. For example, if the # `datacontenttype` is "application/json" and the payload format type is # "application/json; charset=utf-8", then the `content-type` header on # the HTTP request is set to "application/json; charset=utf-8". # # If a non-empty binding expression is specified then this expression is # used to modify the default CloudEvent HTTP Protocol Binding Binary # Content representation. # The result of the CEL expression must be a map of key/value pairs # which is used as follows: # - If a map named `headers` exists on the result of the expression, # then its key/value pairs are directly mapped to the HTTP request # headers. The headers values are constructed from the corresponding # value type’s canonical representation. If the `headers` field doesn’t # exist then the resulting HTTP request will be the headers of the # CloudEvent HTTP Binding Binary Content Mode representation of the final # message. Note: If the specified binding expression, has updated the # `datacontenttype` field on the message so that it is not the same as # the payload format type but it is still a prefix of the payload format # type, then the `content-type` header in the `headers` map is set to # this `datacontenttype` value. # - If a field named `body` exists on the result of the expression then # its value is directly mapped to the body of the request. If the value # of the `body` field is of type bytes or string then it is used for # the HTTP request body as-is, with no conversion. If the body field is # of any other type then it is converted to a JSON string. If the body # field does not exist then the resulting payload of the HTTP request # will be data value of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message as described earlier. # - Any other fields in the resulting expression will be ignored. # # The CEL expression may access the incoming CloudEvent message in its # definition, as follows: # - The `data` field of the incoming CloudEvent message can be accessed # using the `message.data` value. Subfields of `message.data` may also be # accessed if an input_payload_format has been specified on the Pipeline. # - Each attribute of the incoming CloudEvent message can be accessed # using the `message.<key>` value, where <key> is replaced with the # name of the attribute. # - Existing headers can be accessed in the CEL expression using the # `headers` variable. The `headers` variable defines a map of key/value # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding # Binary Content Mode representation of the final message as described # earlier. For example, the following CEL expression can be used to # construct an HTTP request by adding an additional header to the HTTP # headers of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message and by overwriting the body of the # request: # # ``` # { # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), # "body": "new-body" # } # ``` # # Additionally, the following CEL extension functions are provided for # use in this CEL expression: # - 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, if the key's value is type # map both maps are merged else the value from the passed map is # used. # - denormalize: # map.denormalize() -> map # - Denormalizes a CEL map such that every value of type map or key # in the map is expanded to return a single level map. # - The resulting keys are "." separated indices of the map keys. # - For example: # { # "a": 1, # "b": { # "c": 2, # "d": 3 # } # "e": [4, 5] # } # .denormalize() # -> { # "a": 1, # "b.c": 2, # "b.d": 3, # "e.0": 4, # "e.1": 5 # } # - setField: # map.setField(key, value) -> message # - Sets the field of the message with the given key to the # given value. # - If the field is not present it will be added. # - If the field is present it will be overwritten. # - The key can be a dot separated path to set a field in a nested # message. # - Key must be of type string. # - Value may be any valid type. # - removeFields: # map.removeFields([key1, key2, ...]) -> message # - Removes the fields of the map with the given keys. # - The keys can be a dot separated path to remove a field in a # nested message. # - If a key is not found it will be ignored. # - Keys must be of type string. # - toMap: # [map1, map2, ...].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 Pipeline.Destination.output_payload_format # - This function is meant to be applied to the message.data field. # - If the destination payload format is not set, the function will # return the message data unchanged. # - toCloudEventJsonWithPayloadFormat: # message.toCloudEventJsonWithPayloadFormat() -> map # - Converts a message to the corresponding structure of JSON # format for CloudEvents # - This function applies toDestinationPayloadFormat() to the # message data. It also sets the corresponding datacontenttype of # the CloudEvent, as indicated by # Pipeline.Destination.output_payload_format. If no # output_payload_format is set it will use the existing # datacontenttype on the CloudEvent if present, else leave # datacontenttype absent. # - This function expects that the content of the message will # adhere to the standard CloudEvent format. If it doesn’t then this # function will fail. # - The result is a CEL map that corresponds to the JSON # representation of the CloudEvent. To convert that data to a JSON # string it can be chained with the toJsonString function. # # The Pipeline expects that the message it receives adheres to the # standard CloudEvent format. If it doesn’t then the outgoing message # request may fail with a persistent error. class HttpEndpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a config used to authenticate message requests. # @!attribute [rw] google_oidc # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] # Optional. This authenticate method will apply Google OIDC tokens # signed by a GCP service account to the requests. # @!attribute [rw] oauth_token # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] # Optional. If specified, an [OAuth # token](https://developers.google.com/identity/protocols/OAuth2) will # be generated and attached as an `Authorization` header in the HTTP # request. # # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. class AuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a config used to authenticate with a Google OIDC token using # a GCP service account. Use this authentication method to invoke your # Cloud Run and Cloud Functions destinations or HTTP endpoints that # support Google OIDC. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the OIDC Token. # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow the # Pipeline to create OpenID tokens for authenticated requests. # @!attribute [rw] audience # @return [::String] # Optional. Audience to be used to generate the OIDC Token. The # audience claim identifies the recipient that the JWT is intended for. # If unspecified, the destination URI will be used. class OidcToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Contains information needed for generating an # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the [OAuth # token](https://developers.google.com/identity/protocols/OAuth2). # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline # to create OAuth2 tokens for authenticated requests. # @!attribute [rw] scope # @return [::String] # Optional. OAuth scope to be used for generating OAuth access token. # If not specified, "https://www.googleapis.com/auth/cloud-platform" # will be used. class OAuthToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#output_payload_format ⇒ ::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat
Returns Optional. The message format before it is delivered to the destination. If not set, the message will be delivered in the format it was originally delivered to the Pipeline. This field can only be set if Pipeline.input_payload_format is also set.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'proto_docs/google/cloud/eventarc/v1/pipeline.rb', line 179 class Destination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a network config to be used for destination resolution and # connectivity. # @!attribute [rw] network_attachment # @return [::String] # Required. Name of the NetworkAttachment that allows access to the # consumer VPC. Format: # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a HTTP endpoint destination. # @!attribute [rw] uri # @return [::String] # Required. The URI of the HTTP enpdoint. # # The value must be a RFC2396 URI string. # Examples: `https://svc.us-central1.p.local:8080/route`. # Only the HTTPS protocol is supported. # @!attribute [rw] message_binding_template # @return [::String] # Optional. The CEL expression used to modify how the destination-bound # HTTP request is constructed. # # If a binding expression is not specified here, the message # is treated as a CloudEvent and is mapped to the HTTP request according # to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this # representation, all fields except the `data` and `datacontenttype` # field on the message are mapped to HTTP request headers with a prefix # of `ce-`. # # To construct the HTTP request payload and the value of the content-type # HTTP header, the payload format is defined as follows: # 1) Use the output_payload_format_type on the Pipeline.Destination if it # is set, else: # 2) Use the input_payload_format_type on the Pipeline if it is set, # else: # 3) Treat the payload as opaque binary data. # # The `data` field of the message is converted to the payload format or # left as-is for case 3) and then attached as the payload of the HTTP # request. The `content-type` header on the HTTP request is set to the # payload format type or left empty for case 3). However, if a mediation # has updated the `datacontenttype` field on the message so that it is # not the same as the payload format type but it is still a prefix of the # payload format type, then the `content-type` header on the HTTP request # is set to this `datacontenttype` value. For example, if the # `datacontenttype` is "application/json" and the payload format type is # "application/json; charset=utf-8", then the `content-type` header on # the HTTP request is set to "application/json; charset=utf-8". # # If a non-empty binding expression is specified then this expression is # used to modify the default CloudEvent HTTP Protocol Binding Binary # Content representation. # The result of the CEL expression must be a map of key/value pairs # which is used as follows: # - If a map named `headers` exists on the result of the expression, # then its key/value pairs are directly mapped to the HTTP request # headers. The headers values are constructed from the corresponding # value type’s canonical representation. If the `headers` field doesn’t # exist then the resulting HTTP request will be the headers of the # CloudEvent HTTP Binding Binary Content Mode representation of the final # message. Note: If the specified binding expression, has updated the # `datacontenttype` field on the message so that it is not the same as # the payload format type but it is still a prefix of the payload format # type, then the `content-type` header in the `headers` map is set to # this `datacontenttype` value. # - If a field named `body` exists on the result of the expression then # its value is directly mapped to the body of the request. If the value # of the `body` field is of type bytes or string then it is used for # the HTTP request body as-is, with no conversion. If the body field is # of any other type then it is converted to a JSON string. If the body # field does not exist then the resulting payload of the HTTP request # will be data value of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message as described earlier. # - Any other fields in the resulting expression will be ignored. # # The CEL expression may access the incoming CloudEvent message in its # definition, as follows: # - The `data` field of the incoming CloudEvent message can be accessed # using the `message.data` value. Subfields of `message.data` may also be # accessed if an input_payload_format has been specified on the Pipeline. # - Each attribute of the incoming CloudEvent message can be accessed # using the `message.<key>` value, where <key> is replaced with the # name of the attribute. # - Existing headers can be accessed in the CEL expression using the # `headers` variable. The `headers` variable defines a map of key/value # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding # Binary Content Mode representation of the final message as described # earlier. For example, the following CEL expression can be used to # construct an HTTP request by adding an additional header to the HTTP # headers of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message and by overwriting the body of the # request: # # ``` # { # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), # "body": "new-body" # } # ``` # # Additionally, the following CEL extension functions are provided for # use in this CEL expression: # - 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, if the key's value is type # map both maps are merged else the value from the passed map is # used. # - denormalize: # map.denormalize() -> map # - Denormalizes a CEL map such that every value of type map or key # in the map is expanded to return a single level map. # - The resulting keys are "." separated indices of the map keys. # - For example: # { # "a": 1, # "b": { # "c": 2, # "d": 3 # } # "e": [4, 5] # } # .denormalize() # -> { # "a": 1, # "b.c": 2, # "b.d": 3, # "e.0": 4, # "e.1": 5 # } # - setField: # map.setField(key, value) -> message # - Sets the field of the message with the given key to the # given value. # - If the field is not present it will be added. # - If the field is present it will be overwritten. # - The key can be a dot separated path to set a field in a nested # message. # - Key must be of type string. # - Value may be any valid type. # - removeFields: # map.removeFields([key1, key2, ...]) -> message # - Removes the fields of the map with the given keys. # - The keys can be a dot separated path to remove a field in a # nested message. # - If a key is not found it will be ignored. # - Keys must be of type string. # - toMap: # [map1, map2, ...].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 Pipeline.Destination.output_payload_format # - This function is meant to be applied to the message.data field. # - If the destination payload format is not set, the function will # return the message data unchanged. # - toCloudEventJsonWithPayloadFormat: # message.toCloudEventJsonWithPayloadFormat() -> map # - Converts a message to the corresponding structure of JSON # format for CloudEvents # - This function applies toDestinationPayloadFormat() to the # message data. It also sets the corresponding datacontenttype of # the CloudEvent, as indicated by # Pipeline.Destination.output_payload_format. If no # output_payload_format is set it will use the existing # datacontenttype on the CloudEvent if present, else leave # datacontenttype absent. # - This function expects that the content of the message will # adhere to the standard CloudEvent format. If it doesn’t then this # function will fail. # - The result is a CEL map that corresponds to the JSON # representation of the CloudEvent. To convert that data to a JSON # string it can be chained with the toJsonString function. # # The Pipeline expects that the message it receives adheres to the # standard CloudEvent format. If it doesn’t then the outgoing message # request may fail with a persistent error. class HttpEndpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a config used to authenticate message requests. # @!attribute [rw] google_oidc # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] # Optional. This authenticate method will apply Google OIDC tokens # signed by a GCP service account to the requests. # @!attribute [rw] oauth_token # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] # Optional. If specified, an [OAuth # token](https://developers.google.com/identity/protocols/OAuth2) will # be generated and attached as an `Authorization` header in the HTTP # request. # # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. class AuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a config used to authenticate with a Google OIDC token using # a GCP service account. Use this authentication method to invoke your # Cloud Run and Cloud Functions destinations or HTTP endpoints that # support Google OIDC. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the OIDC Token. # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow the # Pipeline to create OpenID tokens for authenticated requests. # @!attribute [rw] audience # @return [::String] # Optional. Audience to be used to generate the OIDC Token. The # audience claim identifies the recipient that the JWT is intended for. # If unspecified, the destination URI will be used. class OidcToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Contains information needed for generating an # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the [OAuth # token](https://developers.google.com/identity/protocols/OAuth2). # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline # to create OAuth2 tokens for authenticated requests. # @!attribute [rw] scope # @return [::String] # Optional. OAuth scope to be used for generating OAuth access token. # If not specified, "https://www.googleapis.com/auth/cloud-platform" # will be used. class OAuthToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#topic ⇒ ::String
Returns Optional. The resource name of the Pub/Sub topic to which events should
be published. Format:
projects/{project}/locations/{location}/topics/{topic}
.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'proto_docs/google/cloud/eventarc/v1/pipeline.rb', line 179 class Destination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a network config to be used for destination resolution and # connectivity. # @!attribute [rw] network_attachment # @return [::String] # Required. Name of the NetworkAttachment that allows access to the # consumer VPC. Format: # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a HTTP endpoint destination. # @!attribute [rw] uri # @return [::String] # Required. The URI of the HTTP enpdoint. # # The value must be a RFC2396 URI string. # Examples: `https://svc.us-central1.p.local:8080/route`. # Only the HTTPS protocol is supported. # @!attribute [rw] message_binding_template # @return [::String] # Optional. The CEL expression used to modify how the destination-bound # HTTP request is constructed. # # If a binding expression is not specified here, the message # is treated as a CloudEvent and is mapped to the HTTP request according # to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this # representation, all fields except the `data` and `datacontenttype` # field on the message are mapped to HTTP request headers with a prefix # of `ce-`. # # To construct the HTTP request payload and the value of the content-type # HTTP header, the payload format is defined as follows: # 1) Use the output_payload_format_type on the Pipeline.Destination if it # is set, else: # 2) Use the input_payload_format_type on the Pipeline if it is set, # else: # 3) Treat the payload as opaque binary data. # # The `data` field of the message is converted to the payload format or # left as-is for case 3) and then attached as the payload of the HTTP # request. The `content-type` header on the HTTP request is set to the # payload format type or left empty for case 3). However, if a mediation # has updated the `datacontenttype` field on the message so that it is # not the same as the payload format type but it is still a prefix of the # payload format type, then the `content-type` header on the HTTP request # is set to this `datacontenttype` value. For example, if the # `datacontenttype` is "application/json" and the payload format type is # "application/json; charset=utf-8", then the `content-type` header on # the HTTP request is set to "application/json; charset=utf-8". # # If a non-empty binding expression is specified then this expression is # used to modify the default CloudEvent HTTP Protocol Binding Binary # Content representation. # The result of the CEL expression must be a map of key/value pairs # which is used as follows: # - If a map named `headers` exists on the result of the expression, # then its key/value pairs are directly mapped to the HTTP request # headers. The headers values are constructed from the corresponding # value type’s canonical representation. If the `headers` field doesn’t # exist then the resulting HTTP request will be the headers of the # CloudEvent HTTP Binding Binary Content Mode representation of the final # message. Note: If the specified binding expression, has updated the # `datacontenttype` field on the message so that it is not the same as # the payload format type but it is still a prefix of the payload format # type, then the `content-type` header in the `headers` map is set to # this `datacontenttype` value. # - If a field named `body` exists on the result of the expression then # its value is directly mapped to the body of the request. If the value # of the `body` field is of type bytes or string then it is used for # the HTTP request body as-is, with no conversion. If the body field is # of any other type then it is converted to a JSON string. If the body # field does not exist then the resulting payload of the HTTP request # will be data value of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message as described earlier. # - Any other fields in the resulting expression will be ignored. # # The CEL expression may access the incoming CloudEvent message in its # definition, as follows: # - The `data` field of the incoming CloudEvent message can be accessed # using the `message.data` value. Subfields of `message.data` may also be # accessed if an input_payload_format has been specified on the Pipeline. # - Each attribute of the incoming CloudEvent message can be accessed # using the `message.<key>` value, where <key> is replaced with the # name of the attribute. # - Existing headers can be accessed in the CEL expression using the # `headers` variable. The `headers` variable defines a map of key/value # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding # Binary Content Mode representation of the final message as described # earlier. For example, the following CEL expression can be used to # construct an HTTP request by adding an additional header to the HTTP # headers of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message and by overwriting the body of the # request: # # ``` # { # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), # "body": "new-body" # } # ``` # # Additionally, the following CEL extension functions are provided for # use in this CEL expression: # - 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, if the key's value is type # map both maps are merged else the value from the passed map is # used. # - denormalize: # map.denormalize() -> map # - Denormalizes a CEL map such that every value of type map or key # in the map is expanded to return a single level map. # - The resulting keys are "." separated indices of the map keys. # - For example: # { # "a": 1, # "b": { # "c": 2, # "d": 3 # } # "e": [4, 5] # } # .denormalize() # -> { # "a": 1, # "b.c": 2, # "b.d": 3, # "e.0": 4, # "e.1": 5 # } # - setField: # map.setField(key, value) -> message # - Sets the field of the message with the given key to the # given value. # - If the field is not present it will be added. # - If the field is present it will be overwritten. # - The key can be a dot separated path to set a field in a nested # message. # - Key must be of type string. # - Value may be any valid type. # - removeFields: # map.removeFields([key1, key2, ...]) -> message # - Removes the fields of the map with the given keys. # - The keys can be a dot separated path to remove a field in a # nested message. # - If a key is not found it will be ignored. # - Keys must be of type string. # - toMap: # [map1, map2, ...].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 Pipeline.Destination.output_payload_format # - This function is meant to be applied to the message.data field. # - If the destination payload format is not set, the function will # return the message data unchanged. # - toCloudEventJsonWithPayloadFormat: # message.toCloudEventJsonWithPayloadFormat() -> map # - Converts a message to the corresponding structure of JSON # format for CloudEvents # - This function applies toDestinationPayloadFormat() to the # message data. It also sets the corresponding datacontenttype of # the CloudEvent, as indicated by # Pipeline.Destination.output_payload_format. If no # output_payload_format is set it will use the existing # datacontenttype on the CloudEvent if present, else leave # datacontenttype absent. # - This function expects that the content of the message will # adhere to the standard CloudEvent format. If it doesn’t then this # function will fail. # - The result is a CEL map that corresponds to the JSON # representation of the CloudEvent. To convert that data to a JSON # string it can be chained with the toJsonString function. # # The Pipeline expects that the message it receives adheres to the # standard CloudEvent format. If it doesn’t then the outgoing message # request may fail with a persistent error. class HttpEndpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a config used to authenticate message requests. # @!attribute [rw] google_oidc # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] # Optional. This authenticate method will apply Google OIDC tokens # signed by a GCP service account to the requests. # @!attribute [rw] oauth_token # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] # Optional. If specified, an [OAuth # token](https://developers.google.com/identity/protocols/OAuth2) will # be generated and attached as an `Authorization` header in the HTTP # request. # # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. class AuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a config used to authenticate with a Google OIDC token using # a GCP service account. Use this authentication method to invoke your # Cloud Run and Cloud Functions destinations or HTTP endpoints that # support Google OIDC. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the OIDC Token. # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow the # Pipeline to create OpenID tokens for authenticated requests. # @!attribute [rw] audience # @return [::String] # Optional. Audience to be used to generate the OIDC Token. The # audience claim identifies the recipient that the JWT is intended for. # If unspecified, the destination URI will be used. class OidcToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Contains information needed for generating an # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the [OAuth # token](https://developers.google.com/identity/protocols/OAuth2). # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline # to create OAuth2 tokens for authenticated requests. # @!attribute [rw] scope # @return [::String] # Optional. OAuth scope to be used for generating OAuth access token. # If not specified, "https://www.googleapis.com/auth/cloud-platform" # will be used. class OAuthToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#workflow ⇒ ::String
Returns Optional. The resource name of the Workflow whose Executions are
triggered by the events. The Workflow resource should be deployed in
the same project as the Pipeline. Format:
projects/{project}/locations/{location}/workflows/{workflow}
.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'proto_docs/google/cloud/eventarc/v1/pipeline.rb', line 179 class Destination include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a network config to be used for destination resolution and # connectivity. # @!attribute [rw] network_attachment # @return [::String] # Required. Name of the NetworkAttachment that allows access to the # consumer VPC. Format: # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` class NetworkConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a HTTP endpoint destination. # @!attribute [rw] uri # @return [::String] # Required. The URI of the HTTP enpdoint. # # The value must be a RFC2396 URI string. # Examples: `https://svc.us-central1.p.local:8080/route`. # Only the HTTPS protocol is supported. # @!attribute [rw] message_binding_template # @return [::String] # Optional. The CEL expression used to modify how the destination-bound # HTTP request is constructed. # # If a binding expression is not specified here, the message # is treated as a CloudEvent and is mapped to the HTTP request according # to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this # representation, all fields except the `data` and `datacontenttype` # field on the message are mapped to HTTP request headers with a prefix # of `ce-`. # # To construct the HTTP request payload and the value of the content-type # HTTP header, the payload format is defined as follows: # 1) Use the output_payload_format_type on the Pipeline.Destination if it # is set, else: # 2) Use the input_payload_format_type on the Pipeline if it is set, # else: # 3) Treat the payload as opaque binary data. # # The `data` field of the message is converted to the payload format or # left as-is for case 3) and then attached as the payload of the HTTP # request. The `content-type` header on the HTTP request is set to the # payload format type or left empty for case 3). However, if a mediation # has updated the `datacontenttype` field on the message so that it is # not the same as the payload format type but it is still a prefix of the # payload format type, then the `content-type` header on the HTTP request # is set to this `datacontenttype` value. For example, if the # `datacontenttype` is "application/json" and the payload format type is # "application/json; charset=utf-8", then the `content-type` header on # the HTTP request is set to "application/json; charset=utf-8". # # If a non-empty binding expression is specified then this expression is # used to modify the default CloudEvent HTTP Protocol Binding Binary # Content representation. # The result of the CEL expression must be a map of key/value pairs # which is used as follows: # - If a map named `headers` exists on the result of the expression, # then its key/value pairs are directly mapped to the HTTP request # headers. The headers values are constructed from the corresponding # value type’s canonical representation. If the `headers` field doesn’t # exist then the resulting HTTP request will be the headers of the # CloudEvent HTTP Binding Binary Content Mode representation of the final # message. Note: If the specified binding expression, has updated the # `datacontenttype` field on the message so that it is not the same as # the payload format type but it is still a prefix of the payload format # type, then the `content-type` header in the `headers` map is set to # this `datacontenttype` value. # - If a field named `body` exists on the result of the expression then # its value is directly mapped to the body of the request. If the value # of the `body` field is of type bytes or string then it is used for # the HTTP request body as-is, with no conversion. If the body field is # of any other type then it is converted to a JSON string. If the body # field does not exist then the resulting payload of the HTTP request # will be data value of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message as described earlier. # - Any other fields in the resulting expression will be ignored. # # The CEL expression may access the incoming CloudEvent message in its # definition, as follows: # - The `data` field of the incoming CloudEvent message can be accessed # using the `message.data` value. Subfields of `message.data` may also be # accessed if an input_payload_format has been specified on the Pipeline. # - Each attribute of the incoming CloudEvent message can be accessed # using the `message.<key>` value, where <key> is replaced with the # name of the attribute. # - Existing headers can be accessed in the CEL expression using the # `headers` variable. The `headers` variable defines a map of key/value # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding # Binary Content Mode representation of the final message as described # earlier. For example, the following CEL expression can be used to # construct an HTTP request by adding an additional header to the HTTP # headers of the CloudEvent HTTP Binding Binary Content Mode # representation of the final message and by overwriting the body of the # request: # # ``` # { # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), # "body": "new-body" # } # ``` # # Additionally, the following CEL extension functions are provided for # use in this CEL expression: # - 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, if the key's value is type # map both maps are merged else the value from the passed map is # used. # - denormalize: # map.denormalize() -> map # - Denormalizes a CEL map such that every value of type map or key # in the map is expanded to return a single level map. # - The resulting keys are "." separated indices of the map keys. # - For example: # { # "a": 1, # "b": { # "c": 2, # "d": 3 # } # "e": [4, 5] # } # .denormalize() # -> { # "a": 1, # "b.c": 2, # "b.d": 3, # "e.0": 4, # "e.1": 5 # } # - setField: # map.setField(key, value) -> message # - Sets the field of the message with the given key to the # given value. # - If the field is not present it will be added. # - If the field is present it will be overwritten. # - The key can be a dot separated path to set a field in a nested # message. # - Key must be of type string. # - Value may be any valid type. # - removeFields: # map.removeFields([key1, key2, ...]) -> message # - Removes the fields of the map with the given keys. # - The keys can be a dot separated path to remove a field in a # nested message. # - If a key is not found it will be ignored. # - Keys must be of type string. # - toMap: # [map1, map2, ...].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 Pipeline.Destination.output_payload_format # - This function is meant to be applied to the message.data field. # - If the destination payload format is not set, the function will # return the message data unchanged. # - toCloudEventJsonWithPayloadFormat: # message.toCloudEventJsonWithPayloadFormat() -> map # - Converts a message to the corresponding structure of JSON # format for CloudEvents # - This function applies toDestinationPayloadFormat() to the # message data. It also sets the corresponding datacontenttype of # the CloudEvent, as indicated by # Pipeline.Destination.output_payload_format. If no # output_payload_format is set it will use the existing # datacontenttype on the CloudEvent if present, else leave # datacontenttype absent. # - This function expects that the content of the message will # adhere to the standard CloudEvent format. If it doesn’t then this # function will fail. # - The result is a CEL map that corresponds to the JSON # representation of the CloudEvent. To convert that data to a JSON # string it can be chained with the toJsonString function. # # The Pipeline expects that the message it receives adheres to the # standard CloudEvent format. If it doesn’t then the outgoing message # request may fail with a persistent error. class HttpEndpoint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents a config used to authenticate message requests. # @!attribute [rw] google_oidc # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] # Optional. This authenticate method will apply Google OIDC tokens # signed by a GCP service account to the requests. # @!attribute [rw] oauth_token # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] # Optional. If specified, an [OAuth # token](https://developers.google.com/identity/protocols/OAuth2) will # be generated and attached as an `Authorization` header in the HTTP # request. # # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. class AuthenticationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents a config used to authenticate with a Google OIDC token using # a GCP service account. Use this authentication method to invoke your # Cloud Run and Cloud Functions destinations or HTTP endpoints that # support Google OIDC. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the OIDC Token. # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow the # Pipeline to create OpenID tokens for authenticated requests. # @!attribute [rw] audience # @return [::String] # Optional. Audience to be used to generate the OIDC Token. The # audience claim identifies the recipient that the JWT is intended for. # If unspecified, the destination URI will be used. class OidcToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Contains information needed for generating an # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). # This type of authorization should generally only be used when calling # Google APIs hosted on *.googleapis.com. # @!attribute [rw] service_account # @return [::String] # Required. Service account email used to generate the [OAuth # token](https://developers.google.com/identity/protocols/OAuth2). # The principal who calls this API must have # iam.serviceAccounts.actAs permission in the service account. See # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common # for more information. Eventarc service agents must have # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline # to create OAuth2 tokens for authenticated requests. # @!attribute [rw] scope # @return [::String] # Optional. OAuth scope to be used for generating OAuth access token. # If not specified, "https://www.googleapis.com/auth/cloud-platform" # will be used. class OAuthToken include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |