blob: eb75f027abe383a2721c37d8cfa1776afaa23bda [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="cloudfunctions_v1beta2.html">Cloud Functions API</a> . <a href="cloudfunctions_v1beta2.projects.html">projects</a> . <a href="cloudfunctions_v1beta2.projects.locations.html">locations</a> . <a href="cloudfunctions_v1beta2.projects.locations.functions.html">functions</a></h1>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#call">call(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Synchronously invokes a deployed Cloud Function. To be used for testing</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(location, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040082<p class="firstline">Creates a new function. If a function with the given name already exists in</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Deletes a function with the given name from the specified project. If the</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#generateDownloadUrl">generateDownloadUrl(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns a signed URL for downloading deployed function source code.</p>
89<p class="toc_element">
90 <code><a href="#generateUploadUrl">generateUploadUrl(parent, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Returns a signed URL for uploading a function source code.</p>
92<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
94<p class="firstline">Returns a function with the given name from the requested project.</p>
95<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(location, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040097<p class="firstline">Returns a list of functions that belong to the requested project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#update">update(name, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400103<p class="firstline">Updates existing function.</p>
104<h3>Method Details</h3>
105<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 <code class="details" id="call">call(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107 <pre>Synchronously invokes a deployed Cloud Function. To be used for testing
108purposes as very limited traffic is allowed. For more information on
109the actual limits refer to [API Calls](
110https://cloud.google.com/functions/quotas#rate_limits).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400111
112Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 name: string, Required. The name of the function to be called. (required)
114 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400115 The object takes the form of:
116
117{ # Request for the `CallFunction` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700118 &quot;data&quot;: &quot;A String&quot;, # Required. Input to be passed to the function.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400119 }
120
121 x__xgafv: string, V1 error format.
122 Allowed values
123 1 - v1 error format
124 2 - v2 error format
125
126Returns:
127 An object of the form:
128
129 { # Response of `CallFunction` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 &quot;result&quot;: &quot;A String&quot;, # Result populated for successful execution of synchronous function. Will
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400131 # not be populated if function does not return a result through context.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700132 &quot;executionId&quot;: &quot;A String&quot;, # Execution id of function invocation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 &quot;error&quot;: &quot;A String&quot;, # Either system or user-function generated error. Set if execution
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400134 # was not successful.
135 }</pre>
136</div>
137
138<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700139 <code class="details" id="create">create(location, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400140 <pre>Creates a new function. If a function with the given name already exists in
141the specified project, the long running operation will return
142`ALREADY_EXISTS` error.
143
144Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 location: string, Required. The project and location in which the function should be created, specified
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400146in the format `projects/*/locations/*` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400148 The object takes the form of:
149
150{ # Describes a Cloud Function that contains user computation executed in
151 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700152 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
153 # can be terminated if the function is not completed at the end of the
154 # timeout period. Defaults to 60 seconds.
155 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
156 # function, optional when updating an existing function. For a complete
157 # list of possible choices, see the
158 # [`gcloud` command
159 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700160 &quot;eventTrigger&quot;: { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
161 # service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700162 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
163 # If empty, then defaults to ignoring failures (i.e. not retrying them).
164 &quot;retry&quot;: { # Describes the retry policy in case of function&#x27;s execution failure. # If specified, then the function will be retried in case of a failure.
165 # A function execution will be retried on any failure.
166 # A failed execution will be retried up to 7 days with an exponential backoff
167 # (capped at 10 seconds).
168 # Retried execution is charged as any other execution.
169 },
170 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700171 &quot;resource&quot;: &quot;A String&quot;, # Which instance of the source&#x27;s service should send events. E.g. for Pub/Sub
172 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
173 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
174 # that only supports one instance per-project, this should be the name of the
175 # project (`projects/*`)
176 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
177 #
178 # If no string is provided, the default service implementing the API will
179 # be used. For example, `storage.googleapis.com` is the default for all
180 # event types in the `google.storage` namespace.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700181 &quot;eventType&quot;: &quot;A String&quot;, # `event_type` names contain the service that is sending an event and the
182 # kind of event that was fired. Must be of the form
183 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
184 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
185 #
186 # Handle an object changing in Google Cloud Storage:
187 # `providers/cloud.storage/eventTypes/object.change`
188 #
189 # Handle a write to the Firebase Realtime Database:
190 # `providers/google.firebase.database/eventTypes/ref.write`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700191 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700192 &quot;serviceAccount&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
193 # `{project_id}@appspot.gserviceaccount.com`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700194 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
195 # executed. Defaults to the resource name suffix, if not specified. For
196 # backward compatibility, if function with given name is not found, then the
197 # system will try to use function named &quot;function&quot;.
198 # For Node.js this is name of a function exported by the module specified
199 # in `source_location`.
200 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
201 &quot;sourceRepositoryUrl&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
202 # There are supported Cloud Source Repository URLs in the following
203 # formats:
204 #
205 # To refer to a specific commit:
206 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
207 # To refer to a moveable alias (branch):
208 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
209 # In particular, to refer to HEAD use `master` moveable alias.
210 # To refer to a specific fixed alias (tag):
211 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
212 #
213 # You may omit `paths/*` if you want to use the main directory.
214 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
215 &quot;a_key&quot;: &quot;A String&quot;,
216 },
217 &quot;labels&quot;: { # Labels associated with this Cloud Function.
218 &quot;a_key&quot;: &quot;A String&quot;,
219 },
220 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700221 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
222 # be either the fully-qualified URI, or the short name of the network
223 # connector resource. The format of this field is
224 # `projects/*/locations/*/connectors/*`
225 #
226 # This field is mutually exclusive with `network` field and will eventually
227 # replace it.
228 #
229 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
230 # more information on connecting Cloud projects.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700231 &quot;latestOperation&quot;: &quot;A String&quot;, # Output only. Name of the most recent operation modifying the function. If
232 # the function status is `DEPLOYING` or `DELETING`, then it points to the
233 # active operation.
234 &quot;httpsTrigger&quot;: { # Describes HTTPSTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
235 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
236 },
237 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
238 # archive which contains the function.
239 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
240 # by google.cloud.functions.v1beta2.GenerateUploadUrl
241 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
242 # given time.
243 &quot;sourceRepository&quot;: { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
244 &quot;tag&quot;: &quot;A String&quot;, # The name of the tag that captures the state of the repository from
245 # which the function should be fetched.
246 &quot;repositoryUrl&quot;: &quot;A String&quot;, # URL to the hosted repository where the function is defined. Only paths in
247 # https://source.developers.google.com domain are supported. The path should
248 # contain the name of the repository.
249 &quot;deployedRevision&quot;: &quot;A String&quot;, # Output only. The id of the revision that was resolved at the moment of
250 # function creation or update. For example when a user deployed from a
251 # branch, it will be the revision id of the latest change on this branch at
252 # that time. If user deployed from revision then this value will be always
253 # equal to the revision specified by the user.
254 &quot;revision&quot;: &quot;A String&quot;, # The id of the revision that captures the state of the repository from
255 # which the function should be fetched.
256 &quot;sourcePath&quot;: &quot;A String&quot;, # The path within the repository where the function is defined. The path
257 # should point to the directory where Cloud Functions files are located. Use
258 # &quot;/&quot; if the function is defined directly in the root directory of a
259 # repository.
260 &quot;branch&quot;: &quot;A String&quot;, # The name of the branch from which the function should be fetched.
261 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 # either the fully-qualified URI, or the short name of the network resource.
264 # If the short network name is used, the network must belong to the same
265 # project. Otherwise, it must belong to a project within the same
266 # organization. The format of this field is either
267 # `projects/{project}/global/networks/{network}` or `{network}`, where
268 # {project} is a project id where the network is defined, and {network} is
269 # the short name of the network.
270 #
271 # This field is mutually exclusive with `vpc_connector` and will be replaced
272 # by it.
273 #
274 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
275 # more information on connecting Cloud projects.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700276 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
277 # results in a new version of a function being created.
278 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
279 # Defaults to 256MB.
280 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
281 # globally and match pattern `projects/*/locations/*/functions/*`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400282}
283
284 x__xgafv: string, V1 error format.
285 Allowed values
286 1 - v1 error format
287 2 - v2 error format
288
289Returns:
290 An object of the form:
291
292 { # This resource represents a long-running operation that is the result of a
293 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400295 # method returns no data on success, such as `Delete`, the response is
296 # `google.protobuf.Empty`. If the original method is standard
297 # `Get`/`Create`/`Update`, the response should be the resource. For other
298 # methods, the response should have the type `XxxResponse`, where `Xxx`
299 # is the original method name. For example, if the original method name
300 # is `TakeSnapshot()`, the inferred response type is
301 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400303 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700304 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
305 # contains progress information and common metadata such as create time.
306 # Some services might not provide such metadata. Any method that returns a
307 # long-running operation should document the metadata type, if any.
308 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
309 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400311 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700313 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
314 # If `true`, the operation is completed, and either `error` or `response` is
315 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
317 # different programming environments, including REST APIs and RPC APIs. It is
318 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
319 # three pieces of data: error code, error message, and error details.
320 #
321 # You can find out more about this error model and how to work with it in the
322 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700323 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
325 # message types for APIs to use.
326 {
327 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
328 },
329 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700330 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
331 # user-facing error message should be localized and sent in the
332 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400334 }</pre>
335</div>
336
337<div class="method">
338 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
339 <pre>Deletes a function with the given name from the specified project. If the
340given function is used by some trigger, the trigger will be updated to
341remove this function.
342
343Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700344 name: string, Required. The name of the function which should be deleted. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400345 x__xgafv: string, V1 error format.
346 Allowed values
347 1 - v1 error format
348 2 - v2 error format
349
350Returns:
351 An object of the form:
352
353 { # This resource represents a long-running operation that is the result of a
354 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700355 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400356 # method returns no data on success, such as `Delete`, the response is
357 # `google.protobuf.Empty`. If the original method is standard
358 # `Get`/`Create`/`Update`, the response should be the resource. For other
359 # methods, the response should have the type `XxxResponse`, where `Xxx`
360 # is the original method name. For example, if the original method name
361 # is `TakeSnapshot()`, the inferred response type is
362 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700363 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400364 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700365 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
366 # contains progress information and common metadata such as create time.
367 # Some services might not provide such metadata. Any method that returns a
368 # long-running operation should document the metadata type, if any.
369 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
370 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700371 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400372 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700374 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
375 # If `true`, the operation is completed, and either `error` or `response` is
376 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
378 # different programming environments, including REST APIs and RPC APIs. It is
379 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
380 # three pieces of data: error code, error message, and error details.
381 #
382 # You can find out more about this error model and how to work with it in the
383 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700384 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700385 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
386 # message types for APIs to use.
387 {
388 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
389 },
390 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700391 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
392 # user-facing error message should be localized and sent in the
393 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 }</pre>
396</div>
397
398<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700399 <code class="details" id="generateDownloadUrl">generateDownloadUrl(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700400 <pre>Returns a signed URL for downloading deployed function source code.
401The URL is only valid for a limited period and should be used within
402minutes after generation.
403For more information about the signed URL usage see:
404https://cloud.google.com/storage/docs/access-control/signed-urls
405
406Args:
407 name: string, The name of function for which source code Google Cloud Storage signed
408URL should be generated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700409 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 The object takes the form of:
411
412{ # Request of `GenerateDownloadUrl` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700413 &quot;versionId&quot;: &quot;A String&quot;, # The optional version of function.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 }
415
416 x__xgafv: string, V1 error format.
417 Allowed values
418 1 - v1 error format
419 2 - v2 error format
420
421Returns:
422 An object of the form:
423
424 { # Response of `GenerateDownloadUrl` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700425 &quot;downloadUrl&quot;: &quot;A String&quot;, # The generated Google Cloud Storage signed URL that should be used for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700426 # function source code download.
427 }</pre>
428</div>
429
430<div class="method">
431 <code class="details" id="generateUploadUrl">generateUploadUrl(parent, body=None, x__xgafv=None)</code>
432 <pre>Returns a signed URL for uploading a function source code.
433For more information about the signed URL usage see:
434https://cloud.google.com/storage/docs/access-control/signed-urls
435Once the function source code upload is complete, the used signed
436URL should be provided in CreateFunction or UpdateFunction request
437as a reference to the function source code.
438
439When uploading source code to the generated signed URL, please follow
440these restrictions:
441
442* Source file type should be a zip file.
443* Source file size should not exceed 100MB limit.
444* No credentials should be attached - the signed URLs provide access to the
445 target bucket using internal service identity; if credentials were
446 attached, the identity from the credentials would be used, but that
447 identity does not have permissions to upload files to the URL.
448
449When making a HTTP PUT request, these two headers need to be specified:
450
451* `content-type: application/zip`
452* `x-goog-content-length-range: 0,104857600`
453
454And this header SHOULD NOT be specified:
455
456* `Authorization: Bearer YOUR_TOKEN`
457
458Args:
459 parent: string, The project and location in which the Google Cloud Storage signed URL
460should be generated, specified in the format `projects/*/locations/*`. (required)
461 body: object, The request body.
462 The object takes the form of:
463
464{ # Request of `GenerateUploadUrl` method.
465 }
466
467 x__xgafv: string, V1 error format.
468 Allowed values
469 1 - v1 error format
470 2 - v2 error format
471
472Returns:
473 An object of the form:
474
475 { # Response of `GenerateUploadUrl` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700476 &quot;uploadUrl&quot;: &quot;A String&quot;, # The generated Google Cloud Storage signed URL that should be used for a
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 # function source code upload. The uploaded file should be a zip archive
478 # which contains a function.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400479 }</pre>
480</div>
481
482<div class="method">
483 <code class="details" id="get">get(name, x__xgafv=None)</code>
484 <pre>Returns a function with the given name from the requested project.
485
486Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700487 name: string, Required. The name of the function which details should be obtained. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400488 x__xgafv: string, V1 error format.
489 Allowed values
490 1 - v1 error format
491 2 - v2 error format
492
493Returns:
494 An object of the form:
495
496 { # Describes a Cloud Function that contains user computation executed in
497 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700498 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
499 # can be terminated if the function is not completed at the end of the
500 # timeout period. Defaults to 60 seconds.
501 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
502 # function, optional when updating an existing function. For a complete
503 # list of possible choices, see the
504 # [`gcloud` command
505 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700506 &quot;eventTrigger&quot;: { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
507 # service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700508 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
509 # If empty, then defaults to ignoring failures (i.e. not retrying them).
510 &quot;retry&quot;: { # Describes the retry policy in case of function&#x27;s execution failure. # If specified, then the function will be retried in case of a failure.
511 # A function execution will be retried on any failure.
512 # A failed execution will be retried up to 7 days with an exponential backoff
513 # (capped at 10 seconds).
514 # Retried execution is charged as any other execution.
515 },
516 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700517 &quot;resource&quot;: &quot;A String&quot;, # Which instance of the source&#x27;s service should send events. E.g. for Pub/Sub
518 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
519 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
520 # that only supports one instance per-project, this should be the name of the
521 # project (`projects/*`)
522 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
523 #
524 # If no string is provided, the default service implementing the API will
525 # be used. For example, `storage.googleapis.com` is the default for all
526 # event types in the `google.storage` namespace.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700527 &quot;eventType&quot;: &quot;A String&quot;, # `event_type` names contain the service that is sending an event and the
528 # kind of event that was fired. Must be of the form
529 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
530 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
531 #
532 # Handle an object changing in Google Cloud Storage:
533 # `providers/cloud.storage/eventTypes/object.change`
534 #
535 # Handle a write to the Firebase Realtime Database:
536 # `providers/google.firebase.database/eventTypes/ref.write`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700537 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700538 &quot;serviceAccount&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
539 # `{project_id}@appspot.gserviceaccount.com`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700540 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
541 # executed. Defaults to the resource name suffix, if not specified. For
542 # backward compatibility, if function with given name is not found, then the
543 # system will try to use function named &quot;function&quot;.
544 # For Node.js this is name of a function exported by the module specified
545 # in `source_location`.
546 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
547 &quot;sourceRepositoryUrl&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
548 # There are supported Cloud Source Repository URLs in the following
549 # formats:
550 #
551 # To refer to a specific commit:
552 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
553 # To refer to a moveable alias (branch):
554 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
555 # In particular, to refer to HEAD use `master` moveable alias.
556 # To refer to a specific fixed alias (tag):
557 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
558 #
559 # You may omit `paths/*` if you want to use the main directory.
560 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
561 &quot;a_key&quot;: &quot;A String&quot;,
562 },
563 &quot;labels&quot;: { # Labels associated with this Cloud Function.
564 &quot;a_key&quot;: &quot;A String&quot;,
565 },
566 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700567 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
568 # be either the fully-qualified URI, or the short name of the network
569 # connector resource. The format of this field is
570 # `projects/*/locations/*/connectors/*`
571 #
572 # This field is mutually exclusive with `network` field and will eventually
573 # replace it.
574 #
575 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
576 # more information on connecting Cloud projects.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700577 &quot;latestOperation&quot;: &quot;A String&quot;, # Output only. Name of the most recent operation modifying the function. If
578 # the function status is `DEPLOYING` or `DELETING`, then it points to the
579 # active operation.
580 &quot;httpsTrigger&quot;: { # Describes HTTPSTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
581 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
582 },
583 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
584 # archive which contains the function.
585 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
586 # by google.cloud.functions.v1beta2.GenerateUploadUrl
587 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
588 # given time.
589 &quot;sourceRepository&quot;: { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
590 &quot;tag&quot;: &quot;A String&quot;, # The name of the tag that captures the state of the repository from
591 # which the function should be fetched.
592 &quot;repositoryUrl&quot;: &quot;A String&quot;, # URL to the hosted repository where the function is defined. Only paths in
593 # https://source.developers.google.com domain are supported. The path should
594 # contain the name of the repository.
595 &quot;deployedRevision&quot;: &quot;A String&quot;, # Output only. The id of the revision that was resolved at the moment of
596 # function creation or update. For example when a user deployed from a
597 # branch, it will be the revision id of the latest change on this branch at
598 # that time. If user deployed from revision then this value will be always
599 # equal to the revision specified by the user.
600 &quot;revision&quot;: &quot;A String&quot;, # The id of the revision that captures the state of the repository from
601 # which the function should be fetched.
602 &quot;sourcePath&quot;: &quot;A String&quot;, # The path within the repository where the function is defined. The path
603 # should point to the directory where Cloud Functions files are located. Use
604 # &quot;/&quot; if the function is defined directly in the root directory of a
605 # repository.
606 &quot;branch&quot;: &quot;A String&quot;, # The name of the branch from which the function should be fetched.
607 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700608 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
Dan O'Mearadd494642020-05-01 07:42:23 -0700609 # either the fully-qualified URI, or the short name of the network resource.
610 # If the short network name is used, the network must belong to the same
611 # project. Otherwise, it must belong to a project within the same
612 # organization. The format of this field is either
613 # `projects/{project}/global/networks/{network}` or `{network}`, where
614 # {project} is a project id where the network is defined, and {network} is
615 # the short name of the network.
616 #
617 # This field is mutually exclusive with `vpc_connector` and will be replaced
618 # by it.
619 #
620 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
621 # more information on connecting Cloud projects.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700622 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
623 # results in a new version of a function being created.
624 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
625 # Defaults to 256MB.
626 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
627 # globally and match pattern `projects/*/locations/*/functions/*`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400628 }</pre>
629</div>
630
631<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 <code class="details" id="list">list(location, pageToken=None, pageSize=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400633 <pre>Returns a list of functions that belong to the requested project.
634
635Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700636 location: string, Required. The project and location from which the function should be listed,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400637specified in the format `projects/*/locations/*`
Bu Sun Kim65020912020-05-20 12:08:20 -0700638If you want to list functions in all locations, use &quot;-&quot; in place of a
Dan O'Mearadd494642020-05-01 07:42:23 -0700639location. When listing functions in all locations, if one or more
640location(s) are unreachable, the response will contain functions from all
641reachable locations along with the names of any unreachable locations. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400642 pageToken: string, The value returned by the last
643`ListFunctionsResponse`; indicates that
644this is a continuation of a prior `ListFunctions` call, and that the
645system should return the next page of data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 pageSize: integer, Maximum number of functions to return per call.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400647 x__xgafv: string, V1 error format.
648 Allowed values
649 1 - v1 error format
650 2 - v2 error format
651
652Returns:
653 An object of the form:
654
655 { # Response for the `ListFunctions` method.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700656 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more functions that match
657 # the request; this value should be passed in a new
658 # google.cloud.functions.v1beta2.ListFunctionsRequest
659 # to get more functions.
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 &quot;functions&quot;: [ # The functions that match the request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400661 { # Describes a Cloud Function that contains user computation executed in
662 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700663 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
664 # can be terminated if the function is not completed at the end of the
665 # timeout period. Defaults to 60 seconds.
666 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
667 # function, optional when updating an existing function. For a complete
668 # list of possible choices, see the
669 # [`gcloud` command
670 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700671 &quot;eventTrigger&quot;: { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
672 # service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700673 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
674 # If empty, then defaults to ignoring failures (i.e. not retrying them).
675 &quot;retry&quot;: { # Describes the retry policy in case of function&#x27;s execution failure. # If specified, then the function will be retried in case of a failure.
676 # A function execution will be retried on any failure.
677 # A failed execution will be retried up to 7 days with an exponential backoff
678 # (capped at 10 seconds).
679 # Retried execution is charged as any other execution.
680 },
681 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700682 &quot;resource&quot;: &quot;A String&quot;, # Which instance of the source&#x27;s service should send events. E.g. for Pub/Sub
683 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
684 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
685 # that only supports one instance per-project, this should be the name of the
686 # project (`projects/*`)
687 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
688 #
689 # If no string is provided, the default service implementing the API will
690 # be used. For example, `storage.googleapis.com` is the default for all
691 # event types in the `google.storage` namespace.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700692 &quot;eventType&quot;: &quot;A String&quot;, # `event_type` names contain the service that is sending an event and the
693 # kind of event that was fired. Must be of the form
694 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
695 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
696 #
697 # Handle an object changing in Google Cloud Storage:
698 # `providers/cloud.storage/eventTypes/object.change`
699 #
700 # Handle a write to the Firebase Realtime Database:
701 # `providers/google.firebase.database/eventTypes/ref.write`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700702 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700703 &quot;serviceAccount&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
704 # `{project_id}@appspot.gserviceaccount.com`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700705 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
706 # executed. Defaults to the resource name suffix, if not specified. For
707 # backward compatibility, if function with given name is not found, then the
708 # system will try to use function named &quot;function&quot;.
709 # For Node.js this is name of a function exported by the module specified
710 # in `source_location`.
711 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
712 &quot;sourceRepositoryUrl&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
713 # There are supported Cloud Source Repository URLs in the following
714 # formats:
715 #
716 # To refer to a specific commit:
717 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
718 # To refer to a moveable alias (branch):
719 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
720 # In particular, to refer to HEAD use `master` moveable alias.
721 # To refer to a specific fixed alias (tag):
722 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
723 #
724 # You may omit `paths/*` if you want to use the main directory.
725 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
726 &quot;a_key&quot;: &quot;A String&quot;,
727 },
728 &quot;labels&quot;: { # Labels associated with this Cloud Function.
729 &quot;a_key&quot;: &quot;A String&quot;,
730 },
731 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700732 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
733 # be either the fully-qualified URI, or the short name of the network
734 # connector resource. The format of this field is
735 # `projects/*/locations/*/connectors/*`
736 #
737 # This field is mutually exclusive with `network` field and will eventually
738 # replace it.
739 #
740 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
741 # more information on connecting Cloud projects.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700742 &quot;latestOperation&quot;: &quot;A String&quot;, # Output only. Name of the most recent operation modifying the function. If
743 # the function status is `DEPLOYING` or `DELETING`, then it points to the
744 # active operation.
745 &quot;httpsTrigger&quot;: { # Describes HTTPSTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
746 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
747 },
748 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
749 # archive which contains the function.
750 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
751 # by google.cloud.functions.v1beta2.GenerateUploadUrl
752 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
753 # given time.
754 &quot;sourceRepository&quot;: { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
755 &quot;tag&quot;: &quot;A String&quot;, # The name of the tag that captures the state of the repository from
756 # which the function should be fetched.
757 &quot;repositoryUrl&quot;: &quot;A String&quot;, # URL to the hosted repository where the function is defined. Only paths in
758 # https://source.developers.google.com domain are supported. The path should
759 # contain the name of the repository.
760 &quot;deployedRevision&quot;: &quot;A String&quot;, # Output only. The id of the revision that was resolved at the moment of
761 # function creation or update. For example when a user deployed from a
762 # branch, it will be the revision id of the latest change on this branch at
763 # that time. If user deployed from revision then this value will be always
764 # equal to the revision specified by the user.
765 &quot;revision&quot;: &quot;A String&quot;, # The id of the revision that captures the state of the repository from
766 # which the function should be fetched.
767 &quot;sourcePath&quot;: &quot;A String&quot;, # The path within the repository where the function is defined. The path
768 # should point to the directory where Cloud Functions files are located. Use
769 # &quot;/&quot; if the function is defined directly in the root directory of a
770 # repository.
771 &quot;branch&quot;: &quot;A String&quot;, # The name of the branch from which the function should be fetched.
772 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
Dan O'Mearadd494642020-05-01 07:42:23 -0700774 # either the fully-qualified URI, or the short name of the network resource.
775 # If the short network name is used, the network must belong to the same
776 # project. Otherwise, it must belong to a project within the same
777 # organization. The format of this field is either
778 # `projects/{project}/global/networks/{network}` or `{network}`, where
779 # {project} is a project id where the network is defined, and {network} is
780 # the short name of the network.
781 #
782 # This field is mutually exclusive with `vpc_connector` and will be replaced
783 # by it.
784 #
785 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
786 # more information on connecting Cloud projects.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700787 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
788 # results in a new version of a function being created.
789 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
790 # Defaults to 256MB.
791 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
792 # globally and match pattern `projects/*/locations/*/functions/*`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400793 },
794 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700795 &quot;unreachable&quot;: [ # Locations that could not be reached. The response does not include any
796 # functions from these locations.
797 &quot;A String&quot;,
798 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400799 }</pre>
800</div>
801
802<div class="method">
803 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
804 <pre>Retrieves the next page of results.
805
806Args:
807 previous_request: The request for the previous page. (required)
808 previous_response: The response from the request for the previous page. (required)
809
810Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700811 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400812 page. Returns None if there are no more items in the collection.
813 </pre>
814</div>
815
816<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700817 <code class="details" id="update">update(name, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400818 <pre>Updates existing function.
819
820Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700821 name: string, Required. The name of the function to be updated. (required)
822 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400823 The object takes the form of:
824
825{ # Describes a Cloud Function that contains user computation executed in
826 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700827 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
828 # can be terminated if the function is not completed at the end of the
829 # timeout period. Defaults to 60 seconds.
830 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
831 # function, optional when updating an existing function. For a complete
832 # list of possible choices, see the
833 # [`gcloud` command
834 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700835 &quot;eventTrigger&quot;: { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
836 # service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700837 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
838 # If empty, then defaults to ignoring failures (i.e. not retrying them).
839 &quot;retry&quot;: { # Describes the retry policy in case of function&#x27;s execution failure. # If specified, then the function will be retried in case of a failure.
840 # A function execution will be retried on any failure.
841 # A failed execution will be retried up to 7 days with an exponential backoff
842 # (capped at 10 seconds).
843 # Retried execution is charged as any other execution.
844 },
845 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700846 &quot;resource&quot;: &quot;A String&quot;, # Which instance of the source&#x27;s service should send events. E.g. for Pub/Sub
847 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
848 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
849 # that only supports one instance per-project, this should be the name of the
850 # project (`projects/*`)
851 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
852 #
853 # If no string is provided, the default service implementing the API will
854 # be used. For example, `storage.googleapis.com` is the default for all
855 # event types in the `google.storage` namespace.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700856 &quot;eventType&quot;: &quot;A String&quot;, # `event_type` names contain the service that is sending an event and the
857 # kind of event that was fired. Must be of the form
858 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
859 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
860 #
861 # Handle an object changing in Google Cloud Storage:
862 # `providers/cloud.storage/eventTypes/object.change`
863 #
864 # Handle a write to the Firebase Realtime Database:
865 # `providers/google.firebase.database/eventTypes/ref.write`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700866 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700867 &quot;serviceAccount&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
868 # `{project_id}@appspot.gserviceaccount.com`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700869 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
870 # executed. Defaults to the resource name suffix, if not specified. For
871 # backward compatibility, if function with given name is not found, then the
872 # system will try to use function named &quot;function&quot;.
873 # For Node.js this is name of a function exported by the module specified
874 # in `source_location`.
875 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
876 &quot;sourceRepositoryUrl&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
877 # There are supported Cloud Source Repository URLs in the following
878 # formats:
879 #
880 # To refer to a specific commit:
881 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
882 # To refer to a moveable alias (branch):
883 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
884 # In particular, to refer to HEAD use `master` moveable alias.
885 # To refer to a specific fixed alias (tag):
886 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
887 #
888 # You may omit `paths/*` if you want to use the main directory.
889 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
890 &quot;a_key&quot;: &quot;A String&quot;,
891 },
892 &quot;labels&quot;: { # Labels associated with this Cloud Function.
893 &quot;a_key&quot;: &quot;A String&quot;,
894 },
895 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700896 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
897 # be either the fully-qualified URI, or the short name of the network
898 # connector resource. The format of this field is
899 # `projects/*/locations/*/connectors/*`
900 #
901 # This field is mutually exclusive with `network` field and will eventually
902 # replace it.
903 #
904 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
905 # more information on connecting Cloud projects.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700906 &quot;latestOperation&quot;: &quot;A String&quot;, # Output only. Name of the most recent operation modifying the function. If
907 # the function status is `DEPLOYING` or `DELETING`, then it points to the
908 # active operation.
909 &quot;httpsTrigger&quot;: { # Describes HTTPSTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
910 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
911 },
912 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
913 # archive which contains the function.
914 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
915 # by google.cloud.functions.v1beta2.GenerateUploadUrl
916 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
917 # given time.
918 &quot;sourceRepository&quot;: { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
919 &quot;tag&quot;: &quot;A String&quot;, # The name of the tag that captures the state of the repository from
920 # which the function should be fetched.
921 &quot;repositoryUrl&quot;: &quot;A String&quot;, # URL to the hosted repository where the function is defined. Only paths in
922 # https://source.developers.google.com domain are supported. The path should
923 # contain the name of the repository.
924 &quot;deployedRevision&quot;: &quot;A String&quot;, # Output only. The id of the revision that was resolved at the moment of
925 # function creation or update. For example when a user deployed from a
926 # branch, it will be the revision id of the latest change on this branch at
927 # that time. If user deployed from revision then this value will be always
928 # equal to the revision specified by the user.
929 &quot;revision&quot;: &quot;A String&quot;, # The id of the revision that captures the state of the repository from
930 # which the function should be fetched.
931 &quot;sourcePath&quot;: &quot;A String&quot;, # The path within the repository where the function is defined. The path
932 # should point to the directory where Cloud Functions files are located. Use
933 # &quot;/&quot; if the function is defined directly in the root directory of a
934 # repository.
935 &quot;branch&quot;: &quot;A String&quot;, # The name of the branch from which the function should be fetched.
936 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
Dan O'Mearadd494642020-05-01 07:42:23 -0700938 # either the fully-qualified URI, or the short name of the network resource.
939 # If the short network name is used, the network must belong to the same
940 # project. Otherwise, it must belong to a project within the same
941 # organization. The format of this field is either
942 # `projects/{project}/global/networks/{network}` or `{network}`, where
943 # {project} is a project id where the network is defined, and {network} is
944 # the short name of the network.
945 #
946 # This field is mutually exclusive with `vpc_connector` and will be replaced
947 # by it.
948 #
949 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
950 # more information on connecting Cloud projects.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700951 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
952 # results in a new version of a function being created.
953 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
954 # Defaults to 256MB.
955 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
956 # globally and match pattern `projects/*/locations/*/functions/*`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400957}
958
959 x__xgafv: string, V1 error format.
960 Allowed values
961 1 - v1 error format
962 2 - v2 error format
963
964Returns:
965 An object of the form:
966
967 { # This resource represents a long-running operation that is the result of a
968 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400970 # method returns no data on success, such as `Delete`, the response is
971 # `google.protobuf.Empty`. If the original method is standard
972 # `Get`/`Create`/`Update`, the response should be the resource. For other
973 # methods, the response should have the type `XxxResponse`, where `Xxx`
974 # is the original method name. For example, if the original method name
975 # is `TakeSnapshot()`, the inferred response type is
976 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700977 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400978 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700979 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
980 # contains progress information and common metadata such as create time.
981 # Some services might not provide such metadata. Any method that returns a
982 # long-running operation should document the metadata type, if any.
983 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
984 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700985 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400986 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700987 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700988 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
989 # If `true`, the operation is completed, and either `error` or `response` is
990 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700991 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
992 # different programming environments, including REST APIs and RPC APIs. It is
993 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
994 # three pieces of data: error code, error message, and error details.
995 #
996 # You can find out more about this error model and how to work with it in the
997 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700998 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1000 # message types for APIs to use.
1001 {
1002 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1003 },
1004 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001005 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1006 # user-facing error message should be localized and sent in the
1007 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001008 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001009 }</pre>
1010</div>
1011
1012</body></html>