blob: e86439abbf350323b58deef3a8860f444adb9320 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<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
75<h1><a href="cloudfunctions_v1.html">Cloud Functions API</a> . <a href="cloudfunctions_v1.projects.html">projects</a> . <a href="cloudfunctions_v1.projects.locations.html">locations</a> . <a href="cloudfunctions_v1.projects.locations.functions.html">functions</a></h1>
76<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>
80<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<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">
93 <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">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Gets the IAM access control policy for a function.</p>
98<p class="toc_element">
99 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
100<p class="firstline">Returns a list of functions that belong to the requested project.</p>
101<p class="toc_element">
102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Updates existing function.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Sets the IAM access control policy on the specified function.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Tests the specified permissions against the IAM access control policy</p>
113<h3>Method Details</h3>
114<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 <code class="details" id="call">call(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116 <pre>Synchronously invokes a deployed Cloud Function. To be used for testing
117purposes as very limited traffic is allowed. For more information on
118the actual limits, refer to
119[Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).
120
121Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700122 name: string, Required. The name of the function to be called. (required)
123 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 The object takes the form of:
125
126{ # Request for the `CallFunction` method.
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 "data": "A String", # Required. Input to be passed to the function.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 }
129
130 x__xgafv: string, V1 error format.
131 Allowed values
132 1 - v1 error format
133 2 - v2 error format
134
135Returns:
136 An object of the form:
137
138 { # Response of `CallFunction` method.
139 "executionId": "A String", # Execution id of function invocation.
140 "result": "A String", # Result populated for successful execution of synchronous function. Will
141 # not be populated if function does not return a result through context.
142 "error": "A String", # Either system or user-function generated error. Set if execution
143 # was not successful.
144 }</pre>
145</div>
146
147<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 <code class="details" id="create">create(location, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 <pre>Creates a new function. If a function with the given name already exists in
150the specified project, the long running operation will return
151`ALREADY_EXISTS` error.
152
153Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 location: string, Required. The project and location in which the function should be created, specified
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155in the format `projects/*/locations/*` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157 The object takes the form of:
158
159{ # Describes a Cloud Function that contains user computation executed in
160 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700161 "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
162 # service.
Dan O'Mearadd494642020-05-01 07:42:23 -0700163 "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions.
164 # If empty, then defaults to ignoring failures (i.e. not retrying them).
165 "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.
166 # A function execution will be retried on any failure.
167 # A failed execution will be retried up to 7 days with an exponential backoff
168 # (capped at 10 seconds).
169 # Retried execution is charged as any other execution.
170 },
171 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 "resource": "A String", # Required. The resource(s) from which to observe events, for example,
173 # `projects/_/buckets/myBucket`.
174 #
175 # Not all syntactically correct values are accepted by all services. For
176 # example:
177 #
178 # 1. The authorization model must support it. Google Cloud Functions
179 # only allows EventTriggers to be deployed that observe resources in the
180 # same project as the `CloudFunction`.
181 # 2. The resource type must match the pattern expected for an
182 # `event_type`. For example, an `EventTrigger` that has an
183 # `event_type` of "google.pubsub.topic.publish" should have a resource
184 # that matches Google Cloud Pub/Sub topics.
185 #
186 # Additionally, some services may support short names when creating an
187 # `EventTrigger`. These will always be returned in the normalized "long"
188 # format.
189 #
190 # See each *service's* documentation for supported formats.
191 "service": "A String", # The hostname of the service that should be observed.
192 #
193 # If no string is provided, the default service implementing the API will
194 # be used. For example, `storage.googleapis.com` is the default for all
195 # event types in the `google.storage` namespace.
Dan O'Mearadd494642020-05-01 07:42:23 -0700196 "eventType": "A String", # Required. The type of event to observe. For example:
197 # `providers/cloud.storage/eventTypes/object.change` and
198 # `providers/cloud.pubsub/eventTypes/topic.publish`.
199 #
200 # Event types match pattern `providers/*/eventTypes/*.*`.
201 # The pattern contains:
202 #
203 # 1. namespace: For example, `cloud.storage` and
204 # `google.firebase.analytics`.
205 # 2. resource type: The type of resource on which event occurs. For
206 # example, the Google Cloud Storage API includes the type `object`.
207 # 3. action: The action that generates the event. For example, action for
208 # a Google Cloud Storage Object is 'change'.
209 # These parts are lower case.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 },
211 "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 "sourceRepository": { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
213 #
214 # The source repository where a function is hosted.
215 # source repository where a function is hosted.
216 "url": "A String", # The URL pointing to the hosted repository where the function is defined.
217 # There are supported Cloud Source Repository URLs in the following
218 # formats:
219 #
220 # To refer to a specific commit:
221 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
222 # To refer to a moveable alias (branch):
223 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
224 # In particular, to refer to HEAD use `master` moveable alias.
225 # To refer to a specific fixed alias (tag):
226 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
227 #
228 # You may omit `paths/*` if you want to use the main directory.
229 "deployedUrl": "A String", # Output only. The URL pointing to the hosted repository where the function
230 # were defined at the time of deployment. It always points to a specific
231 # commit in the format described above.
232 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 "httpsTrigger": { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
234 "url": "A String", # Output only. The deployed url for the function.
235 },
236 "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip
237 # archive which contains the function.
238 "labels": { # Labels associated with this Cloud Function.
239 "a_key": "A String",
240 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 "vpcConnectorEgressSettings": "A String", # The egress settings for the connector, controlling what traffic is diverted
242 # through it.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 "network": "A String", # The VPC Network that this cloud function can connect to. It can be
244 # either the fully-qualified URI, or the short name of the network resource.
245 # If the short network name is used, the network must belong to the same
246 # project. Otherwise, it must belong to a project within the same
247 # organization. The format of this field is either
248 # `projects/{project}/global/networks/{network}` or `{network}`, where
249 # {project} is a project id where the network is defined, and {network} is
250 # the short name of the network.
251 #
252 # This field is mutually exclusive with `vpc_connector` and will be replaced
253 # by it.
254 #
255 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
256 # more information on connecting Cloud projects.
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated
258 # by google.cloud.functions.v1.GenerateUploadUrl
259 "status": "A String", # Output only. Status of the function deployment.
260 "description": "A String", # User-provided description of a function.
261 "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a
262 # given time.
263 "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt
264 # results in a new version of a function being created.
265 "entryPoint": "A String", # The name of the function (as defined in source code) that will be
266 # executed. Defaults to the resource name suffix, if not specified. For
267 # backward compatibility, if function with given name is not found, then the
268 # system will try to use function named "function".
269 # For Node.js this is name of a function exported by the module specified
270 # in `source_location`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 "name": "A String", # A user-defined name of the function. Function names must be unique
272 # globally and match pattern `projects/*/locations/*/functions/*`
Dan O'Mearadd494642020-05-01 07:42:23 -0700273 "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can
274 # be either the fully-qualified URI, or the short name of the network
275 # connector resource. The format of this field is
276 # `projects/*/locations/*/connectors/*`
277 #
278 # This field is mutually exclusive with `network` field and will eventually
279 # replace it.
280 #
281 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
282 # more information on connecting Cloud projects.
283 "environmentVariables": { # Environment variables that shall be available during function execution.
284 "a_key": "A String",
285 },
286 "availableMemoryMb": 42, # The amount of memory in MB available for a function.
287 # Defaults to 256MB.
288 "serviceAccountEmail": "A String", # The email of the function's service account. If empty, defaults to
289 # `{project_id}@appspot.gserviceaccount.com`.
290 "timeout": "A String", # The function execution timeout. Execution is considered failed and
291 # can be terminated if the function is not completed at the end of the
292 # timeout period. Defaults to 60 seconds.
293 "ingressSettings": "A String", # The ingress settings for the function, controlling what traffic can reach
294 # it.
295 "runtime": "A String", # The runtime in which to run the function. Required when deploying a new
296 # function, optional when updating an existing function. For a complete
297 # list of possible choices, see the
298 # [`gcloud` command
299 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 }
301
302 x__xgafv: string, V1 error format.
303 Allowed values
304 1 - v1 error format
305 2 - v2 error format
306
307Returns:
308 An object of the form:
309
310 { # This resource represents a long-running operation that is the result of a
311 # network API call.
312 "metadata": { # Service-specific metadata associated with the operation. It typically
313 # contains progress information and common metadata such as create time.
314 # Some services might not provide such metadata. Any method that returns a
315 # long-running operation should document the metadata type, if any.
316 "a_key": "", # Properties of the object. Contains field @type with type URL.
317 },
318 "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.
319 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
321 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700322 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700323 # You can find out more about this error model and how to work with it in the
324 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700325 "message": "A String", # A developer-facing error message, which should be in English. Any
326 # user-facing error message should be localized and sent in the
327 # google.rpc.Status.details field, or localized by the client.
328 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
329 "details": [ # A list of messages that carry the error details. There is a common set of
330 # message types for APIs to use.
331 {
332 "a_key": "", # Properties of the object. Contains field @type with type URL.
333 },
334 ],
335 },
336 "done": True or False, # If the value is `false`, it means the operation is still in progress.
337 # If `true`, the operation is completed, and either `error` or `response` is
338 # available.
339 "response": { # The normal response of the operation in case of success. If the original
340 # method returns no data on success, such as `Delete`, the response is
341 # `google.protobuf.Empty`. If the original method is standard
342 # `Get`/`Create`/`Update`, the response should be the resource. For other
343 # methods, the response should have the type `XxxResponse`, where `Xxx`
344 # is the original method name. For example, if the original method name
345 # is `TakeSnapshot()`, the inferred response type is
346 # `TakeSnapshotResponse`.
347 "a_key": "", # Properties of the object. Contains field @type with type URL.
348 },
349 "name": "A String", # The server-assigned name, which is only unique within the same service that
350 # originally returns it. If you use the default HTTP mapping, the
351 # `name` should be a resource name ending with `operations/{unique_id}`.
352 }</pre>
353</div>
354
355<div class="method">
356 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
357 <pre>Deletes a function with the given name from the specified project. If the
358given function is used by some trigger, the trigger will be updated to
359remove this function.
360
361Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 name: string, Required. The name of the function which should be deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 x__xgafv: string, V1 error format.
364 Allowed values
365 1 - v1 error format
366 2 - v2 error format
367
368Returns:
369 An object of the form:
370
371 { # This resource represents a long-running operation that is the result of a
372 # network API call.
373 "metadata": { # Service-specific metadata associated with the operation. It typically
374 # contains progress information and common metadata such as create time.
375 # Some services might not provide such metadata. Any method that returns a
376 # long-running operation should document the metadata type, if any.
377 "a_key": "", # Properties of the object. Contains field @type with type URL.
378 },
379 "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.
380 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
382 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700384 # You can find out more about this error model and how to work with it in the
385 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 "message": "A String", # A developer-facing error message, which should be in English. Any
387 # user-facing error message should be localized and sent in the
388 # google.rpc.Status.details field, or localized by the client.
389 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
390 "details": [ # A list of messages that carry the error details. There is a common set of
391 # message types for APIs to use.
392 {
393 "a_key": "", # Properties of the object. Contains field @type with type URL.
394 },
395 ],
396 },
397 "done": True or False, # If the value is `false`, it means the operation is still in progress.
398 # If `true`, the operation is completed, and either `error` or `response` is
399 # available.
400 "response": { # The normal response of the operation in case of success. If the original
401 # method returns no data on success, such as `Delete`, the response is
402 # `google.protobuf.Empty`. If the original method is standard
403 # `Get`/`Create`/`Update`, the response should be the resource. For other
404 # methods, the response should have the type `XxxResponse`, where `Xxx`
405 # is the original method name. For example, if the original method name
406 # is `TakeSnapshot()`, the inferred response type is
407 # `TakeSnapshotResponse`.
408 "a_key": "", # Properties of the object. Contains field @type with type URL.
409 },
410 "name": "A String", # The server-assigned name, which is only unique within the same service that
411 # originally returns it. If you use the default HTTP mapping, the
412 # `name` should be a resource name ending with `operations/{unique_id}`.
413 }</pre>
414</div>
415
416<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 <code class="details" id="generateDownloadUrl">generateDownloadUrl(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 <pre>Returns a signed URL for downloading deployed function source code.
419The URL is only valid for a limited period and should be used within
420minutes after generation.
421For more information about the signed URL usage see:
422https://cloud.google.com/storage/docs/access-control/signed-urls
423
424Args:
425 name: string, The name of function for which source code Google Cloud Storage signed
426URL should be generated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700427 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700428 The object takes the form of:
429
430{ # Request of `GenerateDownloadUrl` method.
431 "versionId": "A String", # The optional version of function. If not set, default, current version
432 # is used.
433 }
434
435 x__xgafv: string, V1 error format.
436 Allowed values
437 1 - v1 error format
438 2 - v2 error format
439
440Returns:
441 An object of the form:
442
443 { # Response of `GenerateDownloadUrl` method.
444 "downloadUrl": "A String", # The generated Google Cloud Storage signed URL that should be used for
445 # function source code download.
446 }</pre>
447</div>
448
449<div class="method">
450 <code class="details" id="generateUploadUrl">generateUploadUrl(parent, body=None, x__xgafv=None)</code>
451 <pre>Returns a signed URL for uploading a function source code.
452For more information about the signed URL usage see:
453https://cloud.google.com/storage/docs/access-control/signed-urls.
454Once the function source code upload is complete, the used signed
455URL should be provided in CreateFunction or UpdateFunction request
456as a reference to the function source code.
457
458When uploading source code to the generated signed URL, please follow
459these restrictions:
460
461* Source file type should be a zip file.
462* Source file size should not exceed 100MB limit.
463* No credentials should be attached - the signed URLs provide access to the
464 target bucket using internal service identity; if credentials were
465 attached, the identity from the credentials would be used, but that
466 identity does not have permissions to upload files to the URL.
467
468When making a HTTP PUT request, these two headers need to be specified:
469
470* `content-type: application/zip`
471* `x-goog-content-length-range: 0,104857600`
472
473And this header SHOULD NOT be specified:
474
475* `Authorization: Bearer YOUR_TOKEN`
476
477Args:
478 parent: string, The project and location in which the Google Cloud Storage signed URL
479should be generated, specified in the format `projects/*/locations/*`. (required)
480 body: object, The request body.
481 The object takes the form of:
482
483{ # Request of `GenerateSourceUploadUrl` method.
484 }
485
486 x__xgafv: string, V1 error format.
487 Allowed values
488 1 - v1 error format
489 2 - v2 error format
490
491Returns:
492 An object of the form:
493
494 { # Response of `GenerateSourceUploadUrl` method.
495 "uploadUrl": "A String", # The generated Google Cloud Storage signed URL that should be used for a
496 # function source code upload. The uploaded file should be a zip archive
497 # which contains a function.
498 }</pre>
499</div>
500
501<div class="method">
502 <code class="details" id="get">get(name, x__xgafv=None)</code>
503 <pre>Returns a function with the given name from the requested project.
504
505Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700506 name: string, Required. The name of the function which details should be obtained. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 x__xgafv: string, V1 error format.
508 Allowed values
509 1 - v1 error format
510 2 - v2 error format
511
512Returns:
513 An object of the form:
514
515 { # Describes a Cloud Function that contains user computation executed in
516 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
518 # service.
Dan O'Mearadd494642020-05-01 07:42:23 -0700519 "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions.
520 # If empty, then defaults to ignoring failures (i.e. not retrying them).
521 "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.
522 # A function execution will be retried on any failure.
523 # A failed execution will be retried up to 7 days with an exponential backoff
524 # (capped at 10 seconds).
525 # Retried execution is charged as any other execution.
526 },
527 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 "resource": "A String", # Required. The resource(s) from which to observe events, for example,
529 # `projects/_/buckets/myBucket`.
530 #
531 # Not all syntactically correct values are accepted by all services. For
532 # example:
533 #
534 # 1. The authorization model must support it. Google Cloud Functions
535 # only allows EventTriggers to be deployed that observe resources in the
536 # same project as the `CloudFunction`.
537 # 2. The resource type must match the pattern expected for an
538 # `event_type`. For example, an `EventTrigger` that has an
539 # `event_type` of "google.pubsub.topic.publish" should have a resource
540 # that matches Google Cloud Pub/Sub topics.
541 #
542 # Additionally, some services may support short names when creating an
543 # `EventTrigger`. These will always be returned in the normalized "long"
544 # format.
545 #
546 # See each *service's* documentation for supported formats.
547 "service": "A String", # The hostname of the service that should be observed.
548 #
549 # If no string is provided, the default service implementing the API will
550 # be used. For example, `storage.googleapis.com` is the default for all
551 # event types in the `google.storage` namespace.
Dan O'Mearadd494642020-05-01 07:42:23 -0700552 "eventType": "A String", # Required. The type of event to observe. For example:
553 # `providers/cloud.storage/eventTypes/object.change` and
554 # `providers/cloud.pubsub/eventTypes/topic.publish`.
555 #
556 # Event types match pattern `providers/*/eventTypes/*.*`.
557 # The pattern contains:
558 #
559 # 1. namespace: For example, `cloud.storage` and
560 # `google.firebase.analytics`.
561 # 2. resource type: The type of resource on which event occurs. For
562 # example, the Google Cloud Storage API includes the type `object`.
563 # 3. action: The action that generates the event. For example, action for
564 # a Google Cloud Storage Object is 'change'.
565 # These parts are lower case.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700566 },
567 "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700568 "sourceRepository": { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
569 #
570 # The source repository where a function is hosted.
571 # source repository where a function is hosted.
572 "url": "A String", # The URL pointing to the hosted repository where the function is defined.
573 # There are supported Cloud Source Repository URLs in the following
574 # formats:
575 #
576 # To refer to a specific commit:
577 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
578 # To refer to a moveable alias (branch):
579 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
580 # In particular, to refer to HEAD use `master` moveable alias.
581 # To refer to a specific fixed alias (tag):
582 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
583 #
584 # You may omit `paths/*` if you want to use the main directory.
585 "deployedUrl": "A String", # Output only. The URL pointing to the hosted repository where the function
586 # were defined at the time of deployment. It always points to a specific
587 # commit in the format described above.
588 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 "httpsTrigger": { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
590 "url": "A String", # Output only. The deployed url for the function.
591 },
592 "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip
593 # archive which contains the function.
594 "labels": { # Labels associated with this Cloud Function.
595 "a_key": "A String",
596 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700597 "vpcConnectorEgressSettings": "A String", # The egress settings for the connector, controlling what traffic is diverted
598 # through it.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700599 "network": "A String", # The VPC Network that this cloud function can connect to. It can be
600 # either the fully-qualified URI, or the short name of the network resource.
601 # If the short network name is used, the network must belong to the same
602 # project. Otherwise, it must belong to a project within the same
603 # organization. The format of this field is either
604 # `projects/{project}/global/networks/{network}` or `{network}`, where
605 # {project} is a project id where the network is defined, and {network} is
606 # the short name of the network.
607 #
608 # This field is mutually exclusive with `vpc_connector` and will be replaced
609 # by it.
610 #
611 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
612 # more information on connecting Cloud projects.
Dan O'Mearadd494642020-05-01 07:42:23 -0700613 "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated
614 # by google.cloud.functions.v1.GenerateUploadUrl
615 "status": "A String", # Output only. Status of the function deployment.
616 "description": "A String", # User-provided description of a function.
617 "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a
618 # given time.
619 "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt
620 # results in a new version of a function being created.
621 "entryPoint": "A String", # The name of the function (as defined in source code) that will be
622 # executed. Defaults to the resource name suffix, if not specified. For
623 # backward compatibility, if function with given name is not found, then the
624 # system will try to use function named "function".
625 # For Node.js this is name of a function exported by the module specified
626 # in `source_location`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627 "name": "A String", # A user-defined name of the function. Function names must be unique
628 # globally and match pattern `projects/*/locations/*/functions/*`
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can
630 # be either the fully-qualified URI, or the short name of the network
631 # connector resource. The format of this field is
632 # `projects/*/locations/*/connectors/*`
633 #
634 # This field is mutually exclusive with `network` field and will eventually
635 # replace it.
636 #
637 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
638 # more information on connecting Cloud projects.
639 "environmentVariables": { # Environment variables that shall be available during function execution.
640 "a_key": "A String",
641 },
642 "availableMemoryMb": 42, # The amount of memory in MB available for a function.
643 # Defaults to 256MB.
644 "serviceAccountEmail": "A String", # The email of the function's service account. If empty, defaults to
645 # `{project_id}@appspot.gserviceaccount.com`.
646 "timeout": "A String", # The function execution timeout. Execution is considered failed and
647 # can be terminated if the function is not completed at the end of the
648 # timeout period. Defaults to 60 seconds.
649 "ingressSettings": "A String", # The ingress settings for the function, controlling what traffic can reach
650 # it.
651 "runtime": "A String", # The runtime in which to run the function. Required when deploying a new
652 # function, optional when updating an existing function. For a complete
653 # list of possible choices, see the
654 # [`gcloud` command
655 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700656 }</pre>
657</div>
658
659<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700660 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700661 <pre>Gets the IAM access control policy for a function.
662Returns an empty policy if the function exists and does not have a policy
663set.
664
665Args:
666 resource: string, REQUIRED: The resource for which the policy is being requested.
667See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700668 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned.
669
670Valid values are 0, 1, and 3. Requests specifying an invalid value will be
671rejected.
672
673Requests for policies with any conditional bindings must specify version 3.
674Policies without any conditional bindings may specify any valid value or
675leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 x__xgafv: string, V1 error format.
677 Allowed values
678 1 - v1 error format
679 2 - v2 error format
680
681Returns:
682 An object of the form:
683
Dan O'Mearadd494642020-05-01 07:42:23 -0700684 { # An Identity and Access Management (IAM) policy, which specifies access
685 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700686 #
687 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700688 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
689 # `members` to a single `role`. Members can be user accounts, service accounts,
690 # Google groups, and domains (such as G Suite). A `role` is a named list of
691 # permissions; each `role` can be an IAM predefined role or a user-created
692 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700693 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700694 # Optionally, a `binding` can specify a `condition`, which is a logical
695 # expression that allows access to a resource only if the expression evaluates
696 # to `true`. A condition can add constraints based on attributes of the
697 # request, the resource, or both.
698 #
699 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 #
701 # {
702 # "bindings": [
703 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700705 # "members": [
706 # "user:mike@example.com",
707 # "group:admins@example.com",
708 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -0700709 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 # ]
711 # },
712 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700713 # "role": "roles/resourcemanager.organizationViewer",
714 # "members": ["user:eve@example.com"],
715 # "condition": {
716 # "title": "expirable access",
717 # "description": "Does not grant access after Sep 2020",
718 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
719 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 # ],
722 # "etag": "BwWWja0YfJA=",
723 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700724 # }
725 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700726 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700727 #
728 # bindings:
729 # - members:
730 # - user:mike@example.com
731 # - group:admins@example.com
732 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700733 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
734 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700735 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700736 # - user:eve@example.com
737 # role: roles/resourcemanager.organizationViewer
738 # condition:
739 # title: expirable access
740 # description: Does not grant access after Sep 2020
741 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
742 # - etag: BwWWja0YfJA=
743 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 #
745 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700746 # [IAM documentation](https://cloud.google.com/iam/docs/).
747 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
748 # `condition` that determines how and when the `bindings` are applied. Each
749 # of the `bindings` must contain at least one member.
750 { # Associates `members` with a `role`.
751 "role": "A String", # Role that is assigned to `members`.
752 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
753 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
754 # `members` can have the following values:
755 #
756 # * `allUsers`: A special identifier that represents anyone who is
757 # on the internet; with or without a Google account.
758 #
759 # * `allAuthenticatedUsers`: A special identifier that represents anyone
760 # who is authenticated with a Google account or a service account.
761 #
762 # * `user:{emailid}`: An email address that represents a specific Google
763 # account. For example, `alice@example.com` .
764 #
765 #
766 # * `serviceAccount:{emailid}`: An email address that represents a service
767 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
768 #
769 # * `group:{emailid}`: An email address that represents a Google group.
770 # For example, `admins@example.com`.
771 #
772 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
773 # identifier) representing a user that has been recently deleted. For
774 # example, `alice@example.com?uid=123456789012345678901`. If the user is
775 # recovered, this value reverts to `user:{emailid}` and the recovered user
776 # retains the role in the binding.
777 #
778 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
779 # unique identifier) representing a service account that has been recently
780 # deleted. For example,
781 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
782 # If the service account is undeleted, this value reverts to
783 # `serviceAccount:{emailid}` and the undeleted service account retains the
784 # role in the binding.
785 #
786 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
787 # identifier) representing a Google group that has been recently
788 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
789 # the group is recovered, this value reverts to `group:{emailid}` and the
790 # recovered group retains the role in the binding.
791 #
792 #
793 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
794 # users of that domain. For example, `google.com` or `example.com`.
795 #
796 "A String",
797 ],
798 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
799 # NOTE: An unsatisfied condition will not allow user access via current
800 # binding. Different bindings, including their conditions, are examined
801 # independently.
802 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
803 # are documented at https://github.com/google/cel-spec.
804 #
805 # Example (Comparison):
806 #
807 # title: "Summary size limit"
808 # description: "Determines if a summary is less than 100 chars"
809 # expression: "document.summary.size() &lt; 100"
810 #
811 # Example (Equality):
812 #
813 # title: "Requestor is owner"
814 # description: "Determines if requestor is the document owner"
815 # expression: "document.owner == request.auth.claims.email"
816 #
817 # Example (Logic):
818 #
819 # title: "Public documents"
820 # description: "Determine whether the document should be publicly visible"
821 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
822 #
823 # Example (Data Manipulation):
824 #
825 # title: "Notification string"
826 # description: "Create a notification string with a timestamp."
827 # expression: "'New message received at ' + string(document.create_time)"
828 #
829 # The exact variables and functions that may be referenced within an expression
830 # are determined by the service that evaluates it. See the service
831 # documentation for additional information.
832 "location": "A String", # Optional. String indicating the location of the expression for error
833 # reporting, e.g. a file name and a position in the file.
834 "expression": "A String", # Textual representation of an expression in Common Expression Language
835 # syntax.
836 "description": "A String", # Optional. Description of the expression. This is a longer text which
837 # describes the expression, e.g. when hovered over it in a UI.
838 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
839 # its purpose. This can be used e.g. in UIs which allow to enter the
840 # expression.
841 },
842 },
843 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700844 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
845 { # Specifies the audit configuration for a service.
846 # The configuration determines which permission types are logged, and what
847 # identities, if any, are exempted from logging.
848 # An AuditConfig must have one or more AuditLogConfigs.
849 #
850 # If there are AuditConfigs for both `allServices` and a specific service,
851 # the union of the two AuditConfigs is used for that service: the log_types
852 # specified in each AuditConfig are enabled, and the exempted_members in each
853 # AuditLogConfig are exempted.
854 #
855 # Example Policy with multiple AuditConfigs:
856 #
857 # {
858 # "audit_configs": [
859 # {
860 # "service": "allServices"
861 # "audit_log_configs": [
862 # {
863 # "log_type": "DATA_READ",
864 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -0700865 # "user:jose@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866 # ]
867 # },
868 # {
869 # "log_type": "DATA_WRITE",
870 # },
871 # {
872 # "log_type": "ADMIN_READ",
873 # }
874 # ]
875 # },
876 # {
Dan O'Mearadd494642020-05-01 07:42:23 -0700877 # "service": "sampleservice.googleapis.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700878 # "audit_log_configs": [
879 # {
880 # "log_type": "DATA_READ",
881 # },
882 # {
883 # "log_type": "DATA_WRITE",
884 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -0700885 # "user:aliya@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 # ]
887 # }
888 # ]
889 # }
890 # ]
891 # }
892 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700893 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
894 # logging. It also exempts jose@example.com from DATA_READ logging, and
895 # aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 "auditLogConfigs": [ # The configuration for logging of each type of permission.
897 { # Provides the configuration for logging a type of permissions.
898 # Example:
899 #
900 # {
901 # "audit_log_configs": [
902 # {
903 # "log_type": "DATA_READ",
904 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -0700905 # "user:jose@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700906 # ]
907 # },
908 # {
909 # "log_type": "DATA_WRITE",
910 # }
911 # ]
912 # }
913 #
914 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
Dan O'Mearadd494642020-05-01 07:42:23 -0700915 # jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
917 # permission.
918 # Follows the same format of Binding.members.
919 "A String",
920 ],
921 "logType": "A String", # The log type that this config enables.
922 },
923 ],
924 "service": "A String", # Specifies a service that will be enabled for audit logging.
925 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
926 # `allServices` is a special value that covers all services.
927 },
928 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700929 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
930 # prevent simultaneous updates of a policy from overwriting each other.
931 # It is strongly suggested that systems make use of the `etag` in the
932 # read-modify-write cycle to perform policy updates in order to avoid race
933 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
934 # systems are expected to put that etag in the request to `setIamPolicy` to
935 # ensure that their change will be applied to the same version of the policy.
936 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700937 # **Important:** If you use IAM Conditions, you must include the `etag` field
938 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
939 # you to overwrite a version `3` policy with a version `1` policy, and all of
940 # the conditions in the version `3` policy are lost.
941 "version": 42, # Specifies the format of the policy.
942 #
943 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
944 # are rejected.
945 #
946 # Any operation that affects conditional role bindings must specify version
947 # `3`. This requirement applies to the following operations:
948 #
949 # * Getting a policy that includes a conditional role binding
950 # * Adding a conditional role binding to a policy
951 # * Changing a conditional role binding in a policy
952 # * Removing any role binding, with or without a condition, from a policy
953 # that includes conditions
954 #
955 # **Important:** If you use IAM Conditions, you must include the `etag` field
956 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
957 # you to overwrite a version `3` policy with a version `1` policy, and all of
958 # the conditions in the version `3` policy are lost.
959 #
960 # If a policy does not include any conditions, operations on that policy may
961 # specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 }</pre>
963</div>
964
965<div class="method">
966 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
967 <pre>Returns a list of functions that belong to the requested project.
968
969Args:
970 parent: string, The project and location from which the function should be listed,
971specified in the format `projects/*/locations/*`
972If you want to list functions in all locations, use "-" in place of a
Dan O'Mearadd494642020-05-01 07:42:23 -0700973location. When listing functions in all locations, if one or more
974location(s) are unreachable, the response will contain functions from all
975reachable locations along with the names of any unreachable locations. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700976 pageSize: integer, Maximum number of functions to return per call.
977 pageToken: string, The value returned by the last
978`ListFunctionsResponse`; indicates that
979this is a continuation of a prior `ListFunctions` call, and that the
980system should return the next page of data.
981 x__xgafv: string, V1 error format.
982 Allowed values
983 1 - v1 error format
984 2 - v2 error format
985
986Returns:
987 An object of the form:
988
989 { # Response for the `ListFunctions` method.
990 "nextPageToken": "A String", # If not empty, indicates that there may be more functions that match
991 # the request; this value should be passed in a new
992 # google.cloud.functions.v1.ListFunctionsRequest
993 # to get more functions.
Dan O'Mearadd494642020-05-01 07:42:23 -0700994 "unreachable": [ # Locations that could not be reached. The response does not include any
995 # functions from these locations.
996 "A String",
997 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700998 "functions": [ # The functions that match the request.
999 { # Describes a Cloud Function that contains user computation executed in
1000 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001 "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
1002 # service.
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions.
1004 # If empty, then defaults to ignoring failures (i.e. not retrying them).
1005 "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.
1006 # A function execution will be retried on any failure.
1007 # A failed execution will be retried up to 7 days with an exponential backoff
1008 # (capped at 10 seconds).
1009 # Retried execution is charged as any other execution.
1010 },
1011 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001012 "resource": "A String", # Required. The resource(s) from which to observe events, for example,
1013 # `projects/_/buckets/myBucket`.
1014 #
1015 # Not all syntactically correct values are accepted by all services. For
1016 # example:
1017 #
1018 # 1. The authorization model must support it. Google Cloud Functions
1019 # only allows EventTriggers to be deployed that observe resources in the
1020 # same project as the `CloudFunction`.
1021 # 2. The resource type must match the pattern expected for an
1022 # `event_type`. For example, an `EventTrigger` that has an
1023 # `event_type` of "google.pubsub.topic.publish" should have a resource
1024 # that matches Google Cloud Pub/Sub topics.
1025 #
1026 # Additionally, some services may support short names when creating an
1027 # `EventTrigger`. These will always be returned in the normalized "long"
1028 # format.
1029 #
1030 # See each *service's* documentation for supported formats.
1031 "service": "A String", # The hostname of the service that should be observed.
1032 #
1033 # If no string is provided, the default service implementing the API will
1034 # be used. For example, `storage.googleapis.com` is the default for all
1035 # event types in the `google.storage` namespace.
Dan O'Mearadd494642020-05-01 07:42:23 -07001036 "eventType": "A String", # Required. The type of event to observe. For example:
1037 # `providers/cloud.storage/eventTypes/object.change` and
1038 # `providers/cloud.pubsub/eventTypes/topic.publish`.
1039 #
1040 # Event types match pattern `providers/*/eventTypes/*.*`.
1041 # The pattern contains:
1042 #
1043 # 1. namespace: For example, `cloud.storage` and
1044 # `google.firebase.analytics`.
1045 # 2. resource type: The type of resource on which event occurs. For
1046 # example, the Google Cloud Storage API includes the type `object`.
1047 # 3. action: The action that generates the event. For example, action for
1048 # a Google Cloud Storage Object is 'change'.
1049 # These parts are lower case.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001050 },
1051 "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 "sourceRepository": { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
1053 #
1054 # The source repository where a function is hosted.
1055 # source repository where a function is hosted.
1056 "url": "A String", # The URL pointing to the hosted repository where the function is defined.
1057 # There are supported Cloud Source Repository URLs in the following
1058 # formats:
1059 #
1060 # To refer to a specific commit:
1061 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
1062 # To refer to a moveable alias (branch):
1063 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
1064 # In particular, to refer to HEAD use `master` moveable alias.
1065 # To refer to a specific fixed alias (tag):
1066 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
1067 #
1068 # You may omit `paths/*` if you want to use the main directory.
1069 "deployedUrl": "A String", # Output only. The URL pointing to the hosted repository where the function
1070 # were defined at the time of deployment. It always points to a specific
1071 # commit in the format described above.
1072 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001073 "httpsTrigger": { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
1074 "url": "A String", # Output only. The deployed url for the function.
1075 },
1076 "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip
1077 # archive which contains the function.
1078 "labels": { # Labels associated with this Cloud Function.
1079 "a_key": "A String",
1080 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001081 "vpcConnectorEgressSettings": "A String", # The egress settings for the connector, controlling what traffic is diverted
1082 # through it.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001083 "network": "A String", # The VPC Network that this cloud function can connect to. It can be
1084 # either the fully-qualified URI, or the short name of the network resource.
1085 # If the short network name is used, the network must belong to the same
1086 # project. Otherwise, it must belong to a project within the same
1087 # organization. The format of this field is either
1088 # `projects/{project}/global/networks/{network}` or `{network}`, where
1089 # {project} is a project id where the network is defined, and {network} is
1090 # the short name of the network.
1091 #
1092 # This field is mutually exclusive with `vpc_connector` and will be replaced
1093 # by it.
1094 #
1095 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1096 # more information on connecting Cloud projects.
Dan O'Mearadd494642020-05-01 07:42:23 -07001097 "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated
1098 # by google.cloud.functions.v1.GenerateUploadUrl
1099 "status": "A String", # Output only. Status of the function deployment.
1100 "description": "A String", # User-provided description of a function.
1101 "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a
1102 # given time.
1103 "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt
1104 # results in a new version of a function being created.
1105 "entryPoint": "A String", # The name of the function (as defined in source code) that will be
1106 # executed. Defaults to the resource name suffix, if not specified. For
1107 # backward compatibility, if function with given name is not found, then the
1108 # system will try to use function named "function".
1109 # For Node.js this is name of a function exported by the module specified
1110 # in `source_location`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001111 "name": "A String", # A user-defined name of the function. Function names must be unique
1112 # globally and match pattern `projects/*/locations/*/functions/*`
Dan O'Mearadd494642020-05-01 07:42:23 -07001113 "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can
1114 # be either the fully-qualified URI, or the short name of the network
1115 # connector resource. The format of this field is
1116 # `projects/*/locations/*/connectors/*`
1117 #
1118 # This field is mutually exclusive with `network` field and will eventually
1119 # replace it.
1120 #
1121 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1122 # more information on connecting Cloud projects.
1123 "environmentVariables": { # Environment variables that shall be available during function execution.
1124 "a_key": "A String",
1125 },
1126 "availableMemoryMb": 42, # The amount of memory in MB available for a function.
1127 # Defaults to 256MB.
1128 "serviceAccountEmail": "A String", # The email of the function's service account. If empty, defaults to
1129 # `{project_id}@appspot.gserviceaccount.com`.
1130 "timeout": "A String", # The function execution timeout. Execution is considered failed and
1131 # can be terminated if the function is not completed at the end of the
1132 # timeout period. Defaults to 60 seconds.
1133 "ingressSettings": "A String", # The ingress settings for the function, controlling what traffic can reach
1134 # it.
1135 "runtime": "A String", # The runtime in which to run the function. Required when deploying a new
1136 # function, optional when updating an existing function. For a complete
1137 # list of possible choices, see the
1138 # [`gcloud` command
1139 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001140 },
1141 ],
1142 }</pre>
1143</div>
1144
1145<div class="method">
1146 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1147 <pre>Retrieves the next page of results.
1148
1149Args:
1150 previous_request: The request for the previous page. (required)
1151 previous_response: The response from the request for the previous page. (required)
1152
1153Returns:
1154 A request object that you can call 'execute()' on to request the next
1155 page. Returns None if there are no more items in the collection.
1156 </pre>
1157</div>
1158
1159<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001160 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001161 <pre>Updates existing function.
1162
1163Args:
1164 name: string, A user-defined name of the function. Function names must be unique
1165globally and match pattern `projects/*/locations/*/functions/*` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001167 The object takes the form of:
1168
1169{ # Describes a Cloud Function that contains user computation executed in
1170 # response to an event. It encapsulate function and triggers configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001171 "eventTrigger": { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
1172 # service.
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 "failurePolicy": { # Describes the policy in case of function's execution failure. # Specifies policy for failed executions.
1174 # If empty, then defaults to ignoring failures (i.e. not retrying them).
1175 "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.
1176 # A function execution will be retried on any failure.
1177 # A failed execution will be retried up to 7 days with an exponential backoff
1178 # (capped at 10 seconds).
1179 # Retried execution is charged as any other execution.
1180 },
1181 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001182 "resource": "A String", # Required. The resource(s) from which to observe events, for example,
1183 # `projects/_/buckets/myBucket`.
1184 #
1185 # Not all syntactically correct values are accepted by all services. For
1186 # example:
1187 #
1188 # 1. The authorization model must support it. Google Cloud Functions
1189 # only allows EventTriggers to be deployed that observe resources in the
1190 # same project as the `CloudFunction`.
1191 # 2. The resource type must match the pattern expected for an
1192 # `event_type`. For example, an `EventTrigger` that has an
1193 # `event_type` of "google.pubsub.topic.publish" should have a resource
1194 # that matches Google Cloud Pub/Sub topics.
1195 #
1196 # Additionally, some services may support short names when creating an
1197 # `EventTrigger`. These will always be returned in the normalized "long"
1198 # format.
1199 #
1200 # See each *service's* documentation for supported formats.
1201 "service": "A String", # The hostname of the service that should be observed.
1202 #
1203 # If no string is provided, the default service implementing the API will
1204 # be used. For example, `storage.googleapis.com` is the default for all
1205 # event types in the `google.storage` namespace.
Dan O'Mearadd494642020-05-01 07:42:23 -07001206 "eventType": "A String", # Required. The type of event to observe. For example:
1207 # `providers/cloud.storage/eventTypes/object.change` and
1208 # `providers/cloud.pubsub/eventTypes/topic.publish`.
1209 #
1210 # Event types match pattern `providers/*/eventTypes/*.*`.
1211 # The pattern contains:
1212 #
1213 # 1. namespace: For example, `cloud.storage` and
1214 # `google.firebase.analytics`.
1215 # 2. resource type: The type of resource on which event occurs. For
1216 # example, the Google Cloud Storage API includes the type `object`.
1217 # 3. action: The action that generates the event. For example, action for
1218 # a Google Cloud Storage Object is 'change'.
1219 # These parts are lower case.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 },
1221 "updateTime": "A String", # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001222 "sourceRepository": { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
1223 #
1224 # The source repository where a function is hosted.
1225 # source repository where a function is hosted.
1226 "url": "A String", # The URL pointing to the hosted repository where the function is defined.
1227 # There are supported Cloud Source Repository URLs in the following
1228 # formats:
1229 #
1230 # To refer to a specific commit:
1231 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
1232 # To refer to a moveable alias (branch):
1233 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
1234 # In particular, to refer to HEAD use `master` moveable alias.
1235 # To refer to a specific fixed alias (tag):
1236 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
1237 #
1238 # You may omit `paths/*` if you want to use the main directory.
1239 "deployedUrl": "A String", # Output only. The URL pointing to the hosted repository where the function
1240 # were defined at the time of deployment. It always points to a specific
1241 # commit in the format described above.
1242 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001243 "httpsTrigger": { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
1244 "url": "A String", # Output only. The deployed url for the function.
1245 },
1246 "sourceArchiveUrl": "A String", # The Google Cloud Storage URL, starting with gs://, pointing to the zip
1247 # archive which contains the function.
1248 "labels": { # Labels associated with this Cloud Function.
1249 "a_key": "A String",
1250 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001251 "vpcConnectorEgressSettings": "A String", # The egress settings for the connector, controlling what traffic is diverted
1252 # through it.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001253 "network": "A String", # The VPC Network that this cloud function can connect to. It can be
1254 # either the fully-qualified URI, or the short name of the network resource.
1255 # If the short network name is used, the network must belong to the same
1256 # project. Otherwise, it must belong to a project within the same
1257 # organization. The format of this field is either
1258 # `projects/{project}/global/networks/{network}` or `{network}`, where
1259 # {project} is a project id where the network is defined, and {network} is
1260 # the short name of the network.
1261 #
1262 # This field is mutually exclusive with `vpc_connector` and will be replaced
1263 # by it.
1264 #
1265 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1266 # more information on connecting Cloud projects.
Dan O'Mearadd494642020-05-01 07:42:23 -07001267 "sourceUploadUrl": "A String", # The Google Cloud Storage signed URL used for source uploading, generated
1268 # by google.cloud.functions.v1.GenerateUploadUrl
1269 "status": "A String", # Output only. Status of the function deployment.
1270 "description": "A String", # User-provided description of a function.
1271 "maxInstances": 42, # The limit on the maximum number of function instances that may coexist at a
1272 # given time.
1273 "versionId": "A String", # Output only. The version identifier of the Cloud Function. Each deployment attempt
1274 # results in a new version of a function being created.
1275 "entryPoint": "A String", # The name of the function (as defined in source code) that will be
1276 # executed. Defaults to the resource name suffix, if not specified. For
1277 # backward compatibility, if function with given name is not found, then the
1278 # system will try to use function named "function".
1279 # For Node.js this is name of a function exported by the module specified
1280 # in `source_location`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001281 "name": "A String", # A user-defined name of the function. Function names must be unique
1282 # globally and match pattern `projects/*/locations/*/functions/*`
Dan O'Mearadd494642020-05-01 07:42:23 -07001283 "vpcConnector": "A String", # The VPC Network Connector that this cloud function can connect to. It can
1284 # be either the fully-qualified URI, or the short name of the network
1285 # connector resource. The format of this field is
1286 # `projects/*/locations/*/connectors/*`
1287 #
1288 # This field is mutually exclusive with `network` field and will eventually
1289 # replace it.
1290 #
1291 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1292 # more information on connecting Cloud projects.
1293 "environmentVariables": { # Environment variables that shall be available during function execution.
1294 "a_key": "A String",
1295 },
1296 "availableMemoryMb": 42, # The amount of memory in MB available for a function.
1297 # Defaults to 256MB.
1298 "serviceAccountEmail": "A String", # The email of the function's service account. If empty, defaults to
1299 # `{project_id}@appspot.gserviceaccount.com`.
1300 "timeout": "A String", # The function execution timeout. Execution is considered failed and
1301 # can be terminated if the function is not completed at the end of the
1302 # timeout period. Defaults to 60 seconds.
1303 "ingressSettings": "A String", # The ingress settings for the function, controlling what traffic can reach
1304 # it.
1305 "runtime": "A String", # The runtime in which to run the function. Required when deploying a new
1306 # function, optional when updating an existing function. For a complete
1307 # list of possible choices, see the
1308 # [`gcloud` command
1309 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 }
1311
1312 updateMask: string, Required list of fields to be updated in this request.
1313 x__xgafv: string, V1 error format.
1314 Allowed values
1315 1 - v1 error format
1316 2 - v2 error format
1317
1318Returns:
1319 An object of the form:
1320
1321 { # This resource represents a long-running operation that is the result of a
1322 # network API call.
1323 "metadata": { # Service-specific metadata associated with the operation. It typically
1324 # contains progress information and common metadata such as create time.
1325 # Some services might not provide such metadata. Any method that returns a
1326 # long-running operation should document the metadata type, if any.
1327 "a_key": "", # Properties of the object. Contains field @type with type URL.
1328 },
1329 "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.
1330 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -07001331 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1332 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001333 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001334 # You can find out more about this error model and how to work with it in the
1335 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001336 "message": "A String", # A developer-facing error message, which should be in English. Any
1337 # user-facing error message should be localized and sent in the
1338 # google.rpc.Status.details field, or localized by the client.
1339 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
1340 "details": [ # A list of messages that carry the error details. There is a common set of
1341 # message types for APIs to use.
1342 {
1343 "a_key": "", # Properties of the object. Contains field @type with type URL.
1344 },
1345 ],
1346 },
1347 "done": True or False, # If the value is `false`, it means the operation is still in progress.
1348 # If `true`, the operation is completed, and either `error` or `response` is
1349 # available.
1350 "response": { # The normal response of the operation in case of success. If the original
1351 # method returns no data on success, such as `Delete`, the response is
1352 # `google.protobuf.Empty`. If the original method is standard
1353 # `Get`/`Create`/`Update`, the response should be the resource. For other
1354 # methods, the response should have the type `XxxResponse`, where `Xxx`
1355 # is the original method name. For example, if the original method name
1356 # is `TakeSnapshot()`, the inferred response type is
1357 # `TakeSnapshotResponse`.
1358 "a_key": "", # Properties of the object. Contains field @type with type URL.
1359 },
1360 "name": "A String", # The server-assigned name, which is only unique within the same service that
1361 # originally returns it. If you use the default HTTP mapping, the
1362 # `name` should be a resource name ending with `operations/{unique_id}`.
1363 }</pre>
1364</div>
1365
1366<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001367 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001368 <pre>Sets the IAM access control policy on the specified function.
1369Replaces any existing policy.
1370
1371Args:
1372 resource: string, REQUIRED: The resource for which the policy is being specified.
1373See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001374 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001375 The object takes the form of:
1376
1377{ # Request message for `SetIamPolicy` method.
Dan O'Mearadd494642020-05-01 07:42:23 -07001378 "policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001379 # the policy is limited to a few 10s of KB. An empty policy is a
1380 # valid policy but certain Cloud Platform services (such as Projects)
1381 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07001382 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001383 #
1384 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001385 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1386 # `members` to a single `role`. Members can be user accounts, service accounts,
1387 # Google groups, and domains (such as G Suite). A `role` is a named list of
1388 # permissions; each `role` can be an IAM predefined role or a user-created
1389 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001390 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001391 # Optionally, a `binding` can specify a `condition`, which is a logical
1392 # expression that allows access to a resource only if the expression evaluates
1393 # to `true`. A condition can add constraints based on attributes of the
1394 # request, the resource, or both.
1395 #
1396 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001397 #
1398 # {
1399 # "bindings": [
1400 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001401 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001402 # "members": [
1403 # "user:mike@example.com",
1404 # "group:admins@example.com",
1405 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -07001406 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001407 # ]
1408 # },
1409 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001410 # "role": "roles/resourcemanager.organizationViewer",
1411 # "members": ["user:eve@example.com"],
1412 # "condition": {
1413 # "title": "expirable access",
1414 # "description": "Does not grant access after Sep 2020",
1415 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
1416 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001417 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001418 # ],
1419 # "etag": "BwWWja0YfJA=",
1420 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001421 # }
1422 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001423 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001424 #
1425 # bindings:
1426 # - members:
1427 # - user:mike@example.com
1428 # - group:admins@example.com
1429 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001430 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1431 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001432 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001433 # - user:eve@example.com
1434 # role: roles/resourcemanager.organizationViewer
1435 # condition:
1436 # title: expirable access
1437 # description: Does not grant access after Sep 2020
1438 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
1439 # - etag: BwWWja0YfJA=
1440 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001441 #
1442 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001443 # [IAM documentation](https://cloud.google.com/iam/docs/).
1444 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
1445 # `condition` that determines how and when the `bindings` are applied. Each
1446 # of the `bindings` must contain at least one member.
1447 { # Associates `members` with a `role`.
1448 "role": "A String", # Role that is assigned to `members`.
1449 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1450 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
1451 # `members` can have the following values:
1452 #
1453 # * `allUsers`: A special identifier that represents anyone who is
1454 # on the internet; with or without a Google account.
1455 #
1456 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1457 # who is authenticated with a Google account or a service account.
1458 #
1459 # * `user:{emailid}`: An email address that represents a specific Google
1460 # account. For example, `alice@example.com` .
1461 #
1462 #
1463 # * `serviceAccount:{emailid}`: An email address that represents a service
1464 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1465 #
1466 # * `group:{emailid}`: An email address that represents a Google group.
1467 # For example, `admins@example.com`.
1468 #
1469 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1470 # identifier) representing a user that has been recently deleted. For
1471 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1472 # recovered, this value reverts to `user:{emailid}` and the recovered user
1473 # retains the role in the binding.
1474 #
1475 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1476 # unique identifier) representing a service account that has been recently
1477 # deleted. For example,
1478 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1479 # If the service account is undeleted, this value reverts to
1480 # `serviceAccount:{emailid}` and the undeleted service account retains the
1481 # role in the binding.
1482 #
1483 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1484 # identifier) representing a Google group that has been recently
1485 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1486 # the group is recovered, this value reverts to `group:{emailid}` and the
1487 # recovered group retains the role in the binding.
1488 #
1489 #
1490 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1491 # users of that domain. For example, `google.com` or `example.com`.
1492 #
1493 "A String",
1494 ],
1495 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1496 # NOTE: An unsatisfied condition will not allow user access via current
1497 # binding. Different bindings, including their conditions, are examined
1498 # independently.
1499 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1500 # are documented at https://github.com/google/cel-spec.
1501 #
1502 # Example (Comparison):
1503 #
1504 # title: "Summary size limit"
1505 # description: "Determines if a summary is less than 100 chars"
1506 # expression: "document.summary.size() &lt; 100"
1507 #
1508 # Example (Equality):
1509 #
1510 # title: "Requestor is owner"
1511 # description: "Determines if requestor is the document owner"
1512 # expression: "document.owner == request.auth.claims.email"
1513 #
1514 # Example (Logic):
1515 #
1516 # title: "Public documents"
1517 # description: "Determine whether the document should be publicly visible"
1518 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1519 #
1520 # Example (Data Manipulation):
1521 #
1522 # title: "Notification string"
1523 # description: "Create a notification string with a timestamp."
1524 # expression: "'New message received at ' + string(document.create_time)"
1525 #
1526 # The exact variables and functions that may be referenced within an expression
1527 # are determined by the service that evaluates it. See the service
1528 # documentation for additional information.
1529 "location": "A String", # Optional. String indicating the location of the expression for error
1530 # reporting, e.g. a file name and a position in the file.
1531 "expression": "A String", # Textual representation of an expression in Common Expression Language
1532 # syntax.
1533 "description": "A String", # Optional. Description of the expression. This is a longer text which
1534 # describes the expression, e.g. when hovered over it in a UI.
1535 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
1536 # its purpose. This can be used e.g. in UIs which allow to enter the
1537 # expression.
1538 },
1539 },
1540 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001541 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1542 { # Specifies the audit configuration for a service.
1543 # The configuration determines which permission types are logged, and what
1544 # identities, if any, are exempted from logging.
1545 # An AuditConfig must have one or more AuditLogConfigs.
1546 #
1547 # If there are AuditConfigs for both `allServices` and a specific service,
1548 # the union of the two AuditConfigs is used for that service: the log_types
1549 # specified in each AuditConfig are enabled, and the exempted_members in each
1550 # AuditLogConfig are exempted.
1551 #
1552 # Example Policy with multiple AuditConfigs:
1553 #
1554 # {
1555 # "audit_configs": [
1556 # {
1557 # "service": "allServices"
1558 # "audit_log_configs": [
1559 # {
1560 # "log_type": "DATA_READ",
1561 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07001562 # "user:jose@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001563 # ]
1564 # },
1565 # {
1566 # "log_type": "DATA_WRITE",
1567 # },
1568 # {
1569 # "log_type": "ADMIN_READ",
1570 # }
1571 # ]
1572 # },
1573 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001574 # "service": "sampleservice.googleapis.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 # "audit_log_configs": [
1576 # {
1577 # "log_type": "DATA_READ",
1578 # },
1579 # {
1580 # "log_type": "DATA_WRITE",
1581 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07001582 # "user:aliya@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001583 # ]
1584 # }
1585 # ]
1586 # }
1587 # ]
1588 # }
1589 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001590 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1591 # logging. It also exempts jose@example.com from DATA_READ logging, and
1592 # aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001593 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1594 { # Provides the configuration for logging a type of permissions.
1595 # Example:
1596 #
1597 # {
1598 # "audit_log_configs": [
1599 # {
1600 # "log_type": "DATA_READ",
1601 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07001602 # "user:jose@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001603 # ]
1604 # },
1605 # {
1606 # "log_type": "DATA_WRITE",
1607 # }
1608 # ]
1609 # }
1610 #
1611 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
Dan O'Mearadd494642020-05-01 07:42:23 -07001612 # jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001613 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
1614 # permission.
1615 # Follows the same format of Binding.members.
1616 "A String",
1617 ],
1618 "logType": "A String", # The log type that this config enables.
1619 },
1620 ],
1621 "service": "A String", # Specifies a service that will be enabled for audit logging.
1622 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1623 # `allServices` is a special value that covers all services.
1624 },
1625 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001626 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1627 # prevent simultaneous updates of a policy from overwriting each other.
1628 # It is strongly suggested that systems make use of the `etag` in the
1629 # read-modify-write cycle to perform policy updates in order to avoid race
1630 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1631 # systems are expected to put that etag in the request to `setIamPolicy` to
1632 # ensure that their change will be applied to the same version of the policy.
1633 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001634 # **Important:** If you use IAM Conditions, you must include the `etag` field
1635 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1636 # you to overwrite a version `3` policy with a version `1` policy, and all of
1637 # the conditions in the version `3` policy are lost.
1638 "version": 42, # Specifies the format of the policy.
1639 #
1640 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1641 # are rejected.
1642 #
1643 # Any operation that affects conditional role bindings must specify version
1644 # `3`. This requirement applies to the following operations:
1645 #
1646 # * Getting a policy that includes a conditional role binding
1647 # * Adding a conditional role binding to a policy
1648 # * Changing a conditional role binding in a policy
1649 # * Removing any role binding, with or without a condition, from a policy
1650 # that includes conditions
1651 #
1652 # **Important:** If you use IAM Conditions, you must include the `etag` field
1653 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1654 # you to overwrite a version `3` policy with a version `1` policy, and all of
1655 # the conditions in the version `3` policy are lost.
1656 #
1657 # If a policy does not include any conditions, operations on that policy may
1658 # specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001659 },
1660 "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1661 # the fields in the mask will be modified. If no mask is provided, the
1662 # following default mask is used:
1663 # paths: "bindings, etag"
1664 # This field is only used by Cloud IAM.
1665 }
1666
1667 x__xgafv: string, V1 error format.
1668 Allowed values
1669 1 - v1 error format
1670 2 - v2 error format
1671
1672Returns:
1673 An object of the form:
1674
Dan O'Mearadd494642020-05-01 07:42:23 -07001675 { # An Identity and Access Management (IAM) policy, which specifies access
1676 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001677 #
1678 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001679 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1680 # `members` to a single `role`. Members can be user accounts, service accounts,
1681 # Google groups, and domains (such as G Suite). A `role` is a named list of
1682 # permissions; each `role` can be an IAM predefined role or a user-created
1683 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001684 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001685 # Optionally, a `binding` can specify a `condition`, which is a logical
1686 # expression that allows access to a resource only if the expression evaluates
1687 # to `true`. A condition can add constraints based on attributes of the
1688 # request, the resource, or both.
1689 #
1690 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001691 #
1692 # {
1693 # "bindings": [
1694 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001695 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001696 # "members": [
1697 # "user:mike@example.com",
1698 # "group:admins@example.com",
1699 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -07001700 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001701 # ]
1702 # },
1703 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001704 # "role": "roles/resourcemanager.organizationViewer",
1705 # "members": ["user:eve@example.com"],
1706 # "condition": {
1707 # "title": "expirable access",
1708 # "description": "Does not grant access after Sep 2020",
1709 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
1710 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001711 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001712 # ],
1713 # "etag": "BwWWja0YfJA=",
1714 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001715 # }
1716 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001717 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001718 #
1719 # bindings:
1720 # - members:
1721 # - user:mike@example.com
1722 # - group:admins@example.com
1723 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001724 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1725 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001726 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001727 # - user:eve@example.com
1728 # role: roles/resourcemanager.organizationViewer
1729 # condition:
1730 # title: expirable access
1731 # description: Does not grant access after Sep 2020
1732 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
1733 # - etag: BwWWja0YfJA=
1734 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001735 #
1736 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001737 # [IAM documentation](https://cloud.google.com/iam/docs/).
1738 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
1739 # `condition` that determines how and when the `bindings` are applied. Each
1740 # of the `bindings` must contain at least one member.
1741 { # Associates `members` with a `role`.
1742 "role": "A String", # Role that is assigned to `members`.
1743 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1744 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
1745 # `members` can have the following values:
1746 #
1747 # * `allUsers`: A special identifier that represents anyone who is
1748 # on the internet; with or without a Google account.
1749 #
1750 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1751 # who is authenticated with a Google account or a service account.
1752 #
1753 # * `user:{emailid}`: An email address that represents a specific Google
1754 # account. For example, `alice@example.com` .
1755 #
1756 #
1757 # * `serviceAccount:{emailid}`: An email address that represents a service
1758 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1759 #
1760 # * `group:{emailid}`: An email address that represents a Google group.
1761 # For example, `admins@example.com`.
1762 #
1763 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1764 # identifier) representing a user that has been recently deleted. For
1765 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1766 # recovered, this value reverts to `user:{emailid}` and the recovered user
1767 # retains the role in the binding.
1768 #
1769 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1770 # unique identifier) representing a service account that has been recently
1771 # deleted. For example,
1772 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1773 # If the service account is undeleted, this value reverts to
1774 # `serviceAccount:{emailid}` and the undeleted service account retains the
1775 # role in the binding.
1776 #
1777 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1778 # identifier) representing a Google group that has been recently
1779 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1780 # the group is recovered, this value reverts to `group:{emailid}` and the
1781 # recovered group retains the role in the binding.
1782 #
1783 #
1784 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1785 # users of that domain. For example, `google.com` or `example.com`.
1786 #
1787 "A String",
1788 ],
1789 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1790 # NOTE: An unsatisfied condition will not allow user access via current
1791 # binding. Different bindings, including their conditions, are examined
1792 # independently.
1793 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1794 # are documented at https://github.com/google/cel-spec.
1795 #
1796 # Example (Comparison):
1797 #
1798 # title: "Summary size limit"
1799 # description: "Determines if a summary is less than 100 chars"
1800 # expression: "document.summary.size() &lt; 100"
1801 #
1802 # Example (Equality):
1803 #
1804 # title: "Requestor is owner"
1805 # description: "Determines if requestor is the document owner"
1806 # expression: "document.owner == request.auth.claims.email"
1807 #
1808 # Example (Logic):
1809 #
1810 # title: "Public documents"
1811 # description: "Determine whether the document should be publicly visible"
1812 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1813 #
1814 # Example (Data Manipulation):
1815 #
1816 # title: "Notification string"
1817 # description: "Create a notification string with a timestamp."
1818 # expression: "'New message received at ' + string(document.create_time)"
1819 #
1820 # The exact variables and functions that may be referenced within an expression
1821 # are determined by the service that evaluates it. See the service
1822 # documentation for additional information.
1823 "location": "A String", # Optional. String indicating the location of the expression for error
1824 # reporting, e.g. a file name and a position in the file.
1825 "expression": "A String", # Textual representation of an expression in Common Expression Language
1826 # syntax.
1827 "description": "A String", # Optional. Description of the expression. This is a longer text which
1828 # describes the expression, e.g. when hovered over it in a UI.
1829 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
1830 # its purpose. This can be used e.g. in UIs which allow to enter the
1831 # expression.
1832 },
1833 },
1834 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001835 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1836 { # Specifies the audit configuration for a service.
1837 # The configuration determines which permission types are logged, and what
1838 # identities, if any, are exempted from logging.
1839 # An AuditConfig must have one or more AuditLogConfigs.
1840 #
1841 # If there are AuditConfigs for both `allServices` and a specific service,
1842 # the union of the two AuditConfigs is used for that service: the log_types
1843 # specified in each AuditConfig are enabled, and the exempted_members in each
1844 # AuditLogConfig are exempted.
1845 #
1846 # Example Policy with multiple AuditConfigs:
1847 #
1848 # {
1849 # "audit_configs": [
1850 # {
1851 # "service": "allServices"
1852 # "audit_log_configs": [
1853 # {
1854 # "log_type": "DATA_READ",
1855 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07001856 # "user:jose@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001857 # ]
1858 # },
1859 # {
1860 # "log_type": "DATA_WRITE",
1861 # },
1862 # {
1863 # "log_type": "ADMIN_READ",
1864 # }
1865 # ]
1866 # },
1867 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001868 # "service": "sampleservice.googleapis.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001869 # "audit_log_configs": [
1870 # {
1871 # "log_type": "DATA_READ",
1872 # },
1873 # {
1874 # "log_type": "DATA_WRITE",
1875 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07001876 # "user:aliya@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001877 # ]
1878 # }
1879 # ]
1880 # }
1881 # ]
1882 # }
1883 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001884 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1885 # logging. It also exempts jose@example.com from DATA_READ logging, and
1886 # aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001887 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1888 { # Provides the configuration for logging a type of permissions.
1889 # Example:
1890 #
1891 # {
1892 # "audit_log_configs": [
1893 # {
1894 # "log_type": "DATA_READ",
1895 # "exempted_members": [
Dan O'Mearadd494642020-05-01 07:42:23 -07001896 # "user:jose@example.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001897 # ]
1898 # },
1899 # {
1900 # "log_type": "DATA_WRITE",
1901 # }
1902 # ]
1903 # }
1904 #
1905 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
Dan O'Mearadd494642020-05-01 07:42:23 -07001906 # jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001907 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of
1908 # permission.
1909 # Follows the same format of Binding.members.
1910 "A String",
1911 ],
1912 "logType": "A String", # The log type that this config enables.
1913 },
1914 ],
1915 "service": "A String", # Specifies a service that will be enabled for audit logging.
1916 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1917 # `allServices` is a special value that covers all services.
1918 },
1919 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001920 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1921 # prevent simultaneous updates of a policy from overwriting each other.
1922 # It is strongly suggested that systems make use of the `etag` in the
1923 # read-modify-write cycle to perform policy updates in order to avoid race
1924 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1925 # systems are expected to put that etag in the request to `setIamPolicy` to
1926 # ensure that their change will be applied to the same version of the policy.
1927 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001928 # **Important:** If you use IAM Conditions, you must include the `etag` field
1929 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1930 # you to overwrite a version `3` policy with a version `1` policy, and all of
1931 # the conditions in the version `3` policy are lost.
1932 "version": 42, # Specifies the format of the policy.
1933 #
1934 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1935 # are rejected.
1936 #
1937 # Any operation that affects conditional role bindings must specify version
1938 # `3`. This requirement applies to the following operations:
1939 #
1940 # * Getting a policy that includes a conditional role binding
1941 # * Adding a conditional role binding to a policy
1942 # * Changing a conditional role binding in a policy
1943 # * Removing any role binding, with or without a condition, from a policy
1944 # that includes conditions
1945 #
1946 # **Important:** If you use IAM Conditions, you must include the `etag` field
1947 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1948 # you to overwrite a version `3` policy with a version `1` policy, and all of
1949 # the conditions in the version `3` policy are lost.
1950 #
1951 # If a policy does not include any conditions, operations on that policy may
1952 # specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001953 }</pre>
1954</div>
1955
1956<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001957 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001958 <pre>Tests the specified permissions against the IAM access control policy
1959for a function.
1960If the function does not exist, this will return an empty set of
1961permissions, not a NOT_FOUND error.
1962
1963Args:
1964 resource: string, REQUIRED: The resource for which the policy detail is being requested.
1965See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001966 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001967 The object takes the form of:
1968
1969{ # Request message for `TestIamPermissions` method.
1970 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
1971 # wildcards (such as '*' or 'storage.*') are not allowed. For more
1972 # information see
1973 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
1974 "A String",
1975 ],
1976 }
1977
1978 x__xgafv: string, V1 error format.
1979 Allowed values
1980 1 - v1 error format
1981 2 - v2 error format
1982
1983Returns:
1984 An object of the form:
1985
1986 { # Response message for `TestIamPermissions` method.
1987 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1988 # allowed.
1989 "A String",
1990 ],
1991 }</pre>
1992</div>
1993
1994</body></html>