You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/r/cloudfunctions_function.html.markdown
+19
Original file line number
Diff line number
Diff line change
@@ -64,17 +64,36 @@ The following arguments are supported:
64
64
65
65
*`entry_point` - (Optional) Name of a JavaScript function that will be executed when the Google Cloud Function is triggered.
66
66
67
+
*`event_trigger` - (Optional) A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with `trigger_http`.
68
+
67
69
*`trigger_http` - (Optional) Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as `https_trigger_url`. Cannot be used with `trigger_bucket` and `trigger_topic`.
68
70
69
71
*`trigger_bucket` - (Optional) Google Cloud Storage bucket name. Every change in files in this bucket will trigger function execution. Cannot be used with `trigger_http` and `trigger_topic`.
72
+
Deprecated. Use `event_trigger` instead.
70
73
71
74
*`trigger_topic` - (Optional) Name of Pub/Sub topic. Every message published in this topic will trigger function execution with message contents passed as input data. Cannot be used with `trigger_http` and `trigger_bucket`.
75
+
Deprecated. Use `event_trigger` instead.
72
76
73
77
*`labels` - (Optional) A set of key/value label pairs to assign to the function.
74
78
75
79
*`environment_variables` - (Optional) A set of key/value environment variable pairs to assign to the function.
76
80
77
81
*`retry_on_failure` - (Optional) Whether the function should be retried on failure. This only applies to bucket and topic triggers, not HTTPS triggers.
82
+
Deprecated. Use `event_trigger.failure_policy.retry` instead.
83
+
84
+
The `event_trigger` block supports:
85
+
86
+
*`event_type` - (Required) The type of event to observe. For example: `"providers/cloud.storage/eventTypes/object.change"`
87
+
and `"providers/cloud.pubsub/eventTypes/topic.publish"`. See the documentation on [calling Cloud Functions](https://cloud.google.com/functions/docs/calling/)
88
+
for a full reference. Only Cloud Storage and Cloud Pub/Sub triggers are supported at this time.
89
+
90
+
*`resource` - (Required) Required. The name of the resource from which to observe events, for example, `"myBucket"`
91
+
92
+
*`failure_policy` - (Optional) Specifies policy for failed executions. Structure is documented below.
93
+
94
+
The `failure_policy` block supports:
95
+
96
+
*`retry` - (Required) Whether the function should be retried on failure. Defaults to `false`.
0 commit comments