blob: 693ea16cb55347dec12d9c1b02f81eac8bf4ddd5 [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">
Thomas Coffee2f245372017-03-27 10:39:26 -070096 <code><a href="#list">list(location, pageSize=None, pageToken=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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 "data": "A String", # 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.
130 "executionId": "A String", # Execution id of function invocation.
131 "result": "A String", # Result populated for successful execution of synchronous function. Will
132 # not be populated if function does not return a result through context.
133 "error": "A String", # Either system or user-function generated error. Set if execution
134 # 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 Kim715bd7f2019-06-14 16:50:42 -0700152 "status": "A String", # Output only. Status of the function deployment.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400153 "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
154 # service.
Dan O'Mearadd494642020-05-01 07:42:23 -0700155 "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions.
156 # If empty, then defaults to ignoring failures (i.e. not retrying them).
157 "retry": { # Describes the retry policy in case of function's execution failure. # If specified, then the function will be retried in case of a failure.
158 # A function execution will be retried on any failure.
159 # A failed execution will be retried up to 7 days with an exponential backoff
160 # (capped at 10 seconds).
161 # Retried execution is charged as any other execution.
162 },
163 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400164 "resource": "A String", # Which instance of the source's service should send events. E.g. for Pub/Sub
165 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
166 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
167 # that only supports one instance per-project, this should be the name of the
168 # project (`projects/*`)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700169 "service": "A String", # The hostname of the service that should be observed.
170 #
171 # If no string is provided, the default service implementing the API will
172 # be used. For example, `storage.googleapis.com` is the default for all
173 # event types in the `google.storage` namespace.
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 "eventType": "A String", # `event_type` names contain the service that is sending an event and the
175 # kind of event that was fired. Must be of the form
176 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
177 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
178 #
179 # Handle an object changing in Google Cloud Storage:
180 # `providers/cloud.storage/eventTypes/object.change`
181 #
182 # Handle a write to the Firebase Realtime Database:
183 # `providers/google.firebase.database/eventTypes/ref.write`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400184 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400185 "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function.
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 "network": "A String", # The VPC Network that this cloud function can connect to. It can be
187 # either the fully-qualified URI, or the short name of the network resource.
188 # If the short network name is used, the network must belong to the same
189 # project. Otherwise, it must belong to a project within the same
190 # organization. The format of this field is either
191 # `projects/{project}/global/networks/{network}` or `{network}`, where
192 # {project} is a project id where the network is defined, and {network} is
193 # the short name of the network.
194 #
195 # This field is mutually exclusive with `vpc_connector` and will be replaced
196 # by it.
197 #
198 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
199 # more information on connecting Cloud projects.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a
201 # given time.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400202 "sourceRepository": { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
203 "repositoryUrl": "A String", # URL to the hosted repository where the function is defined. Only paths in
204 # https://source.developers.google.com domain are supported. The path should
205 # contain the name of the repository.
206 "sourcePath": "A String", # The path within the repository where the function is defined. The path
207 # should point to the directory where Cloud Functions files are located. Use
208 # "/" if the function is defined directly in the root directory of a
209 # repository.
210 "deployedRevision": "A String", # Output only. The id of the revision that was resolved at the moment of
211 # function creation or update. For example when a user deployed from a
212 # branch, it will be the revision id of the latest change on this branch at
213 # that time. If user deployed from revision then this value will be always
214 # equal to the revision specified by the user.
215 "tag": "A String", # The name of the tag that captures the state of the repository from
216 # which the function should be fetched.
217 "branch": "A String", # The name of the branch from which the function should be fetched.
218 "revision": "A String", # The id of the revision that captures the state of the repository from
219 # which the function should be fetched.
220 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700221 "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated
222 # by google.cloud.functions.v1beta2.GenerateUploadUrl
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400223 "httpsTrigger": { # Describes HTTPSTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
224 "url": "A String", # Output only. The deployed url for the function.
225 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can
227 # be either the fully-qualified URI, or the short name of the network
228 # connector resource. The format of this field is
229 # `projects/*/locations/*/connectors/*`
230 #
231 # This field is mutually exclusive with `network` field and will eventually
232 # replace it.
233 #
234 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
235 # more information on connecting Cloud projects.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 "labels": { # Labels associated with this Cloud Function.
237 "a_key": "A String",
238 },
239 "serviceAccount": "A String", # The email of the function's service account. If empty, defaults to
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 # `{project_id}@appspot.gserviceaccount.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 "environmentVariables": { # Environment variables that shall be available during function execution.
242 "a_key": "A String",
243 },
244 "availableMemoryMb": 42, # The amount of memory in MB available for a function.
245 # Defaults to 256MB.
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 # results in a new version of a function being created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400248 "entryPoint": "A String", # The name of the function (as defined in source code) that will be
249 # executed. Defaults to the resource name suffix, if not specified. For
250 # backward compatibility, if function with given name is not found, then the
251 # system will try to use function named "function".
252 # For Node.js this is name of a function exported by the module specified
253 # in `source_location`.
254 "timeout": "A String", # The function execution timeout. Execution is considered failed and
255 # can be terminated if the function is not completed at the end of the
256 # timeout period. Defaults to 60 seconds.
257 "latestOperation": "A String", # Output only. Name of the most recent operation modifying the function. If
258 # the function status is `DEPLOYING` or `DELETING`, then it points to the
259 # active operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 "sourceRepositoryUrl": "A String", # The URL pointing to the hosted repository where the function is defined.
261 # There are supported Cloud Source Repository URLs in the following
262 # formats:
263 #
264 # To refer to a specific commit:
265 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
266 # To refer to a moveable alias (branch):
267 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
268 # In particular, to refer to HEAD use `master` moveable alias.
269 # To refer to a specific fixed alias (tag):
270 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
271 #
272 # You may omit `paths/*` if you want to use the main directory.
Dan O'Mearadd494642020-05-01 07:42:23 -0700273 "runtime": "A String", # The runtime in which to run the function. Required when deploying a new
274 # 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).
278 "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip
279 # archive which contains the function.
280 "name": "A String", # 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.
294 "metadata": { # Service-specific metadata associated with the operation. It typically
295 # contains progress information and common metadata such as create time.
296 # Some services might not provide such metadata. Any method that returns a
297 # long-running operation should document the metadata type, if any.
298 "a_key": "", # Properties of the object. Contains field @type with type URL.
299 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
301 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700302 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
303 # three pieces of data: error code, error message, and error details.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400304 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 # You can find out more about this error model and how to work with it in the
306 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400307 "message": "A String", # A developer-facing error message, which should be in English. Any
308 # user-facing error message should be localized and sent in the
309 # google.rpc.Status.details field, or localized by the client.
310 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311 "details": [ # A list of messages that carry the error details. There is a common set of
312 # message types for APIs to use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400313 {
314 "a_key": "", # Properties of the object. Contains field @type with type URL.
315 },
316 ],
317 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400318 "done": True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400320 # available.
321 "response": { # The normal response of the operation in case of success. If the original
322 # method returns no data on success, such as `Delete`, the response is
323 # `google.protobuf.Empty`. If the original method is standard
324 # `Get`/`Create`/`Update`, the response should be the resource. For other
325 # methods, the response should have the type `XxxResponse`, where `Xxx`
326 # is the original method name. For example, if the original method name
327 # is `TakeSnapshot()`, the inferred response type is
328 # `TakeSnapshotResponse`.
329 "a_key": "", # Properties of the object. Contains field @type with type URL.
330 },
331 "name": "A String", # The server-assigned name, which is only unique within the same service that
332 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700333 # `name` should be a resource name ending with `operations/{unique_id}`.
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.
355 "metadata": { # Service-specific metadata associated with the operation. It typically
356 # contains progress information and common metadata such as create time.
357 # Some services might not provide such metadata. Any method that returns a
358 # long-running operation should document the metadata type, if any.
359 "a_key": "", # Properties of the object. Contains field @type with type URL.
360 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
362 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
364 # three pieces of data: error code, error message, and error details.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400365 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 # You can find out more about this error model and how to work with it in the
367 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400368 "message": "A String", # A developer-facing error message, which should be in English. Any
369 # user-facing error message should be localized and sent in the
370 # google.rpc.Status.details field, or localized by the client.
371 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700372 "details": [ # A list of messages that carry the error details. There is a common set of
373 # message types for APIs to use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400374 {
375 "a_key": "", # Properties of the object. Contains field @type with type URL.
376 },
377 ],
378 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400379 "done": True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700380 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400381 # available.
382 "response": { # The normal response of the operation in case of success. If the original
383 # method returns no data on success, such as `Delete`, the response is
384 # `google.protobuf.Empty`. If the original method is standard
385 # `Get`/`Create`/`Update`, the response should be the resource. For other
386 # methods, the response should have the type `XxxResponse`, where `Xxx`
387 # is the original method name. For example, if the original method name
388 # is `TakeSnapshot()`, the inferred response type is
389 # `TakeSnapshotResponse`.
390 "a_key": "", # Properties of the object. Contains field @type with type URL.
391 },
392 "name": "A String", # The server-assigned name, which is only unique within the same service that
393 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 # `name` should be a resource name ending with `operations/{unique_id}`.
395 }</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.
413 "versionId": "A String", # The optional version of function.
414 }
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.
425 "downloadUrl": "A String", # The generated Google Cloud Storage signed URL that should be used for
426 # 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.
476 "uploadUrl": "A String", # The generated Google Cloud Storage signed URL that should be used for a
477 # 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 Kim715bd7f2019-06-14 16:50:42 -0700498 "status": "A String", # Output only. Status of the function deployment.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400499 "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
500 # service.
Dan O'Mearadd494642020-05-01 07:42:23 -0700501 "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions.
502 # If empty, then defaults to ignoring failures (i.e. not retrying them).
503 "retry": { # Describes the retry policy in case of function's execution failure. # If specified, then the function will be retried in case of a failure.
504 # A function execution will be retried on any failure.
505 # A failed execution will be retried up to 7 days with an exponential backoff
506 # (capped at 10 seconds).
507 # Retried execution is charged as any other execution.
508 },
509 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400510 "resource": "A String", # Which instance of the source's service should send events. E.g. for Pub/Sub
511 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
512 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
513 # that only supports one instance per-project, this should be the name of the
514 # project (`projects/*`)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700515 "service": "A String", # The hostname of the service that should be observed.
516 #
517 # If no string is provided, the default service implementing the API will
518 # be used. For example, `storage.googleapis.com` is the default for all
519 # event types in the `google.storage` namespace.
Dan O'Mearadd494642020-05-01 07:42:23 -0700520 "eventType": "A String", # `event_type` names contain the service that is sending an event and the
521 # kind of event that was fired. Must be of the form
522 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
523 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
524 #
525 # Handle an object changing in Google Cloud Storage:
526 # `providers/cloud.storage/eventTypes/object.change`
527 #
528 # Handle a write to the Firebase Realtime Database:
529 # `providers/google.firebase.database/eventTypes/ref.write`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400530 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400531 "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function.
Dan O'Mearadd494642020-05-01 07:42:23 -0700532 "network": "A String", # The VPC Network that this cloud function can connect to. It can be
533 # either the fully-qualified URI, or the short name of the network resource.
534 # If the short network name is used, the network must belong to the same
535 # project. Otherwise, it must belong to a project within the same
536 # organization. The format of this field is either
537 # `projects/{project}/global/networks/{network}` or `{network}`, where
538 # {project} is a project id where the network is defined, and {network} is
539 # the short name of the network.
540 #
541 # This field is mutually exclusive with `vpc_connector` and will be replaced
542 # by it.
543 #
544 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
545 # more information on connecting Cloud projects.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700546 "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a
547 # given time.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400548 "sourceRepository": { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
549 "repositoryUrl": "A String", # URL to the hosted repository where the function is defined. Only paths in
550 # https://source.developers.google.com domain are supported. The path should
551 # contain the name of the repository.
552 "sourcePath": "A String", # The path within the repository where the function is defined. The path
553 # should point to the directory where Cloud Functions files are located. Use
554 # "/" if the function is defined directly in the root directory of a
555 # repository.
556 "deployedRevision": "A String", # Output only. The id of the revision that was resolved at the moment of
557 # function creation or update. For example when a user deployed from a
558 # branch, it will be the revision id of the latest change on this branch at
559 # that time. If user deployed from revision then this value will be always
560 # equal to the revision specified by the user.
561 "tag": "A String", # The name of the tag that captures the state of the repository from
562 # which the function should be fetched.
563 "branch": "A String", # The name of the branch from which the function should be fetched.
564 "revision": "A String", # The id of the revision that captures the state of the repository from
565 # which the function should be fetched.
566 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated
568 # by google.cloud.functions.v1beta2.GenerateUploadUrl
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400569 "httpsTrigger": { # Describes HTTPSTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
570 "url": "A String", # Output only. The deployed url for the function.
571 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700572 "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can
573 # be either the fully-qualified URI, or the short name of the network
574 # connector resource. The format of this field is
575 # `projects/*/locations/*/connectors/*`
576 #
577 # This field is mutually exclusive with `network` field and will eventually
578 # replace it.
579 #
580 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
581 # more information on connecting Cloud projects.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 "labels": { # Labels associated with this Cloud Function.
583 "a_key": "A String",
584 },
585 "serviceAccount": "A String", # The email of the function's service account. If empty, defaults to
Dan O'Mearadd494642020-05-01 07:42:23 -0700586 # `{project_id}@appspot.gserviceaccount.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 "environmentVariables": { # Environment variables that shall be available during function execution.
588 "a_key": "A String",
589 },
590 "availableMemoryMb": 42, # The amount of memory in MB available for a function.
591 # Defaults to 256MB.
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 # results in a new version of a function being created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400594 "entryPoint": "A String", # The name of the function (as defined in source code) that will be
595 # executed. Defaults to the resource name suffix, if not specified. For
596 # backward compatibility, if function with given name is not found, then the
597 # system will try to use function named "function".
598 # For Node.js this is name of a function exported by the module specified
599 # in `source_location`.
600 "timeout": "A String", # The function execution timeout. Execution is considered failed and
601 # can be terminated if the function is not completed at the end of the
602 # timeout period. Defaults to 60 seconds.
603 "latestOperation": "A String", # Output only. Name of the most recent operation modifying the function. If
604 # the function status is `DEPLOYING` or `DELETING`, then it points to the
605 # active operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 "sourceRepositoryUrl": "A String", # The URL pointing to the hosted repository where the function is defined.
607 # There are supported Cloud Source Repository URLs in the following
608 # formats:
609 #
610 # To refer to a specific commit:
611 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
612 # To refer to a moveable alias (branch):
613 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
614 # In particular, to refer to HEAD use `master` moveable alias.
615 # To refer to a specific fixed alias (tag):
616 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
617 #
618 # You may omit `paths/*` if you want to use the main directory.
Dan O'Mearadd494642020-05-01 07:42:23 -0700619 "runtime": "A String", # The runtime in which to run the function. Required when deploying a new
620 # 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).
624 "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip
625 # archive which contains the function.
626 "name": "A String", # 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">
Thomas Coffee2f245372017-03-27 10:39:26 -0700632 <code class="details" id="list">list(location, pageSize=None, pageToken=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/*`
638If you want to list functions in all locations, use "-" 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 pageSize: integer, Maximum number of functions to return per call.
643 pageToken: string, The value returned by the last
644`ListFunctionsResponse`; indicates that
645this is a continuation of a prior `ListFunctions` call, and that the
646system should return the next page of data.
647 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.
656 "nextPageToken": "A String", # 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700660 "unreachable": [ # Locations that could not be reached. The response does not include any
661 # functions from these locations.
662 "A String",
663 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400664 "functions": [ # The functions that match the request.
665 { # Describes a Cloud Function that contains user computation executed in
666 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700667 "status": "A String", # Output only. Status of the function deployment.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400668 "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
669 # service.
Dan O'Mearadd494642020-05-01 07:42:23 -0700670 "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions.
671 # If empty, then defaults to ignoring failures (i.e. not retrying them).
672 "retry": { # Describes the retry policy in case of function's execution failure. # If specified, then the function will be retried in case of a failure.
673 # A function execution will be retried on any failure.
674 # A failed execution will be retried up to 7 days with an exponential backoff
675 # (capped at 10 seconds).
676 # Retried execution is charged as any other execution.
677 },
678 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400679 "resource": "A String", # Which instance of the source's service should send events. E.g. for Pub/Sub
680 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
681 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
682 # that only supports one instance per-project, this should be the name of the
683 # project (`projects/*`)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684 "service": "A String", # The hostname of the service that should be observed.
685 #
686 # If no string is provided, the default service implementing the API will
687 # be used. For example, `storage.googleapis.com` is the default for all
688 # event types in the `google.storage` namespace.
Dan O'Mearadd494642020-05-01 07:42:23 -0700689 "eventType": "A String", # `event_type` names contain the service that is sending an event and the
690 # kind of event that was fired. Must be of the form
691 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
692 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
693 #
694 # Handle an object changing in Google Cloud Storage:
695 # `providers/cloud.storage/eventTypes/object.change`
696 #
697 # Handle a write to the Firebase Realtime Database:
698 # `providers/google.firebase.database/eventTypes/ref.write`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400699 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400700 "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function.
Dan O'Mearadd494642020-05-01 07:42:23 -0700701 "network": "A String", # The VPC Network that this cloud function can connect to. It can be
702 # either the fully-qualified URI, or the short name of the network resource.
703 # If the short network name is used, the network must belong to the same
704 # project. Otherwise, it must belong to a project within the same
705 # organization. The format of this field is either
706 # `projects/{project}/global/networks/{network}` or `{network}`, where
707 # {project} is a project id where the network is defined, and {network} is
708 # the short name of the network.
709 #
710 # This field is mutually exclusive with `vpc_connector` and will be replaced
711 # by it.
712 #
713 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
714 # more information on connecting Cloud projects.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700715 "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a
716 # given time.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400717 "sourceRepository": { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
718 "repositoryUrl": "A String", # URL to the hosted repository where the function is defined. Only paths in
719 # https://source.developers.google.com domain are supported. The path should
720 # contain the name of the repository.
721 "sourcePath": "A String", # The path within the repository where the function is defined. The path
722 # should point to the directory where Cloud Functions files are located. Use
723 # "/" if the function is defined directly in the root directory of a
724 # repository.
725 "deployedRevision": "A String", # Output only. The id of the revision that was resolved at the moment of
726 # function creation or update. For example when a user deployed from a
727 # branch, it will be the revision id of the latest change on this branch at
728 # that time. If user deployed from revision then this value will be always
729 # equal to the revision specified by the user.
730 "tag": "A String", # The name of the tag that captures the state of the repository from
731 # which the function should be fetched.
732 "branch": "A String", # The name of the branch from which the function should be fetched.
733 "revision": "A String", # The id of the revision that captures the state of the repository from
734 # which the function should be fetched.
735 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736 "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated
737 # by google.cloud.functions.v1beta2.GenerateUploadUrl
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400738 "httpsTrigger": { # Describes HTTPSTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
739 "url": "A String", # Output only. The deployed url for the function.
740 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700741 "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can
742 # be either the fully-qualified URI, or the short name of the network
743 # connector resource. The format of this field is
744 # `projects/*/locations/*/connectors/*`
745 #
746 # This field is mutually exclusive with `network` field and will eventually
747 # replace it.
748 #
749 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
750 # more information on connecting Cloud projects.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 "labels": { # Labels associated with this Cloud Function.
752 "a_key": "A String",
753 },
754 "serviceAccount": "A String", # The email of the function's service account. If empty, defaults to
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 # `{project_id}@appspot.gserviceaccount.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700756 "environmentVariables": { # Environment variables that shall be available during function execution.
757 "a_key": "A String",
758 },
759 "availableMemoryMb": 42, # The amount of memory in MB available for a function.
760 # Defaults to 256MB.
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700762 # results in a new version of a function being created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400763 "entryPoint": "A String", # The name of the function (as defined in source code) that will be
764 # executed. Defaults to the resource name suffix, if not specified. For
765 # backward compatibility, if function with given name is not found, then the
766 # system will try to use function named "function".
767 # For Node.js this is name of a function exported by the module specified
768 # in `source_location`.
769 "timeout": "A String", # The function execution timeout. Execution is considered failed and
770 # can be terminated if the function is not completed at the end of the
771 # timeout period. Defaults to 60 seconds.
772 "latestOperation": "A String", # Output only. Name of the most recent operation modifying the function. If
773 # the function status is `DEPLOYING` or `DELETING`, then it points to the
774 # active operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 "sourceRepositoryUrl": "A String", # The URL pointing to the hosted repository where the function is defined.
776 # There are supported Cloud Source Repository URLs in the following
777 # formats:
778 #
779 # To refer to a specific commit:
780 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
781 # To refer to a moveable alias (branch):
782 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
783 # In particular, to refer to HEAD use `master` moveable alias.
784 # To refer to a specific fixed alias (tag):
785 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
786 #
787 # You may omit `paths/*` if you want to use the main directory.
Dan O'Mearadd494642020-05-01 07:42:23 -0700788 "runtime": "A String", # The runtime in which to run the function. Required when deploying a new
789 # function, optional when updating an existing function. For a complete
790 # list of possible choices, see the
791 # [`gcloud` command
792 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
793 "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip
794 # archive which contains the function.
795 "name": "A String", # A user-defined name of the function. Function names must be unique
796 # globally and match pattern `projects/*/locations/*/functions/*`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400797 },
798 ],
799 }</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:
811 A request object that you can call 'execute()' on to request the next
812 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 Kim715bd7f2019-06-14 16:50:42 -0700827 "status": "A String", # Output only. Status of the function deployment.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400828 "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
829 # service.
Dan O'Mearadd494642020-05-01 07:42:23 -0700830 "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions.
831 # If empty, then defaults to ignoring failures (i.e. not retrying them).
832 "retry": { # Describes the retry policy in case of function's execution failure. # If specified, then the function will be retried in case of a failure.
833 # A function execution will be retried on any failure.
834 # A failed execution will be retried up to 7 days with an exponential backoff
835 # (capped at 10 seconds).
836 # Retried execution is charged as any other execution.
837 },
838 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400839 "resource": "A String", # Which instance of the source's service should send events. E.g. for Pub/Sub
840 # this would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud
841 # Storage this would be a bucket at `projects/*/buckets/*`. For any source
842 # that only supports one instance per-project, this should be the name of the
843 # project (`projects/*`)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700844 "service": "A String", # The hostname of the service that should be observed.
845 #
846 # If no string is provided, the default service implementing the API will
847 # be used. For example, `storage.googleapis.com` is the default for all
848 # event types in the `google.storage` namespace.
Dan O'Mearadd494642020-05-01 07:42:23 -0700849 "eventType": "A String", # `event_type` names contain the service that is sending an event and the
850 # kind of event that was fired. Must be of the form
851 # `providers/*/eventTypes/*` e.g. Directly handle a Message published to
852 # Google Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`.
853 #
854 # Handle an object changing in Google Cloud Storage:
855 # `providers/cloud.storage/eventTypes/object.change`
856 #
857 # Handle a write to the Firebase Realtime Database:
858 # `providers/google.firebase.database/eventTypes/ref.write`
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400859 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400860 "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function.
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 "network": "A String", # The VPC Network that this cloud function can connect to. It can be
862 # either the fully-qualified URI, or the short name of the network resource.
863 # If the short network name is used, the network must belong to the same
864 # project. Otherwise, it must belong to a project within the same
865 # organization. The format of this field is either
866 # `projects/{project}/global/networks/{network}` or `{network}`, where
867 # {project} is a project id where the network is defined, and {network} is
868 # the short name of the network.
869 #
870 # This field is mutually exclusive with `vpc_connector` and will be replaced
871 # by it.
872 #
873 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
874 # more information on connecting Cloud projects.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700875 "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a
876 # given time.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400877 "sourceRepository": { # Describes the location of the function source in a remote repository. # The hosted repository where the function is defined.
878 "repositoryUrl": "A String", # URL to the hosted repository where the function is defined. Only paths in
879 # https://source.developers.google.com domain are supported. The path should
880 # contain the name of the repository.
881 "sourcePath": "A String", # The path within the repository where the function is defined. The path
882 # should point to the directory where Cloud Functions files are located. Use
883 # "/" if the function is defined directly in the root directory of a
884 # repository.
885 "deployedRevision": "A String", # Output only. The id of the revision that was resolved at the moment of
886 # function creation or update. For example when a user deployed from a
887 # branch, it will be the revision id of the latest change on this branch at
888 # that time. If user deployed from revision then this value will be always
889 # equal to the revision specified by the user.
890 "tag": "A String", # The name of the tag that captures the state of the repository from
891 # which the function should be fetched.
892 "branch": "A String", # The name of the branch from which the function should be fetched.
893 "revision": "A String", # The id of the revision that captures the state of the repository from
894 # which the function should be fetched.
895 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated
897 # by google.cloud.functions.v1beta2.GenerateUploadUrl
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400898 "httpsTrigger": { # Describes HTTPSTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
899 "url": "A String", # Output only. The deployed url for the function.
900 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700901 "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can
902 # be either the fully-qualified URI, or the short name of the network
903 # connector resource. The format of this field is
904 # `projects/*/locations/*/connectors/*`
905 #
906 # This field is mutually exclusive with `network` field and will eventually
907 # replace it.
908 #
909 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
910 # more information on connecting Cloud projects.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700911 "labels": { # Labels associated with this Cloud Function.
912 "a_key": "A String",
913 },
914 "serviceAccount": "A String", # The email of the function's service account. If empty, defaults to
Dan O'Mearadd494642020-05-01 07:42:23 -0700915 # `{project_id}@appspot.gserviceaccount.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 "environmentVariables": { # Environment variables that shall be available during function execution.
917 "a_key": "A String",
918 },
919 "availableMemoryMb": 42, # The amount of memory in MB available for a function.
920 # Defaults to 256MB.
Dan O'Mearadd494642020-05-01 07:42:23 -0700921 "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700922 # results in a new version of a function being created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400923 "entryPoint": "A String", # The name of the function (as defined in source code) that will be
924 # executed. Defaults to the resource name suffix, if not specified. For
925 # backward compatibility, if function with given name is not found, then the
926 # system will try to use function named "function".
927 # For Node.js this is name of a function exported by the module specified
928 # in `source_location`.
929 "timeout": "A String", # The function execution timeout. Execution is considered failed and
930 # can be terminated if the function is not completed at the end of the
931 # timeout period. Defaults to 60 seconds.
932 "latestOperation": "A String", # Output only. Name of the most recent operation modifying the function. If
933 # the function status is `DEPLOYING` or `DELETING`, then it points to the
934 # active operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 "sourceRepositoryUrl": "A String", # The URL pointing to the hosted repository where the function is defined.
936 # There are supported Cloud Source Repository URLs in the following
937 # formats:
938 #
939 # To refer to a specific commit:
940 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
941 # To refer to a moveable alias (branch):
942 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
943 # In particular, to refer to HEAD use `master` moveable alias.
944 # To refer to a specific fixed alias (tag):
945 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
946 #
947 # You may omit `paths/*` if you want to use the main directory.
Dan O'Mearadd494642020-05-01 07:42:23 -0700948 "runtime": "A String", # The runtime in which to run the function. Required when deploying a new
949 # 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).
953 "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip
954 # archive which contains the function.
955 "name": "A String", # 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.
969 "metadata": { # Service-specific metadata associated with the operation. It typically
970 # contains progress information and common metadata such as create time.
971 # Some services might not provide such metadata. Any method that returns a
972 # long-running operation should document the metadata type, if any.
973 "a_key": "", # Properties of the object. Contains field @type with type URL.
974 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
976 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700977 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
978 # three pieces of data: error code, error message, and error details.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400979 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700980 # You can find out more about this error model and how to work with it in the
981 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400982 "message": "A String", # A developer-facing error message, which should be in English. Any
983 # user-facing error message should be localized and sent in the
984 # google.rpc.Status.details field, or localized by the client.
985 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700986 "details": [ # A list of messages that carry the error details. There is a common set of
987 # message types for APIs to use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400988 {
989 "a_key": "", # Properties of the object. Contains field @type with type URL.
990 },
991 ],
992 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400993 "done": True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700994 # If `true`, the operation is completed, and either `error` or `response` is
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400995 # available.
996 "response": { # The normal response of the operation in case of success. If the original
997 # method returns no data on success, such as `Delete`, the response is
998 # `google.protobuf.Empty`. If the original method is standard
999 # `Get`/`Create`/`Update`, the response should be the resource. For other
1000 # methods, the response should have the type `XxxResponse`, where `Xxx`
1001 # is the original method name. For example, if the original method name
1002 # is `TakeSnapshot()`, the inferred response type is
1003 # `TakeSnapshotResponse`.
1004 "a_key": "", # Properties of the object. Contains field @type with type URL.
1005 },
1006 "name": "A String", # The server-assigned name, which is only unique within the same service that
1007 # originally returns it. If you use the default HTTP mapping, the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001008 # `name` should be a resource name ending with `operations/{unique_id}`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001009 }</pre>
1010</div>
1011
1012</body></html>