blob: 9e1d5a8d1bc9122e13dc3fdbfc99c96281d76a53 [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;executionId&quot;: &quot;A String&quot;, # Execution id of function invocation.
131 &quot;result&quot;: &quot;A String&quot;, # Result populated for successful execution of synchronous function. Will
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400132 # not be populated if function does not return a result through context.
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 Kim65020912020-05-20 12:08:20 -0700152 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
153 # archive which contains the function.
154 &quot;sourceRepository&quot;: { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
155 &quot;repositoryUrl&quot;: &quot;A String&quot;, # URL to the hosted repository where the function is defined. Only paths in
156 # https://source.developers.google.com domain are supported. The path should
157 # contain the name of the repository.
158 &quot;tag&quot;: &quot;A String&quot;, # The name of the tag that captures the state of the repository from
159 # which the function should be fetched.
160 &quot;branch&quot;: &quot;A String&quot;, # The name of the branch from which the function should be fetched.
161 &quot;sourcePath&quot;: &quot;A String&quot;, # The path within the repository where the function is defined. The path
162 # should point to the directory where Cloud Functions files are located. Use
163 # &quot;/&quot; if the function is defined directly in the root directory of a
164 # repository.
165 &quot;deployedRevision&quot;: &quot;A String&quot;, # Output only. The id of the revision that was resolved at the moment of
166 # function creation or update. For example when a user deployed from a
167 # branch, it will be the revision id of the latest change on this branch at
168 # that time. If user deployed from revision then this value will be always
169 # equal to the revision specified by the user.
170 &quot;revision&quot;: &quot;A String&quot;, # The id of the revision that captures the state of the repository from
171 # which the function should be fetched.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400172 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 &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 -0700174 # either the fully-qualified URI, or the short name of the network resource.
175 # If the short network name is used, the network must belong to the same
176 # project. Otherwise, it must belong to a project within the same
177 # organization. The format of this field is either
178 # `projects/{project}/global/networks/{network}` or `{network}`, where
179 # {project} is a project id where the network is defined, and {network} is
180 # the short name of the network.
181 #
182 # This field is mutually exclusive with `vpc_connector` and will be replaced
183 # by it.
184 #
185 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
186 # more information on connecting Cloud projects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 # be either the fully-qualified URI, or the short name of the network
189 # connector resource. The format of this field is
190 # `projects/*/locations/*/connectors/*`
191 #
192 # This field is mutually exclusive with `network` field and will eventually
193 # replace it.
194 #
195 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
196 # more information on connecting Cloud projects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400198 # executed. Defaults to the resource name suffix, if not specified. For
199 # backward compatibility, if function with given name is not found, then the
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 # system will try to use function named &quot;function&quot;.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400201 # For Node.js this is name of a function exported by the module specified
202 # in `source_location`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 &quot;labels&quot;: { # Labels associated with this Cloud Function.
204 &quot;a_key&quot;: &quot;A String&quot;,
205 },
206 &quot;sourceRepositoryUrl&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 # There are supported Cloud Source Repository URLs in the following
208 # formats:
209 #
210 # To refer to a specific commit:
211 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
212 # To refer to a moveable alias (branch):
213 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
214 # In particular, to refer to HEAD use `master` moveable alias.
215 # To refer to a specific fixed alias (tag):
216 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
217 #
218 # You may omit `paths/*` if you want to use the main directory.
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
220 &quot;latestOperation&quot;: &quot;A String&quot;, # Output only. Name of the most recent operation modifying the function. If
221 # the function status is `DEPLOYING` or `DELETING`, then it points to the
222 # active operation.
223 &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.
224 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
225 },
226 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
227 # given time.
228 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
229 &quot;a_key&quot;: &quot;A String&quot;,
230 },
231 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
232 # by google.cloud.functions.v1beta2.GenerateUploadUrl
233 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
234 # can be terminated if the function is not completed at the end of the
235 # timeout period. Defaults to 60 seconds.
236 &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.
237 # service.
238 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
239 #
240 # If no string is provided, the default service implementing the API will
241 # be used. For example, `storage.googleapis.com` is the default for all
242 # event types in the `google.storage` namespace.
243 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
244 # If empty, then defaults to ignoring failures (i.e. not retrying them).
245 &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.
246 # A function execution will be retried on any failure.
247 # A failed execution will be retried up to 7 days with an exponential backoff
248 # (capped at 10 seconds).
249 # Retried execution is charged as any other execution.
250 },
251 },
252 &quot;eventType&quot;: &quot;A String&quot;, # `event_type` names contain the service that is sending an event and the
253 # kind of event that was fired. Must be of the form
254 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
255 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
256 #
257 # Handle an object changing in Google Cloud Storage:
258 # `providers/cloud.storage/eventTypes/object.change`
259 #
260 # Handle a write to the Firebase Realtime Database:
261 # `providers/google.firebase.database/eventTypes/ref.write`
262 &quot;resource&quot;: &quot;A String&quot;, # Which instance of the source&#x27;s service should send events. E.g. for Pub/Sub
263 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
264 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
265 # that only supports one instance per-project, this should be the name of the
266 # project (`projects/*`)
267 },
268 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
269 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
270 # Defaults to 256MB.
271 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
272 # globally and match pattern `projects/*/locations/*/functions/*`
273 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
Dan O'Mearadd494642020-05-01 07:42:23 -0700274 # function, optional when updating an existing function. For a complete
275 # list of possible choices, see the
276 # [`gcloud` command
277 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim65020912020-05-20 12:08:20 -0700278 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
279 # results in a new version of a function being created.
280 &quot;serviceAccount&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
281 # `{project_id}@appspot.gserviceaccount.com`.
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;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400296 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700297 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400298 # method returns no data on success, such as `Delete`, the response is
299 # `google.protobuf.Empty`. If the original method is standard
300 # `Get`/`Create`/`Update`, the response should be the resource. For other
301 # methods, the response should have the type `XxxResponse`, where `Xxx`
302 # is the original method name. For example, if the original method name
303 # is `TakeSnapshot()`, the inferred response type is
304 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700305 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400306 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 &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 -0400308 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &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.
311 # different programming environments, including REST APIs and RPC APIs. It is
312 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
313 # three pieces of data: error code, error message, and error details.
314 #
315 # You can find out more about this error model and how to work with it in the
316 # [API Design Guide](https://cloud.google.com/apis/design/errors).
317 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
318 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
319 # user-facing error message should be localized and sent in the
320 # google.rpc.Status.details field, or localized by the client.
321 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
322 # message types for APIs to use.
323 {
324 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
325 },
326 ],
327 },
328 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
329 # contains progress information and common metadata such as create time.
330 # Some services might not provide such metadata. Any method that returns a
331 # long-running operation should document the metadata type, if any.
332 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
333 },
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;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400357 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400359 # method returns no data on success, such as `Delete`, the response is
360 # `google.protobuf.Empty`. If the original method is standard
361 # `Get`/`Create`/`Update`, the response should be the resource. For other
362 # methods, the response should have the type `XxxResponse`, where `Xxx`
363 # is the original method name. For example, if the original method name
364 # is `TakeSnapshot()`, the inferred response type is
365 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400367 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700368 &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 -0400369 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700371 &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.
372 # different programming environments, including REST APIs and RPC APIs. It is
373 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
374 # three pieces of data: error code, error message, and error details.
375 #
376 # You can find out more about this error model and how to work with it in the
377 # [API Design Guide](https://cloud.google.com/apis/design/errors).
378 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
379 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
380 # user-facing error message should be localized and sent in the
381 # google.rpc.Status.details field, or localized by the client.
382 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
383 # message types for APIs to use.
384 {
385 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
386 },
387 ],
388 },
389 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
390 # contains progress information and common metadata such as create time.
391 # Some services might not provide such metadata. Any method that returns a
392 # long-running operation should document the metadata type, if any.
393 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
394 },
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 Kim65020912020-05-20 12:08:20 -0700498 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
499 # archive which contains the function.
500 &quot;sourceRepository&quot;: { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
501 &quot;repositoryUrl&quot;: &quot;A String&quot;, # URL to the hosted repository where the function is defined. Only paths in
502 # https://source.developers.google.com domain are supported. The path should
503 # contain the name of the repository.
504 &quot;tag&quot;: &quot;A String&quot;, # The name of the tag that captures the state of the repository from
505 # which the function should be fetched.
506 &quot;branch&quot;: &quot;A String&quot;, # The name of the branch from which the function should be fetched.
507 &quot;sourcePath&quot;: &quot;A String&quot;, # The path within the repository where the function is defined. The path
508 # should point to the directory where Cloud Functions files are located. Use
509 # &quot;/&quot; if the function is defined directly in the root directory of a
510 # repository.
511 &quot;deployedRevision&quot;: &quot;A String&quot;, # Output only. The id of the revision that was resolved at the moment of
512 # function creation or update. For example when a user deployed from a
513 # branch, it will be the revision id of the latest change on this branch at
514 # that time. If user deployed from revision then this value will be always
515 # equal to the revision specified by the user.
516 &quot;revision&quot;: &quot;A String&quot;, # The id of the revision that captures the state of the repository from
517 # which the function should be fetched.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400518 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &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 -0700520 # either the fully-qualified URI, or the short name of the network resource.
521 # If the short network name is used, the network must belong to the same
522 # project. Otherwise, it must belong to a project within the same
523 # organization. The format of this field is either
524 # `projects/{project}/global/networks/{network}` or `{network}`, where
525 # {project} is a project id where the network is defined, and {network} is
526 # the short name of the network.
527 #
528 # This field is mutually exclusive with `vpc_connector` and will be replaced
529 # by it.
530 #
531 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
532 # more information on connecting Cloud projects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700533 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
Dan O'Mearadd494642020-05-01 07:42:23 -0700534 # be either the fully-qualified URI, or the short name of the network
535 # connector resource. The format of this field is
536 # `projects/*/locations/*/connectors/*`
537 #
538 # This field is mutually exclusive with `network` field and will eventually
539 # replace it.
540 #
541 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
542 # more information on connecting Cloud projects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400544 # executed. Defaults to the resource name suffix, if not specified. For
545 # backward compatibility, if function with given name is not found, then the
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 # system will try to use function named &quot;function&quot;.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400547 # For Node.js this is name of a function exported by the module specified
548 # in `source_location`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 &quot;labels&quot;: { # Labels associated with this Cloud Function.
550 &quot;a_key&quot;: &quot;A String&quot;,
551 },
552 &quot;sourceRepositoryUrl&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 # There are supported Cloud Source Repository URLs in the following
554 # formats:
555 #
556 # To refer to a specific commit:
557 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
558 # To refer to a moveable alias (branch):
559 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
560 # In particular, to refer to HEAD use `master` moveable alias.
561 # To refer to a specific fixed alias (tag):
562 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
563 #
564 # You may omit `paths/*` if you want to use the main directory.
Bu Sun Kim65020912020-05-20 12:08:20 -0700565 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
566 &quot;latestOperation&quot;: &quot;A String&quot;, # Output only. Name of the most recent operation modifying the function. If
567 # the function status is `DEPLOYING` or `DELETING`, then it points to the
568 # active operation.
569 &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.
570 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
571 },
572 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
573 # given time.
574 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
575 &quot;a_key&quot;: &quot;A String&quot;,
576 },
577 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
578 # by google.cloud.functions.v1beta2.GenerateUploadUrl
579 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
580 # can be terminated if the function is not completed at the end of the
581 # timeout period. Defaults to 60 seconds.
582 &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.
583 # service.
584 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
585 #
586 # If no string is provided, the default service implementing the API will
587 # be used. For example, `storage.googleapis.com` is the default for all
588 # event types in the `google.storage` namespace.
589 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
590 # If empty, then defaults to ignoring failures (i.e. not retrying them).
591 &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.
592 # A function execution will be retried on any failure.
593 # A failed execution will be retried up to 7 days with an exponential backoff
594 # (capped at 10 seconds).
595 # Retried execution is charged as any other execution.
596 },
597 },
598 &quot;eventType&quot;: &quot;A String&quot;, # `event_type` names contain the service that is sending an event and the
599 # kind of event that was fired. Must be of the form
600 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
601 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
602 #
603 # Handle an object changing in Google Cloud Storage:
604 # `providers/cloud.storage/eventTypes/object.change`
605 #
606 # Handle a write to the Firebase Realtime Database:
607 # `providers/google.firebase.database/eventTypes/ref.write`
608 &quot;resource&quot;: &quot;A String&quot;, # Which instance of the source&#x27;s service should send events. E.g. for Pub/Sub
609 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
610 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
611 # that only supports one instance per-project, this should be the name of the
612 # project (`projects/*`)
613 },
614 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
615 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
616 # Defaults to 256MB.
617 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
618 # globally and match pattern `projects/*/locations/*/functions/*`
619 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
Dan O'Mearadd494642020-05-01 07:42:23 -0700620 # function, optional when updating an existing function. For a complete
621 # list of possible choices, see the
622 # [`gcloud` command
623 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
625 # results in a new version of a function being created.
626 &quot;serviceAccount&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
627 # `{project_id}@appspot.gserviceaccount.com`.
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 Kim65020912020-05-20 12:08:20 -0700656 &quot;functions&quot;: [ # The functions that match the request.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400657 { # Describes a Cloud Function that contains user computation executed in
658 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
660 # archive which contains the function.
661 &quot;sourceRepository&quot;: { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
662 &quot;repositoryUrl&quot;: &quot;A String&quot;, # URL to the hosted repository where the function is defined. Only paths in
663 # https://source.developers.google.com domain are supported. The path should
664 # contain the name of the repository.
665 &quot;tag&quot;: &quot;A String&quot;, # The name of the tag that captures the state of the repository from
666 # which the function should be fetched.
667 &quot;branch&quot;: &quot;A String&quot;, # The name of the branch from which the function should be fetched.
668 &quot;sourcePath&quot;: &quot;A String&quot;, # The path within the repository where the function is defined. The path
669 # should point to the directory where Cloud Functions files are located. Use
670 # &quot;/&quot; if the function is defined directly in the root directory of a
671 # repository.
672 &quot;deployedRevision&quot;: &quot;A String&quot;, # Output only. The id of the revision that was resolved at the moment of
673 # function creation or update. For example when a user deployed from a
674 # branch, it will be the revision id of the latest change on this branch at
675 # that time. If user deployed from revision then this value will be always
676 # equal to the revision specified by the user.
677 &quot;revision&quot;: &quot;A String&quot;, # The id of the revision that captures the state of the repository from
678 # which the function should be fetched.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400679 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700680 &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 -0700681 # either the fully-qualified URI, or the short name of the network resource.
682 # If the short network name is used, the network must belong to the same
683 # project. Otherwise, it must belong to a project within the same
684 # organization. The format of this field is either
685 # `projects/{project}/global/networks/{network}` or `{network}`, where
686 # {project} is a project id where the network is defined, and {network} is
687 # the short name of the network.
688 #
689 # This field is mutually exclusive with `vpc_connector` and will be replaced
690 # by it.
691 #
692 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
693 # more information on connecting Cloud projects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
Dan O'Mearadd494642020-05-01 07:42:23 -0700695 # be either the fully-qualified URI, or the short name of the network
696 # connector resource. The format of this field is
697 # `projects/*/locations/*/connectors/*`
698 #
699 # This field is mutually exclusive with `network` field and will eventually
700 # replace it.
701 #
702 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
703 # more information on connecting Cloud projects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400705 # executed. Defaults to the resource name suffix, if not specified. For
706 # backward compatibility, if function with given name is not found, then the
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 # system will try to use function named &quot;function&quot;.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400708 # For Node.js this is name of a function exported by the module specified
709 # in `source_location`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700710 &quot;labels&quot;: { # Labels associated with this Cloud Function.
711 &quot;a_key&quot;: &quot;A String&quot;,
712 },
713 &quot;sourceRepositoryUrl&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 # There are supported Cloud Source Repository URLs in the following
715 # formats:
716 #
717 # To refer to a specific commit:
718 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
719 # To refer to a moveable alias (branch):
720 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
721 # In particular, to refer to HEAD use `master` moveable alias.
722 # To refer to a specific fixed alias (tag):
723 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
724 #
725 # You may omit `paths/*` if you want to use the main directory.
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
727 &quot;latestOperation&quot;: &quot;A String&quot;, # Output only. Name of the most recent operation modifying the function. If
728 # the function status is `DEPLOYING` or `DELETING`, then it points to the
729 # active operation.
730 &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.
731 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
732 },
733 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
734 # given time.
735 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
736 &quot;a_key&quot;: &quot;A String&quot;,
737 },
738 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
739 # by google.cloud.functions.v1beta2.GenerateUploadUrl
740 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
741 # can be terminated if the function is not completed at the end of the
742 # timeout period. Defaults to 60 seconds.
743 &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.
744 # service.
745 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
746 #
747 # If no string is provided, the default service implementing the API will
748 # be used. For example, `storage.googleapis.com` is the default for all
749 # event types in the `google.storage` namespace.
750 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
751 # If empty, then defaults to ignoring failures (i.e. not retrying them).
752 &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.
753 # A function execution will be retried on any failure.
754 # A failed execution will be retried up to 7 days with an exponential backoff
755 # (capped at 10 seconds).
756 # Retried execution is charged as any other execution.
757 },
758 },
759 &quot;eventType&quot;: &quot;A String&quot;, # `event_type` names contain the service that is sending an event and the
760 # kind of event that was fired. Must be of the form
761 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
762 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
763 #
764 # Handle an object changing in Google Cloud Storage:
765 # `providers/cloud.storage/eventTypes/object.change`
766 #
767 # Handle a write to the Firebase Realtime Database:
768 # `providers/google.firebase.database/eventTypes/ref.write`
769 &quot;resource&quot;: &quot;A String&quot;, # Which instance of the source&#x27;s service should send events. E.g. for Pub/Sub
770 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
771 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
772 # that only supports one instance per-project, this should be the name of the
773 # project (`projects/*`)
774 },
775 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
776 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
777 # Defaults to 256MB.
778 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
779 # globally and match pattern `projects/*/locations/*/functions/*`
780 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
Dan O'Mearadd494642020-05-01 07:42:23 -0700781 # function, optional when updating an existing function. For a complete
782 # list of possible choices, see the
783 # [`gcloud` command
784 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
786 # results in a new version of a function being created.
787 &quot;serviceAccount&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
788 # `{project_id}@appspot.gserviceaccount.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400789 },
790 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700791 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more functions that match
792 # the request; this value should be passed in a new
793 # google.cloud.functions.v1beta2.ListFunctionsRequest
794 # to get more functions.
795 &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 Kim65020912020-05-20 12:08:20 -0700827 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
828 # archive which contains the function.
829 &quot;sourceRepository&quot;: { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
830 &quot;repositoryUrl&quot;: &quot;A String&quot;, # URL to the hosted repository where the function is defined. Only paths in
831 # https://source.developers.google.com domain are supported. The path should
832 # contain the name of the repository.
833 &quot;tag&quot;: &quot;A String&quot;, # The name of the tag that captures the state of the repository from
834 # which the function should be fetched.
835 &quot;branch&quot;: &quot;A String&quot;, # The name of the branch from which the function should be fetched.
836 &quot;sourcePath&quot;: &quot;A String&quot;, # The path within the repository where the function is defined. The path
837 # should point to the directory where Cloud Functions files are located. Use
838 # &quot;/&quot; if the function is defined directly in the root directory of a
839 # repository.
840 &quot;deployedRevision&quot;: &quot;A String&quot;, # Output only. The id of the revision that was resolved at the moment of
841 # function creation or update. For example when a user deployed from a
842 # branch, it will be the revision id of the latest change on this branch at
843 # that time. If user deployed from revision then this value will be always
844 # equal to the revision specified by the user.
845 &quot;revision&quot;: &quot;A String&quot;, # The id of the revision that captures the state of the repository from
846 # which the function should be fetched.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400847 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 &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 -0700849 # either the fully-qualified URI, or the short name of the network resource.
850 # If the short network name is used, the network must belong to the same
851 # project. Otherwise, it must belong to a project within the same
852 # organization. The format of this field is either
853 # `projects/{project}/global/networks/{network}` or `{network}`, where
854 # {project} is a project id where the network is defined, and {network} is
855 # the short name of the network.
856 #
857 # This field is mutually exclusive with `vpc_connector` and will be replaced
858 # by it.
859 #
860 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
861 # more information on connecting Cloud projects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700862 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
Dan O'Mearadd494642020-05-01 07:42:23 -0700863 # be either the fully-qualified URI, or the short name of the network
864 # connector resource. The format of this field is
865 # `projects/*/locations/*/connectors/*`
866 #
867 # This field is mutually exclusive with `network` field and will eventually
868 # replace it.
869 #
870 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
871 # more information on connecting Cloud projects.
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400873 # executed. Defaults to the resource name suffix, if not specified. For
874 # backward compatibility, if function with given name is not found, then the
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 # system will try to use function named &quot;function&quot;.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400876 # For Node.js this is name of a function exported by the module specified
877 # in `source_location`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700878 &quot;labels&quot;: { # Labels associated with this Cloud Function.
879 &quot;a_key&quot;: &quot;A String&quot;,
880 },
881 &quot;sourceRepositoryUrl&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700882 # There are supported Cloud Source Repository URLs in the following
883 # formats:
884 #
885 # To refer to a specific commit:
886 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
887 # To refer to a moveable alias (branch):
888 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
889 # In particular, to refer to HEAD use `master` moveable alias.
890 # To refer to a specific fixed alias (tag):
891 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
892 #
893 # You may omit `paths/*` if you want to use the main directory.
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
895 &quot;latestOperation&quot;: &quot;A String&quot;, # Output only. Name of the most recent operation modifying the function. If
896 # the function status is `DEPLOYING` or `DELETING`, then it points to the
897 # active operation.
898 &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.
899 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
900 },
901 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
902 # given time.
903 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
904 &quot;a_key&quot;: &quot;A String&quot;,
905 },
906 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
907 # by google.cloud.functions.v1beta2.GenerateUploadUrl
908 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
909 # can be terminated if the function is not completed at the end of the
910 # timeout period. Defaults to 60 seconds.
911 &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.
912 # service.
913 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
914 #
915 # If no string is provided, the default service implementing the API will
916 # be used. For example, `storage.googleapis.com` is the default for all
917 # event types in the `google.storage` namespace.
918 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
919 # If empty, then defaults to ignoring failures (i.e. not retrying them).
920 &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.
921 # A function execution will be retried on any failure.
922 # A failed execution will be retried up to 7 days with an exponential backoff
923 # (capped at 10 seconds).
924 # Retried execution is charged as any other execution.
925 },
926 },
927 &quot;eventType&quot;: &quot;A String&quot;, # `event_type` names contain the service that is sending an event and the
928 # kind of event that was fired. Must be of the form
929 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
930 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
931 #
932 # Handle an object changing in Google Cloud Storage:
933 # `providers/cloud.storage/eventTypes/object.change`
934 #
935 # Handle a write to the Firebase Realtime Database:
936 # `providers/google.firebase.database/eventTypes/ref.write`
937 &quot;resource&quot;: &quot;A String&quot;, # Which instance of the source&#x27;s service should send events. E.g. for Pub/Sub
938 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
939 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
940 # that only supports one instance per-project, this should be the name of the
941 # project (`projects/*`)
942 },
943 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
944 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
945 # Defaults to 256MB.
946 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
947 # globally and match pattern `projects/*/locations/*/functions/*`
948 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
Dan O'Mearadd494642020-05-01 07:42:23 -0700949 # function, optional when updating an existing function. For a complete
950 # list of possible choices, see the
951 # [`gcloud` command
952 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
954 # results in a new version of a function being created.
955 &quot;serviceAccount&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
956 # `{project_id}@appspot.gserviceaccount.com`.
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;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400971 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700972 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400973 # method returns no data on success, such as `Delete`, the response is
974 # `google.protobuf.Empty`. If the original method is standard
975 # `Get`/`Create`/`Update`, the response should be the resource. For other
976 # methods, the response should have the type `XxxResponse`, where `Xxx`
977 # is the original method name. For example, if the original method name
978 # is `TakeSnapshot()`, the inferred response type is
979 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400981 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 &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 -0400983 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700984 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700985 &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.
986 # different programming environments, including REST APIs and RPC APIs. It is
987 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
988 # three pieces of data: error code, error message, and error details.
989 #
990 # You can find out more about this error model and how to work with it in the
991 # [API Design Guide](https://cloud.google.com/apis/design/errors).
992 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
993 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
994 # user-facing error message should be localized and sent in the
995 # google.rpc.Status.details field, or localized by the client.
996 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
997 # message types for APIs to use.
998 {
999 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1000 },
1001 ],
1002 },
1003 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1004 # contains progress information and common metadata such as create time.
1005 # Some services might not provide such metadata. Any method that returns a
1006 # long-running operation should document the metadata type, if any.
1007 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1008 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001009 }</pre>
1010</div>
1011
1012</body></html>