blob: 2128649af840b1f5e66d98499e276b71bd5e8af3 [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">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700127 &quot;data&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &quot;executionId&quot;: &quot;A String&quot;, # Execution id of function invocation.
140 &quot;result&quot;: &quot;A String&quot;, # Result populated for successful execution of synchronous function. Will
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 # not be populated if function does not return a result through context.
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 &quot;error&quot;: &quot;A String&quot;, # Either system or user-function generated error. Set if execution
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700143 # 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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700160 # response to an event. It encapsulate function and triggers configurations.
161 &quot;httpsTrigger&quot;: { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
162 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
163 },
164 &quot;vpcConnectorEgressSettings&quot;: &quot;A String&quot;, # The egress settings for the connector, controlling what traffic is diverted
165 # through it.
166 &quot;ingressSettings&quot;: &quot;A String&quot;, # The ingress settings for the function, controlling what traffic can reach
167 # it.
168 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
169 # `{project_id}@appspot.gserviceaccount.com`.
170 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
171 # given time.
172 &quot;description&quot;: &quot;A String&quot;, # User-provided description of a function.
173 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
174 &quot;a_key&quot;: &quot;A String&quot;,
175 },
176 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
177 &quot;eventTrigger&quot;: { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
178 # service.
179 &quot;eventType&quot;: &quot;A String&quot;, # Required. The type of event to observe. For example:
180 # `providers/cloud.storage/eventTypes/object.change` and
181 # `providers/cloud.pubsub/eventTypes/topic.publish`.
182 #
183 # Event types match pattern `providers/*/eventTypes/*.*`.
184 # The pattern contains:
185 #
186 # 1. namespace: For example, `cloud.storage` and
187 # `google.firebase.analytics`.
188 # 2. resource type: The type of resource on which event occurs. For
189 # example, the Google Cloud Storage API includes the type `object`.
190 # 3. action: The action that generates the event. For example, action for
191 # a Google Cloud Storage Object is &#x27;change&#x27;.
192 # These parts are lower case.
193 &quot;resource&quot;: &quot;A String&quot;, # Required. The resource(s) from which to observe events, for example,
194 # `projects/_/buckets/myBucket`.
195 #
196 # Not all syntactically correct values are accepted by all services. For
197 # example:
198 #
199 # 1. The authorization model must support it. Google Cloud Functions
200 # only allows EventTriggers to be deployed that observe resources in the
201 # same project as the `CloudFunction`.
202 # 2. The resource type must match the pattern expected for an
203 # `event_type`. For example, an `EventTrigger` that has an
204 # `event_type` of &quot;google.pubsub.topic.publish&quot; should have a resource
205 # that matches Google Cloud Pub/Sub topics.
206 #
207 # Additionally, some services may support short names when creating an
208 # `EventTrigger`. These will always be returned in the normalized &quot;long&quot;
209 # format.
210 #
211 # See each *service&#x27;s* documentation for supported formats.
212 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
213 #
214 # If no string is provided, the default service implementing the API will
215 # be used. For example, `storage.googleapis.com` is the default for all
216 # event types in the `google.storage` namespace.
217 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
218 # If empty, then defaults to ignoring failures (i.e. not retrying them).
219 &quot;retry&quot;: { # Describes the retry policy in case of function&#x27;s execution failure. # If specified, then the function will be retried in case of a failure.
220 # A function execution will be retried on any failure.
221 # A failed execution will be retried up to 7 days with an exponential backoff
222 # (capped at 10 seconds).
223 # Retried execution is charged as any other execution.
224 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700227 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
228 # by google.cloud.functions.v1.GenerateUploadUrl
229 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
230 # can be terminated if the function is not completed at the end of the
231 # timeout period. Defaults to 60 seconds.
232 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
233 # Defaults to 256MB.
234 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
235 # globally and match pattern `projects/*/locations/*/functions/*`
236 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
237 # function, optional when updating an existing function. For a complete
238 # list of possible choices, see the
239 # [`gcloud` command
240 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
241 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
242 # results in a new version of a function being created.
243 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
244 # archive which contains the function.
245 &quot;sourceRepository&quot;: { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
246 #
247 # The source repository where a function is hosted.
248 # source repository where a function is hosted.
249 &quot;url&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
250 # There are supported Cloud Source Repository URLs in the following
251 # formats:
252 #
253 # To refer to a specific commit:
254 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
255 # To refer to a moveable alias (branch):
256 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
257 # In particular, to refer to HEAD use `master` moveable alias.
258 # To refer to a specific fixed alias (tag):
259 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
260 #
261 # You may omit `paths/*` if you want to use the main directory.
262 &quot;deployedUrl&quot;: &quot;A String&quot;, # Output only. The URL pointing to the hosted repository where the function
263 # were defined at the time of deployment. It always points to a specific
264 # commit in the format described above.
265 },
266 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
267 # either the fully-qualified URI, or the short name of the network resource.
268 # If the short network name is used, the network must belong to the same
269 # project. Otherwise, it must belong to a project within the same
270 # organization. The format of this field is either
271 # `projects/{project}/global/networks/{network}` or `{network}`, where
272 # {project} is a project id where the network is defined, and {network} is
273 # the short name of the network.
274 #
275 # This field is mutually exclusive with `vpc_connector` and will be replaced
276 # by it.
277 #
278 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
279 # more information on connecting Cloud projects.
280 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
281 # be either the fully-qualified URI, or the short name of the network
282 # connector resource. The format of this field is
283 # `projects/*/locations/*/connectors/*`
284 #
285 # This field is mutually exclusive with `network` field and will eventually
286 # replace it.
287 #
288 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
289 # more information on connecting Cloud projects.
290 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
291 # executed. Defaults to the resource name suffix, if not specified. For
292 # backward compatibility, if function with given name is not found, then the
293 # system will try to use function named &quot;function&quot;.
294 # For Node.js this is name of a function exported by the module specified
295 # in `source_location`.
296 &quot;labels&quot;: { # Labels associated with this Cloud Function.
297 &quot;a_key&quot;: &quot;A String&quot;,
298 },
299 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
300 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 # If `true`, the operation is completed, and either `error` or `response` is
314 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 # method returns no data on success, such as `Delete`, the response is
317 # `google.protobuf.Empty`. If the original method is standard
318 # `Get`/`Create`/`Update`, the response should be the resource. For other
319 # methods, the response should have the type `XxxResponse`, where `Xxx`
320 # is the original method name. For example, if the original method name
321 # is `TakeSnapshot()`, the inferred response type is
322 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700323 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700325 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 # originally returns it. If you use the default HTTP mapping, the
327 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700328 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
329 # different programming environments, including REST APIs and RPC APIs. It is
330 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
331 # three pieces of data: error code, error message, and error details.
332 #
333 # You can find out more about this error model and how to work with it in the
334 # [API Design Guide](https://cloud.google.com/apis/design/errors).
335 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
336 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
337 # user-facing error message should be localized and sent in the
338 # google.rpc.Status.details field, or localized by the client.
339 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
340 # message types for APIs to use.
341 {
342 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
343 },
344 ],
345 },
346 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
347 # contains progress information and common metadata such as create time.
348 # Some services might not provide such metadata. Any method that returns a
349 # long-running operation should document the metadata type, if any.
350 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
351 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700352 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 # If `true`, the operation is completed, and either `error` or `response` is
375 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 # method returns no data on success, such as `Delete`, the response is
378 # `google.protobuf.Empty`. If the original method is standard
379 # `Get`/`Create`/`Update`, the response should be the resource. For other
380 # methods, the response should have the type `XxxResponse`, where `Xxx`
381 # is the original method name. For example, if the original method name
382 # is `TakeSnapshot()`, the inferred response type is
383 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700387 # originally returns it. If you use the default HTTP mapping, the
388 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700389 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
390 # different programming environments, including REST APIs and RPC APIs. It is
391 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
392 # three pieces of data: error code, error message, and error details.
393 #
394 # You can find out more about this error model and how to work with it in the
395 # [API Design Guide](https://cloud.google.com/apis/design/errors).
396 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
397 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
398 # user-facing error message should be localized and sent in the
399 # google.rpc.Status.details field, or localized by the client.
400 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
401 # message types for APIs to use.
402 {
403 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
404 },
405 ],
406 },
407 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
408 # contains progress information and common metadata such as create time.
409 # Some services might not provide such metadata. Any method that returns a
410 # long-running operation should document the metadata type, if any.
411 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
412 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700431 &quot;versionId&quot;: &quot;A String&quot;, # The optional version of function. If not set, default, current version
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700432 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700444 &quot;downloadUrl&quot;: &quot;A String&quot;, # The generated Google Cloud Storage signed URL that should be used for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700445 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 &quot;uploadUrl&quot;: &quot;A String&quot;, # The generated Google Cloud Storage signed URL that should be used for a
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 # 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
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700516 # response to an event. It encapsulate function and triggers configurations.
517 &quot;httpsTrigger&quot;: { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
518 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
519 },
520 &quot;vpcConnectorEgressSettings&quot;: &quot;A String&quot;, # The egress settings for the connector, controlling what traffic is diverted
521 # through it.
522 &quot;ingressSettings&quot;: &quot;A String&quot;, # The ingress settings for the function, controlling what traffic can reach
523 # it.
524 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
525 # `{project_id}@appspot.gserviceaccount.com`.
526 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
527 # given time.
528 &quot;description&quot;: &quot;A String&quot;, # User-provided description of a function.
529 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
530 &quot;a_key&quot;: &quot;A String&quot;,
531 },
532 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
533 &quot;eventTrigger&quot;: { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
534 # service.
535 &quot;eventType&quot;: &quot;A String&quot;, # Required. The type of event to observe. For example:
536 # `providers/cloud.storage/eventTypes/object.change` and
537 # `providers/cloud.pubsub/eventTypes/topic.publish`.
538 #
539 # Event types match pattern `providers/*/eventTypes/*.*`.
540 # The pattern contains:
541 #
542 # 1. namespace: For example, `cloud.storage` and
543 # `google.firebase.analytics`.
544 # 2. resource type: The type of resource on which event occurs. For
545 # example, the Google Cloud Storage API includes the type `object`.
546 # 3. action: The action that generates the event. For example, action for
547 # a Google Cloud Storage Object is &#x27;change&#x27;.
548 # These parts are lower case.
549 &quot;resource&quot;: &quot;A String&quot;, # Required. The resource(s) from which to observe events, for example,
550 # `projects/_/buckets/myBucket`.
551 #
552 # Not all syntactically correct values are accepted by all services. For
553 # example:
554 #
555 # 1. The authorization model must support it. Google Cloud Functions
556 # only allows EventTriggers to be deployed that observe resources in the
557 # same project as the `CloudFunction`.
558 # 2. The resource type must match the pattern expected for an
559 # `event_type`. For example, an `EventTrigger` that has an
560 # `event_type` of &quot;google.pubsub.topic.publish&quot; should have a resource
561 # that matches Google Cloud Pub/Sub topics.
562 #
563 # Additionally, some services may support short names when creating an
564 # `EventTrigger`. These will always be returned in the normalized &quot;long&quot;
565 # format.
566 #
567 # See each *service&#x27;s* documentation for supported formats.
568 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
569 #
570 # If no string is provided, the default service implementing the API will
571 # be used. For example, `storage.googleapis.com` is the default for all
572 # event types in the `google.storage` namespace.
573 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
574 # If empty, then defaults to ignoring failures (i.e. not retrying them).
575 &quot;retry&quot;: { # Describes the retry policy in case of function&#x27;s execution failure. # If specified, then the function will be retried in case of a failure.
576 # A function execution will be retried on any failure.
577 # A failed execution will be retried up to 7 days with an exponential backoff
578 # (capped at 10 seconds).
579 # Retried execution is charged as any other execution.
580 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700581 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700583 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
584 # by google.cloud.functions.v1.GenerateUploadUrl
585 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
586 # can be terminated if the function is not completed at the end of the
587 # timeout period. Defaults to 60 seconds.
588 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
589 # Defaults to 256MB.
590 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
591 # globally and match pattern `projects/*/locations/*/functions/*`
592 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
593 # function, optional when updating an existing function. For a complete
594 # list of possible choices, see the
595 # [`gcloud` command
596 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
597 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
598 # results in a new version of a function being created.
599 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
600 # archive which contains the function.
601 &quot;sourceRepository&quot;: { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700603 # The source repository where a function is hosted.
604 # source repository where a function is hosted.
605 &quot;url&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
606 # There are supported Cloud Source Repository URLs in the following
607 # formats:
608 #
609 # To refer to a specific commit:
610 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
611 # To refer to a moveable alias (branch):
612 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
613 # In particular, to refer to HEAD use `master` moveable alias.
614 # To refer to a specific fixed alias (tag):
615 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
616 #
617 # You may omit `paths/*` if you want to use the main directory.
618 &quot;deployedUrl&quot;: &quot;A String&quot;, # Output only. The URL pointing to the hosted repository where the function
619 # were defined at the time of deployment. It always points to a specific
620 # commit in the format described above.
621 },
622 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
623 # either the fully-qualified URI, or the short name of the network resource.
624 # If the short network name is used, the network must belong to the same
625 # project. Otherwise, it must belong to a project within the same
626 # organization. The format of this field is either
627 # `projects/{project}/global/networks/{network}` or `{network}`, where
628 # {project} is a project id where the network is defined, and {network} is
629 # the short name of the network.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700631 # This field is mutually exclusive with `vpc_connector` and will be replaced
632 # by it.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700633 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700634 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
635 # more information on connecting Cloud projects.
636 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
637 # be either the fully-qualified URI, or the short name of the network
638 # connector resource. The format of this field is
639 # `projects/*/locations/*/connectors/*`
Dan O'Mearadd494642020-05-01 07:42:23 -0700640 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700641 # This field is mutually exclusive with `network` field and will eventually
642 # replace it.
Dan O'Mearadd494642020-05-01 07:42:23 -0700643 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700644 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
645 # more information on connecting Cloud projects.
646 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
647 # executed. Defaults to the resource name suffix, if not specified. For
648 # backward compatibility, if function with given name is not found, then the
649 # system will try to use function named &quot;function&quot;.
650 # For Node.js this is name of a function exported by the module specified
651 # in `source_location`.
652 &quot;labels&quot;: { # Labels associated with this Cloud Function.
653 &quot;a_key&quot;: &quot;A String&quot;,
654 },
655 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
656 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657</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 Kim65020912020-05-20 12:08:20 -0700676
677To learn which resources support conditions in their IAM policies, see the
678[IAM
679documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 x__xgafv: string, V1 error format.
681 Allowed values
682 1 - v1 error format
683 2 - v2 error format
684
685Returns:
686 An object of the form:
687
Dan O'Mearadd494642020-05-01 07:42:23 -0700688 { # An Identity and Access Management (IAM) policy, which specifies access
689 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700690 #
691 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700692 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
693 # `members` to a single `role`. Members can be user accounts, service accounts,
694 # Google groups, and domains (such as G Suite). A `role` is a named list of
695 # permissions; each `role` can be an IAM predefined role or a user-created
696 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 # For some types of Google Cloud resources, a `binding` can also specify a
699 # `condition`, which is a logical expression that allows access to a resource
700 # only if the expression evaluates to `true`. A condition can add constraints
701 # based on attributes of the request, the resource, or both. To learn which
702 # resources support conditions in their IAM policies, see the
703 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 #
705 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700706 #
707 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700710 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
711 # &quot;members&quot;: [
712 # &quot;user:mike@example.com&quot;,
713 # &quot;group:admins@example.com&quot;,
714 # &quot;domain:google.com&quot;,
715 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 # ]
717 # },
718 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
720 # &quot;members&quot;: [
721 # &quot;user:eve@example.com&quot;
722 # ],
723 # &quot;condition&quot;: {
724 # &quot;title&quot;: &quot;expirable access&quot;,
725 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
726 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700727 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700728 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700729 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
731 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700732 # }
733 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700734 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700735 #
736 # bindings:
737 # - members:
738 # - user:mike@example.com
739 # - group:admins@example.com
740 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700741 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
742 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700743 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700744 # - user:eve@example.com
745 # role: roles/resourcemanager.organizationViewer
746 # condition:
747 # title: expirable access
748 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700749 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700750 # - etag: BwWWja0YfJA=
751 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700752 #
753 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700754 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700755 &quot;version&quot;: 42, # Specifies the format of the policy.
756 #
757 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
758 # are rejected.
759 #
760 # Any operation that affects conditional role bindings must specify version
761 # `3`. This requirement applies to the following operations:
762 #
763 # * Getting a policy that includes a conditional role binding
764 # * Adding a conditional role binding to a policy
765 # * Changing a conditional role binding in a policy
766 # * Removing any role binding, with or without a condition, from a policy
767 # that includes conditions
768 #
769 # **Important:** If you use IAM Conditions, you must include the `etag` field
770 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
771 # you to overwrite a version `3` policy with a version `1` policy, and all of
772 # the conditions in the version `3` policy are lost.
773 #
774 # If a policy does not include any conditions, operations on that policy may
775 # specify any valid version or leave the field unset.
776 #
777 # To learn which resources support conditions in their IAM policies, see the
778 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
779 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
780 { # Specifies the audit configuration for a service.
781 # The configuration determines which permission types are logged, and what
782 # identities, if any, are exempted from logging.
783 # An AuditConfig must have one or more AuditLogConfigs.
784 #
785 # If there are AuditConfigs for both `allServices` and a specific service,
786 # the union of the two AuditConfigs is used for that service: the log_types
787 # specified in each AuditConfig are enabled, and the exempted_members in each
788 # AuditLogConfig are exempted.
789 #
790 # Example Policy with multiple AuditConfigs:
791 #
792 # {
793 # &quot;audit_configs&quot;: [
794 # {
795 # &quot;service&quot;: &quot;allServices&quot;
796 # &quot;audit_log_configs&quot;: [
797 # {
798 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
799 # &quot;exempted_members&quot;: [
800 # &quot;user:jose@example.com&quot;
801 # ]
802 # },
803 # {
804 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
805 # },
806 # {
807 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
808 # }
809 # ]
810 # },
811 # {
812 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
813 # &quot;audit_log_configs&quot;: [
814 # {
815 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
816 # },
817 # {
818 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
819 # &quot;exempted_members&quot;: [
820 # &quot;user:aliya@example.com&quot;
821 # ]
822 # }
823 # ]
824 # }
825 # ]
826 # }
827 #
828 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
829 # logging. It also exempts jose@example.com from DATA_READ logging, and
830 # aliya@example.com from DATA_WRITE logging.
831 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
832 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
833 # `allServices` is a special value that covers all services.
834 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
835 { # Provides the configuration for logging a type of permissions.
836 # Example:
837 #
838 # {
839 # &quot;audit_log_configs&quot;: [
840 # {
841 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
842 # &quot;exempted_members&quot;: [
843 # &quot;user:jose@example.com&quot;
844 # ]
845 # },
846 # {
847 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
848 # }
849 # ]
850 # }
851 #
852 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
853 # jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
855 # permission.
856 # Follows the same format of Binding.members.
857 &quot;A String&quot;,
858 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700859 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700860 },
861 ],
862 },
863 ],
864 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700865 # `condition` that determines how and when the `bindings` are applied. Each
866 # of the `bindings` must contain at least one member.
867 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
869 #
870 # If the condition evaluates to `true`, then this binding applies to the
871 # current request.
872 #
873 # If the condition evaluates to `false`, then this binding does not apply to
874 # the current request. However, a different role binding might grant the same
875 # role to one or more of the members in this binding.
876 #
877 # To learn which resources support conditions in their IAM policies, see the
878 # [IAM
879 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
880 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
881 # are documented at https://github.com/google/cel-spec.
882 #
883 # Example (Comparison):
884 #
885 # title: &quot;Summary size limit&quot;
886 # description: &quot;Determines if a summary is less than 100 chars&quot;
887 # expression: &quot;document.summary.size() &lt; 100&quot;
888 #
889 # Example (Equality):
890 #
891 # title: &quot;Requestor is owner&quot;
892 # description: &quot;Determines if requestor is the document owner&quot;
893 # expression: &quot;document.owner == request.auth.claims.email&quot;
894 #
895 # Example (Logic):
896 #
897 # title: &quot;Public documents&quot;
898 # description: &quot;Determine whether the document should be publicly visible&quot;
899 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
900 #
901 # Example (Data Manipulation):
902 #
903 # title: &quot;Notification string&quot;
904 # description: &quot;Create a notification string with a timestamp.&quot;
905 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
906 #
907 # The exact variables and functions that may be referenced within an expression
908 # are determined by the service that evaluates it. See the service
909 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
911 # its purpose. This can be used e.g. in UIs which allow to enter the
912 # expression.
913 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
914 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700915 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
916 # describes the expression, e.g. when hovered over it in a UI.
917 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
918 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -0700919 },
920 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700921 # `members` can have the following values:
922 #
923 # * `allUsers`: A special identifier that represents anyone who is
924 # on the internet; with or without a Google account.
925 #
926 # * `allAuthenticatedUsers`: A special identifier that represents anyone
927 # who is authenticated with a Google account or a service account.
928 #
929 # * `user:{emailid}`: An email address that represents a specific Google
930 # account. For example, `alice@example.com` .
931 #
932 #
933 # * `serviceAccount:{emailid}`: An email address that represents a service
934 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
935 #
936 # * `group:{emailid}`: An email address that represents a Google group.
937 # For example, `admins@example.com`.
938 #
939 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
940 # identifier) representing a user that has been recently deleted. For
941 # example, `alice@example.com?uid=123456789012345678901`. If the user is
942 # recovered, this value reverts to `user:{emailid}` and the recovered user
943 # retains the role in the binding.
944 #
945 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
946 # unique identifier) representing a service account that has been recently
947 # deleted. For example,
948 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
949 # If the service account is undeleted, this value reverts to
950 # `serviceAccount:{emailid}` and the undeleted service account retains the
951 # role in the binding.
952 #
953 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
954 # identifier) representing a Google group that has been recently
955 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
956 # the group is recovered, this value reverts to `group:{emailid}` and the
957 # recovered group retains the role in the binding.
958 #
959 #
960 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
961 # users of that domain. For example, `google.com` or `example.com`.
962 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700963 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700965 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
966 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700967 },
968 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700969 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
970 # prevent simultaneous updates of a policy from overwriting each other.
971 # It is strongly suggested that systems make use of the `etag` in the
972 # read-modify-write cycle to perform policy updates in order to avoid race
973 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
974 # systems are expected to put that etag in the request to `setIamPolicy` to
975 # ensure that their change will be applied to the same version of the policy.
976 #
977 # **Important:** If you use IAM Conditions, you must include the `etag` field
978 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
979 # you to overwrite a version `3` policy with a version `1` policy, and all of
980 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700981 }</pre>
982</div>
983
984<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700985 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700986 <pre>Returns a list of functions that belong to the requested project.
987
988Args:
989 parent: string, The project and location from which the function should be listed,
990specified in the format `projects/*/locations/*`
Bu Sun Kim65020912020-05-20 12:08:20 -0700991If you want to list functions in all locations, use &quot;-&quot; in place of a
Dan O'Mearadd494642020-05-01 07:42:23 -0700992location. When listing functions in all locations, if one or more
993location(s) are unreachable, the response will contain functions from all
994reachable locations along with the names of any unreachable locations. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700995 pageToken: string, The value returned by the last
996`ListFunctionsResponse`; indicates that
997this is a continuation of a prior `ListFunctions` call, and that the
998system should return the next page of data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 pageSize: integer, Maximum number of functions to return per call.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001000 x__xgafv: string, V1 error format.
1001 Allowed values
1002 1 - v1 error format
1003 2 - v2 error format
1004
1005Returns:
1006 An object of the form:
1007
1008 { # Response for the `ListFunctions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001009 &quot;unreachable&quot;: [ # Locations that could not be reached. The response does not include any
Dan O'Mearadd494642020-05-01 07:42:23 -07001010 # functions from these locations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001011 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001012 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001013 &quot;functions&quot;: [ # The functions that match the request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001014 { # Describes a Cloud Function that contains user computation executed in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001015 # response to an event. It encapsulate function and triggers configurations.
1016 &quot;httpsTrigger&quot;: { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
1017 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
1018 },
1019 &quot;vpcConnectorEgressSettings&quot;: &quot;A String&quot;, # The egress settings for the connector, controlling what traffic is diverted
1020 # through it.
1021 &quot;ingressSettings&quot;: &quot;A String&quot;, # The ingress settings for the function, controlling what traffic can reach
1022 # it.
1023 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
1024 # `{project_id}@appspot.gserviceaccount.com`.
1025 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
1026 # given time.
1027 &quot;description&quot;: &quot;A String&quot;, # User-provided description of a function.
1028 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
1029 &quot;a_key&quot;: &quot;A String&quot;,
1030 },
1031 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
1032 &quot;eventTrigger&quot;: { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
1033 # service.
1034 &quot;eventType&quot;: &quot;A String&quot;, # Required. The type of event to observe. For example:
1035 # `providers/cloud.storage/eventTypes/object.change` and
1036 # `providers/cloud.pubsub/eventTypes/topic.publish`.
1037 #
1038 # Event types match pattern `providers/*/eventTypes/*.*`.
1039 # The pattern contains:
1040 #
1041 # 1. namespace: For example, `cloud.storage` and
1042 # `google.firebase.analytics`.
1043 # 2. resource type: The type of resource on which event occurs. For
1044 # example, the Google Cloud Storage API includes the type `object`.
1045 # 3. action: The action that generates the event. For example, action for
1046 # a Google Cloud Storage Object is &#x27;change&#x27;.
1047 # These parts are lower case.
1048 &quot;resource&quot;: &quot;A String&quot;, # Required. The resource(s) from which to observe events, for example,
1049 # `projects/_/buckets/myBucket`.
1050 #
1051 # Not all syntactically correct values are accepted by all services. For
1052 # example:
1053 #
1054 # 1. The authorization model must support it. Google Cloud Functions
1055 # only allows EventTriggers to be deployed that observe resources in the
1056 # same project as the `CloudFunction`.
1057 # 2. The resource type must match the pattern expected for an
1058 # `event_type`. For example, an `EventTrigger` that has an
1059 # `event_type` of &quot;google.pubsub.topic.publish&quot; should have a resource
1060 # that matches Google Cloud Pub/Sub topics.
1061 #
1062 # Additionally, some services may support short names when creating an
1063 # `EventTrigger`. These will always be returned in the normalized &quot;long&quot;
1064 # format.
1065 #
1066 # See each *service&#x27;s* documentation for supported formats.
1067 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
1068 #
1069 # If no string is provided, the default service implementing the API will
1070 # be used. For example, `storage.googleapis.com` is the default for all
1071 # event types in the `google.storage` namespace.
1072 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
1073 # If empty, then defaults to ignoring failures (i.e. not retrying them).
1074 &quot;retry&quot;: { # Describes the retry policy in case of function&#x27;s execution failure. # If specified, then the function will be retried in case of a failure.
1075 # A function execution will be retried on any failure.
1076 # A failed execution will be retried up to 7 days with an exponential backoff
1077 # (capped at 10 seconds).
1078 # Retried execution is charged as any other execution.
1079 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001080 },
1081 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001082 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
1083 # by google.cloud.functions.v1.GenerateUploadUrl
1084 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
1085 # can be terminated if the function is not completed at the end of the
1086 # timeout period. Defaults to 60 seconds.
1087 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
1088 # Defaults to 256MB.
1089 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
1090 # globally and match pattern `projects/*/locations/*/functions/*`
1091 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
1092 # function, optional when updating an existing function. For a complete
1093 # list of possible choices, see the
1094 # [`gcloud` command
1095 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
1096 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
1097 # results in a new version of a function being created.
1098 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
1099 # archive which contains the function.
1100 &quot;sourceRepository&quot;: { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001102 # The source repository where a function is hosted.
1103 # source repository where a function is hosted.
1104 &quot;url&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
1105 # There are supported Cloud Source Repository URLs in the following
1106 # formats:
1107 #
1108 # To refer to a specific commit:
1109 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
1110 # To refer to a moveable alias (branch):
1111 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
1112 # In particular, to refer to HEAD use `master` moveable alias.
1113 # To refer to a specific fixed alias (tag):
1114 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
1115 #
1116 # You may omit `paths/*` if you want to use the main directory.
1117 &quot;deployedUrl&quot;: &quot;A String&quot;, # Output only. The URL pointing to the hosted repository where the function
1118 # were defined at the time of deployment. It always points to a specific
1119 # commit in the format described above.
1120 },
1121 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
1122 # either the fully-qualified URI, or the short name of the network resource.
1123 # If the short network name is used, the network must belong to the same
1124 # project. Otherwise, it must belong to a project within the same
1125 # organization. The format of this field is either
1126 # `projects/{project}/global/networks/{network}` or `{network}`, where
1127 # {project} is a project id where the network is defined, and {network} is
1128 # the short name of the network.
Bu Sun Kim65020912020-05-20 12:08:20 -07001129 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001130 # This field is mutually exclusive with `vpc_connector` and will be replaced
1131 # by it.
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001133 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1134 # more information on connecting Cloud projects.
1135 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
1136 # be either the fully-qualified URI, or the short name of the network
1137 # connector resource. The format of this field is
1138 # `projects/*/locations/*/connectors/*`
Bu Sun Kim65020912020-05-20 12:08:20 -07001139 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001140 # This field is mutually exclusive with `network` field and will eventually
1141 # replace it.
Bu Sun Kim65020912020-05-20 12:08:20 -07001142 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001143 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1144 # more information on connecting Cloud projects.
1145 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
1146 # executed. Defaults to the resource name suffix, if not specified. For
1147 # backward compatibility, if function with given name is not found, then the
1148 # system will try to use function named &quot;function&quot;.
1149 # For Node.js this is name of a function exported by the module specified
1150 # in `source_location`.
1151 &quot;labels&quot;: { # Labels associated with this Cloud Function.
1152 &quot;a_key&quot;: &quot;A String&quot;,
1153 },
1154 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001156 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001157 &quot;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more functions that match
1158 # the request; this value should be passed in a new
1159 # google.cloud.functions.v1.ListFunctionsRequest
1160 # to get more functions.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001161 }</pre>
1162</div>
1163
1164<div class="method">
1165 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1166 <pre>Retrieves the next page of results.
1167
1168Args:
1169 previous_request: The request for the previous page. (required)
1170 previous_response: The response from the request for the previous page. (required)
1171
1172Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001173 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001174 page. Returns None if there are no more items in the collection.
1175 </pre>
1176</div>
1177
1178<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001179 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001180 <pre>Updates existing function.
1181
1182Args:
1183 name: string, A user-defined name of the function. Function names must be unique
1184globally and match pattern `projects/*/locations/*/functions/*` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001185 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 The object takes the form of:
1187
1188{ # Describes a Cloud Function that contains user computation executed in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001189 # response to an event. It encapsulate function and triggers configurations.
1190 &quot;httpsTrigger&quot;: { # Describes HttpsTrigger, could be used to connect web hooks to function. # An HTTPS endpoint type of source that can be triggered via URL.
1191 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
1192 },
1193 &quot;vpcConnectorEgressSettings&quot;: &quot;A String&quot;, # The egress settings for the connector, controlling what traffic is diverted
1194 # through it.
1195 &quot;ingressSettings&quot;: &quot;A String&quot;, # The ingress settings for the function, controlling what traffic can reach
1196 # it.
1197 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
1198 # `{project_id}@appspot.gserviceaccount.com`.
1199 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
1200 # given time.
1201 &quot;description&quot;: &quot;A String&quot;, # User-provided description of a function.
1202 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
1203 &quot;a_key&quot;: &quot;A String&quot;,
1204 },
1205 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
1206 &quot;eventTrigger&quot;: { # Describes EventTrigger, used to request events be sent from another # A source that fires events in response to a condition in another service.
1207 # service.
1208 &quot;eventType&quot;: &quot;A String&quot;, # Required. The type of event to observe. For example:
1209 # `providers/cloud.storage/eventTypes/object.change` and
1210 # `providers/cloud.pubsub/eventTypes/topic.publish`.
1211 #
1212 # Event types match pattern `providers/*/eventTypes/*.*`.
1213 # The pattern contains:
1214 #
1215 # 1. namespace: For example, `cloud.storage` and
1216 # `google.firebase.analytics`.
1217 # 2. resource type: The type of resource on which event occurs. For
1218 # example, the Google Cloud Storage API includes the type `object`.
1219 # 3. action: The action that generates the event. For example, action for
1220 # a Google Cloud Storage Object is &#x27;change&#x27;.
1221 # These parts are lower case.
1222 &quot;resource&quot;: &quot;A String&quot;, # Required. The resource(s) from which to observe events, for example,
1223 # `projects/_/buckets/myBucket`.
1224 #
1225 # Not all syntactically correct values are accepted by all services. For
1226 # example:
1227 #
1228 # 1. The authorization model must support it. Google Cloud Functions
1229 # only allows EventTriggers to be deployed that observe resources in the
1230 # same project as the `CloudFunction`.
1231 # 2. The resource type must match the pattern expected for an
1232 # `event_type`. For example, an `EventTrigger` that has an
1233 # `event_type` of &quot;google.pubsub.topic.publish&quot; should have a resource
1234 # that matches Google Cloud Pub/Sub topics.
1235 #
1236 # Additionally, some services may support short names when creating an
1237 # `EventTrigger`. These will always be returned in the normalized &quot;long&quot;
1238 # format.
1239 #
1240 # See each *service&#x27;s* documentation for supported formats.
1241 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
1242 #
1243 # If no string is provided, the default service implementing the API will
1244 # be used. For example, `storage.googleapis.com` is the default for all
1245 # event types in the `google.storage` namespace.
1246 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
1247 # If empty, then defaults to ignoring failures (i.e. not retrying them).
1248 &quot;retry&quot;: { # Describes the retry policy in case of function&#x27;s execution failure. # If specified, then the function will be retried in case of a failure.
1249 # A function execution will be retried on any failure.
1250 # A failed execution will be retried up to 7 days with an exponential backoff
1251 # (capped at 10 seconds).
1252 # Retried execution is charged as any other execution.
1253 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001254 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001255 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001256 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
1257 # by google.cloud.functions.v1.GenerateUploadUrl
1258 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
1259 # can be terminated if the function is not completed at the end of the
1260 # timeout period. Defaults to 60 seconds.
1261 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
1262 # Defaults to 256MB.
1263 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
1264 # globally and match pattern `projects/*/locations/*/functions/*`
1265 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
1266 # function, optional when updating an existing function. For a complete
1267 # list of possible choices, see the
1268 # [`gcloud` command
1269 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
1270 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
1271 # results in a new version of a function being created.
1272 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
1273 # archive which contains the function.
1274 &quot;sourceRepository&quot;: { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
1275 #
1276 # The source repository where a function is hosted.
1277 # source repository where a function is hosted.
1278 &quot;url&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
1279 # There are supported Cloud Source Repository URLs in the following
1280 # formats:
1281 #
1282 # To refer to a specific commit:
1283 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
1284 # To refer to a moveable alias (branch):
1285 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
1286 # In particular, to refer to HEAD use `master` moveable alias.
1287 # To refer to a specific fixed alias (tag):
1288 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
1289 #
1290 # You may omit `paths/*` if you want to use the main directory.
1291 &quot;deployedUrl&quot;: &quot;A String&quot;, # Output only. The URL pointing to the hosted repository where the function
1292 # were defined at the time of deployment. It always points to a specific
1293 # commit in the format described above.
1294 },
1295 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
1296 # either the fully-qualified URI, or the short name of the network resource.
1297 # If the short network name is used, the network must belong to the same
1298 # project. Otherwise, it must belong to a project within the same
1299 # organization. The format of this field is either
1300 # `projects/{project}/global/networks/{network}` or `{network}`, where
1301 # {project} is a project id where the network is defined, and {network} is
1302 # the short name of the network.
1303 #
1304 # This field is mutually exclusive with `vpc_connector` and will be replaced
1305 # by it.
1306 #
1307 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1308 # more information on connecting Cloud projects.
1309 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
1310 # be either the fully-qualified URI, or the short name of the network
1311 # connector resource. The format of this field is
1312 # `projects/*/locations/*/connectors/*`
1313 #
1314 # This field is mutually exclusive with `network` field and will eventually
1315 # replace it.
1316 #
1317 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1318 # more information on connecting Cloud projects.
1319 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
1320 # executed. Defaults to the resource name suffix, if not specified. For
1321 # backward compatibility, if function with given name is not found, then the
1322 # system will try to use function named &quot;function&quot;.
1323 # For Node.js this is name of a function exported by the module specified
1324 # in `source_location`.
1325 &quot;labels&quot;: { # Labels associated with this Cloud Function.
1326 &quot;a_key&quot;: &quot;A String&quot;,
1327 },
1328 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
1329 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001330
1331 updateMask: string, Required list of fields to be updated in this request.
1332 x__xgafv: string, V1 error format.
1333 Allowed values
1334 1 - v1 error format
1335 2 - v2 error format
1336
1337Returns:
1338 An object of the form:
1339
1340 { # This resource represents a long-running operation that is the result of a
1341 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001342 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001343 # If `true`, the operation is completed, and either `error` or `response` is
1344 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -07001345 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001346 # method returns no data on success, such as `Delete`, the response is
1347 # `google.protobuf.Empty`. If the original method is standard
1348 # `Get`/`Create`/`Update`, the response should be the resource. For other
1349 # methods, the response should have the type `XxxResponse`, where `Xxx`
1350 # is the original method name. For example, if the original method name
1351 # is `TakeSnapshot()`, the inferred response type is
1352 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001353 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001354 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001355 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 # originally returns it. If you use the default HTTP mapping, the
1357 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001358 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1359 # different programming environments, including REST APIs and RPC APIs. It is
1360 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1361 # three pieces of data: error code, error message, and error details.
1362 #
1363 # You can find out more about this error model and how to work with it in the
1364 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1365 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1366 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1367 # user-facing error message should be localized and sent in the
1368 # google.rpc.Status.details field, or localized by the client.
1369 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1370 # message types for APIs to use.
1371 {
1372 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1373 },
1374 ],
1375 },
1376 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1377 # contains progress information and common metadata such as create time.
1378 # Some services might not provide such metadata. Any method that returns a
1379 # long-running operation should document the metadata type, if any.
1380 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1381 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001382 }</pre>
1383</div>
1384
1385<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001386 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001387 <pre>Sets the IAM access control policy on the specified function.
1388Replaces any existing policy.
1389
1390Args:
1391 resource: string, REQUIRED: The resource for which the policy is being specified.
1392See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001393 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001394 The object takes the form of:
1395
1396{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001397 &quot;policy&quot;: { # 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 -07001398 # the policy is limited to a few 10s of KB. An empty policy is a
1399 # valid policy but certain Cloud Platform services (such as Projects)
1400 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07001401 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001402 #
1403 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001404 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1405 # `members` to a single `role`. Members can be user accounts, service accounts,
1406 # Google groups, and domains (such as G Suite). A `role` is a named list of
1407 # permissions; each `role` can be an IAM predefined role or a user-created
1408 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001409 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 # For some types of Google Cloud resources, a `binding` can also specify a
1411 # `condition`, which is a logical expression that allows access to a resource
1412 # only if the expression evaluates to `true`. A condition can add constraints
1413 # based on attributes of the request, the resource, or both. To learn which
1414 # resources support conditions in their IAM policies, see the
1415 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001416 #
1417 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001418 #
1419 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001420 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001421 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001422 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1423 # &quot;members&quot;: [
1424 # &quot;user:mike@example.com&quot;,
1425 # &quot;group:admins@example.com&quot;,
1426 # &quot;domain:google.com&quot;,
1427 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001428 # ]
1429 # },
1430 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001431 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1432 # &quot;members&quot;: [
1433 # &quot;user:eve@example.com&quot;
1434 # ],
1435 # &quot;condition&quot;: {
1436 # &quot;title&quot;: &quot;expirable access&quot;,
1437 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1438 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001439 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001440 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001441 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001442 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1443 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444 # }
1445 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001446 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001447 #
1448 # bindings:
1449 # - members:
1450 # - user:mike@example.com
1451 # - group:admins@example.com
1452 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001453 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1454 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001456 # - user:eve@example.com
1457 # role: roles/resourcemanager.organizationViewer
1458 # condition:
1459 # title: expirable access
1460 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001461 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001462 # - etag: BwWWja0YfJA=
1463 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001464 #
1465 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001466 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001467 &quot;version&quot;: 42, # Specifies the format of the policy.
1468 #
1469 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1470 # are rejected.
1471 #
1472 # Any operation that affects conditional role bindings must specify version
1473 # `3`. This requirement applies to the following operations:
1474 #
1475 # * Getting a policy that includes a conditional role binding
1476 # * Adding a conditional role binding to a policy
1477 # * Changing a conditional role binding in a policy
1478 # * Removing any role binding, with or without a condition, from a policy
1479 # that includes conditions
1480 #
1481 # **Important:** If you use IAM Conditions, you must include the `etag` field
1482 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1483 # you to overwrite a version `3` policy with a version `1` policy, and all of
1484 # the conditions in the version `3` policy are lost.
1485 #
1486 # If a policy does not include any conditions, operations on that policy may
1487 # specify any valid version or leave the field unset.
1488 #
1489 # To learn which resources support conditions in their IAM policies, see the
1490 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1491 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1492 { # Specifies the audit configuration for a service.
1493 # The configuration determines which permission types are logged, and what
1494 # identities, if any, are exempted from logging.
1495 # An AuditConfig must have one or more AuditLogConfigs.
1496 #
1497 # If there are AuditConfigs for both `allServices` and a specific service,
1498 # the union of the two AuditConfigs is used for that service: the log_types
1499 # specified in each AuditConfig are enabled, and the exempted_members in each
1500 # AuditLogConfig are exempted.
1501 #
1502 # Example Policy with multiple AuditConfigs:
1503 #
1504 # {
1505 # &quot;audit_configs&quot;: [
1506 # {
1507 # &quot;service&quot;: &quot;allServices&quot;
1508 # &quot;audit_log_configs&quot;: [
1509 # {
1510 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1511 # &quot;exempted_members&quot;: [
1512 # &quot;user:jose@example.com&quot;
1513 # ]
1514 # },
1515 # {
1516 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1517 # },
1518 # {
1519 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
1520 # }
1521 # ]
1522 # },
1523 # {
1524 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
1525 # &quot;audit_log_configs&quot;: [
1526 # {
1527 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1528 # },
1529 # {
1530 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1531 # &quot;exempted_members&quot;: [
1532 # &quot;user:aliya@example.com&quot;
1533 # ]
1534 # }
1535 # ]
1536 # }
1537 # ]
1538 # }
1539 #
1540 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1541 # logging. It also exempts jose@example.com from DATA_READ logging, and
1542 # aliya@example.com from DATA_WRITE logging.
1543 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1544 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1545 # `allServices` is a special value that covers all services.
1546 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1547 { # Provides the configuration for logging a type of permissions.
1548 # Example:
1549 #
1550 # {
1551 # &quot;audit_log_configs&quot;: [
1552 # {
1553 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1554 # &quot;exempted_members&quot;: [
1555 # &quot;user:jose@example.com&quot;
1556 # ]
1557 # },
1558 # {
1559 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1560 # }
1561 # ]
1562 # }
1563 #
1564 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1565 # jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001566 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1567 # permission.
1568 # Follows the same format of Binding.members.
1569 &quot;A String&quot;,
1570 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001571 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -07001572 },
1573 ],
1574 },
1575 ],
1576 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001577 # `condition` that determines how and when the `bindings` are applied. Each
1578 # of the `bindings` must contain at least one member.
1579 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001580 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1581 #
1582 # If the condition evaluates to `true`, then this binding applies to the
1583 # current request.
1584 #
1585 # If the condition evaluates to `false`, then this binding does not apply to
1586 # the current request. However, a different role binding might grant the same
1587 # role to one or more of the members in this binding.
1588 #
1589 # To learn which resources support conditions in their IAM policies, see the
1590 # [IAM
1591 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1592 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1593 # are documented at https://github.com/google/cel-spec.
1594 #
1595 # Example (Comparison):
1596 #
1597 # title: &quot;Summary size limit&quot;
1598 # description: &quot;Determines if a summary is less than 100 chars&quot;
1599 # expression: &quot;document.summary.size() &lt; 100&quot;
1600 #
1601 # Example (Equality):
1602 #
1603 # title: &quot;Requestor is owner&quot;
1604 # description: &quot;Determines if requestor is the document owner&quot;
1605 # expression: &quot;document.owner == request.auth.claims.email&quot;
1606 #
1607 # Example (Logic):
1608 #
1609 # title: &quot;Public documents&quot;
1610 # description: &quot;Determine whether the document should be publicly visible&quot;
1611 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1612 #
1613 # Example (Data Manipulation):
1614 #
1615 # title: &quot;Notification string&quot;
1616 # description: &quot;Create a notification string with a timestamp.&quot;
1617 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1618 #
1619 # The exact variables and functions that may be referenced within an expression
1620 # are determined by the service that evaluates it. See the service
1621 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001622 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1623 # its purpose. This can be used e.g. in UIs which allow to enter the
1624 # expression.
1625 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1626 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001627 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1628 # describes the expression, e.g. when hovered over it in a UI.
1629 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1630 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07001631 },
1632 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001633 # `members` can have the following values:
1634 #
1635 # * `allUsers`: A special identifier that represents anyone who is
1636 # on the internet; with or without a Google account.
1637 #
1638 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1639 # who is authenticated with a Google account or a service account.
1640 #
1641 # * `user:{emailid}`: An email address that represents a specific Google
1642 # account. For example, `alice@example.com` .
1643 #
1644 #
1645 # * `serviceAccount:{emailid}`: An email address that represents a service
1646 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1647 #
1648 # * `group:{emailid}`: An email address that represents a Google group.
1649 # For example, `admins@example.com`.
1650 #
1651 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1652 # identifier) representing a user that has been recently deleted. For
1653 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1654 # recovered, this value reverts to `user:{emailid}` and the recovered user
1655 # retains the role in the binding.
1656 #
1657 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1658 # unique identifier) representing a service account that has been recently
1659 # deleted. For example,
1660 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1661 # If the service account is undeleted, this value reverts to
1662 # `serviceAccount:{emailid}` and the undeleted service account retains the
1663 # role in the binding.
1664 #
1665 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1666 # identifier) representing a Google group that has been recently
1667 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1668 # the group is recovered, this value reverts to `group:{emailid}` and the
1669 # recovered group retains the role in the binding.
1670 #
1671 #
1672 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1673 # users of that domain. For example, `google.com` or `example.com`.
1674 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001675 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001676 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001677 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1678 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001679 },
1680 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001681 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1682 # prevent simultaneous updates of a policy from overwriting each other.
1683 # It is strongly suggested that systems make use of the `etag` in the
1684 # read-modify-write cycle to perform policy updates in order to avoid race
1685 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1686 # systems are expected to put that etag in the request to `setIamPolicy` to
1687 # ensure that their change will be applied to the same version of the policy.
1688 #
1689 # **Important:** If you use IAM Conditions, you must include the `etag` field
1690 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1691 # you to overwrite a version `3` policy with a version `1` policy, and all of
1692 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001693 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001694 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001695 # the fields in the mask will be modified. If no mask is provided, the
1696 # following default mask is used:
Bu Sun Kim65020912020-05-20 12:08:20 -07001697 #
1698 # `paths: &quot;bindings, etag&quot;`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001699 }
1700
1701 x__xgafv: string, V1 error format.
1702 Allowed values
1703 1 - v1 error format
1704 2 - v2 error format
1705
1706Returns:
1707 An object of the form:
1708
Dan O'Mearadd494642020-05-01 07:42:23 -07001709 { # An Identity and Access Management (IAM) policy, which specifies access
1710 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001711 #
1712 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001713 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1714 # `members` to a single `role`. Members can be user accounts, service accounts,
1715 # Google groups, and domains (such as G Suite). A `role` is a named list of
1716 # permissions; each `role` can be an IAM predefined role or a user-created
1717 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001718 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001719 # For some types of Google Cloud resources, a `binding` can also specify a
1720 # `condition`, which is a logical expression that allows access to a resource
1721 # only if the expression evaluates to `true`. A condition can add constraints
1722 # based on attributes of the request, the resource, or both. To learn which
1723 # resources support conditions in their IAM policies, see the
1724 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001725 #
1726 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001727 #
1728 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001729 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001730 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001731 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1732 # &quot;members&quot;: [
1733 # &quot;user:mike@example.com&quot;,
1734 # &quot;group:admins@example.com&quot;,
1735 # &quot;domain:google.com&quot;,
1736 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001737 # ]
1738 # },
1739 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001740 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1741 # &quot;members&quot;: [
1742 # &quot;user:eve@example.com&quot;
1743 # ],
1744 # &quot;condition&quot;: {
1745 # &quot;title&quot;: &quot;expirable access&quot;,
1746 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1747 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001748 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001749 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001750 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001751 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1752 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001753 # }
1754 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001755 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001756 #
1757 # bindings:
1758 # - members:
1759 # - user:mike@example.com
1760 # - group:admins@example.com
1761 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001762 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1763 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001764 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001765 # - user:eve@example.com
1766 # role: roles/resourcemanager.organizationViewer
1767 # condition:
1768 # title: expirable access
1769 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001770 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001771 # - etag: BwWWja0YfJA=
1772 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001773 #
1774 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001775 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001776 &quot;version&quot;: 42, # Specifies the format of the policy.
1777 #
1778 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1779 # are rejected.
1780 #
1781 # Any operation that affects conditional role bindings must specify version
1782 # `3`. This requirement applies to the following operations:
1783 #
1784 # * Getting a policy that includes a conditional role binding
1785 # * Adding a conditional role binding to a policy
1786 # * Changing a conditional role binding in a policy
1787 # * Removing any role binding, with or without a condition, from a policy
1788 # that includes conditions
1789 #
1790 # **Important:** If you use IAM Conditions, you must include the `etag` field
1791 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1792 # you to overwrite a version `3` policy with a version `1` policy, and all of
1793 # the conditions in the version `3` policy are lost.
1794 #
1795 # If a policy does not include any conditions, operations on that policy may
1796 # specify any valid version or leave the field unset.
1797 #
1798 # To learn which resources support conditions in their IAM policies, see the
1799 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1800 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1801 { # Specifies the audit configuration for a service.
1802 # The configuration determines which permission types are logged, and what
1803 # identities, if any, are exempted from logging.
1804 # An AuditConfig must have one or more AuditLogConfigs.
1805 #
1806 # If there are AuditConfigs for both `allServices` and a specific service,
1807 # the union of the two AuditConfigs is used for that service: the log_types
1808 # specified in each AuditConfig are enabled, and the exempted_members in each
1809 # AuditLogConfig are exempted.
1810 #
1811 # Example Policy with multiple AuditConfigs:
1812 #
1813 # {
1814 # &quot;audit_configs&quot;: [
1815 # {
1816 # &quot;service&quot;: &quot;allServices&quot;
1817 # &quot;audit_log_configs&quot;: [
1818 # {
1819 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1820 # &quot;exempted_members&quot;: [
1821 # &quot;user:jose@example.com&quot;
1822 # ]
1823 # },
1824 # {
1825 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1826 # },
1827 # {
1828 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
1829 # }
1830 # ]
1831 # },
1832 # {
1833 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
1834 # &quot;audit_log_configs&quot;: [
1835 # {
1836 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1837 # },
1838 # {
1839 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1840 # &quot;exempted_members&quot;: [
1841 # &quot;user:aliya@example.com&quot;
1842 # ]
1843 # }
1844 # ]
1845 # }
1846 # ]
1847 # }
1848 #
1849 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1850 # logging. It also exempts jose@example.com from DATA_READ logging, and
1851 # aliya@example.com from DATA_WRITE logging.
1852 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1853 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1854 # `allServices` is a special value that covers all services.
1855 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1856 { # Provides the configuration for logging a type of permissions.
1857 # Example:
1858 #
1859 # {
1860 # &quot;audit_log_configs&quot;: [
1861 # {
1862 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1863 # &quot;exempted_members&quot;: [
1864 # &quot;user:jose@example.com&quot;
1865 # ]
1866 # },
1867 # {
1868 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1869 # }
1870 # ]
1871 # }
1872 #
1873 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1874 # jose@example.com from DATA_READ logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001875 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1876 # permission.
1877 # Follows the same format of Binding.members.
1878 &quot;A String&quot;,
1879 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001880 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -07001881 },
1882 ],
1883 },
1884 ],
1885 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001886 # `condition` that determines how and when the `bindings` are applied. Each
1887 # of the `bindings` must contain at least one member.
1888 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001889 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1890 #
1891 # If the condition evaluates to `true`, then this binding applies to the
1892 # current request.
1893 #
1894 # If the condition evaluates to `false`, then this binding does not apply to
1895 # the current request. However, a different role binding might grant the same
1896 # role to one or more of the members in this binding.
1897 #
1898 # To learn which resources support conditions in their IAM policies, see the
1899 # [IAM
1900 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1901 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1902 # are documented at https://github.com/google/cel-spec.
1903 #
1904 # Example (Comparison):
1905 #
1906 # title: &quot;Summary size limit&quot;
1907 # description: &quot;Determines if a summary is less than 100 chars&quot;
1908 # expression: &quot;document.summary.size() &lt; 100&quot;
1909 #
1910 # Example (Equality):
1911 #
1912 # title: &quot;Requestor is owner&quot;
1913 # description: &quot;Determines if requestor is the document owner&quot;
1914 # expression: &quot;document.owner == request.auth.claims.email&quot;
1915 #
1916 # Example (Logic):
1917 #
1918 # title: &quot;Public documents&quot;
1919 # description: &quot;Determine whether the document should be publicly visible&quot;
1920 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1921 #
1922 # Example (Data Manipulation):
1923 #
1924 # title: &quot;Notification string&quot;
1925 # description: &quot;Create a notification string with a timestamp.&quot;
1926 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1927 #
1928 # The exact variables and functions that may be referenced within an expression
1929 # are determined by the service that evaluates it. See the service
1930 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001931 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1932 # its purpose. This can be used e.g. in UIs which allow to enter the
1933 # expression.
1934 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1935 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001936 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1937 # describes the expression, e.g. when hovered over it in a UI.
1938 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1939 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07001940 },
1941 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001942 # `members` can have the following values:
1943 #
1944 # * `allUsers`: A special identifier that represents anyone who is
1945 # on the internet; with or without a Google account.
1946 #
1947 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1948 # who is authenticated with a Google account or a service account.
1949 #
1950 # * `user:{emailid}`: An email address that represents a specific Google
1951 # account. For example, `alice@example.com` .
1952 #
1953 #
1954 # * `serviceAccount:{emailid}`: An email address that represents a service
1955 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1956 #
1957 # * `group:{emailid}`: An email address that represents a Google group.
1958 # For example, `admins@example.com`.
1959 #
1960 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1961 # identifier) representing a user that has been recently deleted. For
1962 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1963 # recovered, this value reverts to `user:{emailid}` and the recovered user
1964 # retains the role in the binding.
1965 #
1966 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1967 # unique identifier) representing a service account that has been recently
1968 # deleted. For example,
1969 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1970 # If the service account is undeleted, this value reverts to
1971 # `serviceAccount:{emailid}` and the undeleted service account retains the
1972 # role in the binding.
1973 #
1974 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1975 # identifier) representing a Google group that has been recently
1976 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1977 # the group is recovered, this value reverts to `group:{emailid}` and the
1978 # recovered group retains the role in the binding.
1979 #
1980 #
1981 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1982 # users of that domain. For example, `google.com` or `example.com`.
1983 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001984 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001985 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001986 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1987 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001988 },
1989 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001990 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1991 # prevent simultaneous updates of a policy from overwriting each other.
1992 # It is strongly suggested that systems make use of the `etag` in the
1993 # read-modify-write cycle to perform policy updates in order to avoid race
1994 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1995 # systems are expected to put that etag in the request to `setIamPolicy` to
1996 # ensure that their change will be applied to the same version of the policy.
1997 #
1998 # **Important:** If you use IAM Conditions, you must include the `etag` field
1999 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2000 # you to overwrite a version `3` policy with a version `1` policy, and all of
2001 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002002 }</pre>
2003</div>
2004
2005<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002006 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002007 <pre>Tests the specified permissions against the IAM access control policy
2008for a function.
2009If the function does not exist, this will return an empty set of
2010permissions, not a NOT_FOUND error.
2011
2012Args:
2013 resource: string, REQUIRED: The resource for which the policy detail is being requested.
2014See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002015 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002016 The object takes the form of:
2017
2018{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07002019 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
2020 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 # information see
2022 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07002023 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002024 ],
2025 }
2026
2027 x__xgafv: string, V1 error format.
2028 Allowed values
2029 1 - v1 error format
2030 2 - v2 error format
2031
2032Returns:
2033 An object of the form:
2034
2035 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07002036 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002037 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07002038 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002039 ],
2040 }</pre>
2041</div>
2042
2043</body></html>