blob: 80234d8c765fcdf42da5096c716cd55c3dab8b39 [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 Kim65020912020-05-20 12:08:20 -0700160 # response to an event. It encapsulate function and triggers configurations.
161 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
162 # archive which contains the function.
163 &quot;sourceRepository&quot;: { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
164 #
165 # The source repository where a function is hosted.
166 # source repository where a function is hosted.
167 &quot;deployedUrl&quot;: &quot;A String&quot;, # Output only. The URL pointing to the hosted repository where the function
168 # were defined at the time of deployment. It always points to a specific
169 # commit in the format described above.
170 &quot;url&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
171 # There are supported Cloud Source Repository URLs in the following
172 # formats:
173 #
174 # To refer to a specific commit:
175 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
176 # To refer to a moveable alias (branch):
177 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
178 # In particular, to refer to HEAD use `master` moveable alias.
179 # To refer to a specific fixed alias (tag):
180 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
181 #
182 # You may omit `paths/*` if you want to use the main directory.
183 },
184 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
185 # either the fully-qualified URI, or the short name of the network resource.
186 # If the short network name is used, the network must belong to the same
187 # project. Otherwise, it must belong to a project within the same
188 # organization. The format of this field is either
189 # `projects/{project}/global/networks/{network}` or `{network}`, where
190 # {project} is a project id where the network is defined, and {network} is
191 # the short name of the network.
192 #
193 # This field is mutually exclusive with `vpc_connector` and will be replaced
194 # by it.
195 #
196 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
197 # more information on connecting Cloud projects.
198 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
199 # be either the fully-qualified URI, or the short name of the network
200 # connector resource. The format of this field is
201 # `projects/*/locations/*/connectors/*`
202 #
203 # This field is mutually exclusive with `network` field and will eventually
204 # replace it.
205 #
206 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
207 # more information on connecting Cloud projects.
208 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
209 # executed. Defaults to the resource name suffix, if not specified. For
210 # backward compatibility, if function with given name is not found, then the
211 # system will try to use function named &quot;function&quot;.
212 # For Node.js this is name of a function exported by the module specified
213 # in `source_location`.
214 &quot;labels&quot;: { # Labels associated with this Cloud Function.
215 &quot;a_key&quot;: &quot;A String&quot;,
216 },
217 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
218 &quot;vpcConnectorEgressSettings&quot;: &quot;A String&quot;, # The egress settings for the connector, controlling what traffic is diverted
219 # through it.
220 &quot;ingressSettings&quot;: &quot;A String&quot;, # The ingress settings for the function, controlling what traffic can reach
221 # it.
222 &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.
223 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
224 },
225 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
226 # `{project_id}@appspot.gserviceaccount.com`.
227 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
228 # given time.
229 &quot;description&quot;: &quot;A String&quot;, # User-provided description of a function.
230 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
231 &quot;a_key&quot;: &quot;A String&quot;,
232 },
233 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
234 # can be terminated if the function is not completed at the end of the
235 # timeout period. Defaults to 60 seconds.
236 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
237 &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.
238 # service.
239 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
240 # If empty, then defaults to ignoring failures (i.e. not retrying them).
241 &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.
242 # A function execution will be retried on any failure.
243 # A failed execution will be retried up to 7 days with an exponential backoff
244 # (capped at 10 seconds).
245 # Retried execution is charged as any other execution.
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 &quot;eventType&quot;: &quot;A String&quot;, # Required. The type of event to observe. For example:
249 # `providers/cloud.storage/eventTypes/object.change` and
250 # `providers/cloud.pubsub/eventTypes/topic.publish`.
251 #
252 # Event types match pattern `providers/*/eventTypes/*.*`.
253 # The pattern contains:
254 #
255 # 1. namespace: For example, `cloud.storage` and
256 # `google.firebase.analytics`.
257 # 2. resource type: The type of resource on which event occurs. For
258 # example, the Google Cloud Storage API includes the type `object`.
259 # 3. action: The action that generates the event. For example, action for
260 # a Google Cloud Storage Object is &#x27;change&#x27;.
261 # These parts are lower case.
262 &quot;resource&quot;: &quot;A String&quot;, # Required. The resource(s) from which to observe events, for example,
263 # `projects/_/buckets/myBucket`.
264 #
265 # Not all syntactically correct values are accepted by all services. For
266 # example:
267 #
268 # 1. The authorization model must support it. Google Cloud Functions
269 # only allows EventTriggers to be deployed that observe resources in the
270 # same project as the `CloudFunction`.
271 # 2. The resource type must match the pattern expected for an
272 # `event_type`. For example, an `EventTrigger` that has an
273 # `event_type` of &quot;google.pubsub.topic.publish&quot; should have a resource
274 # that matches Google Cloud Pub/Sub topics.
275 #
276 # Additionally, some services may support short names when creating an
277 # `EventTrigger`. These will always be returned in the normalized &quot;long&quot;
278 # format.
279 #
280 # See each *service&#x27;s* documentation for supported formats.
281 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
282 #
283 # If no string is provided, the default service implementing the API will
284 # be used. For example, `storage.googleapis.com` is the default for all
285 # event types in the `google.storage` namespace.
286 },
287 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
288 # by google.cloud.functions.v1.GenerateUploadUrl
289 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
290 # Defaults to 256MB.
291 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
292 # function, optional when updating an existing function. For a complete
293 # list of possible choices, see the
294 # [`gcloud` command
295 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
296 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
297 # globally and match pattern `projects/*/locations/*/functions/*`
298 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
299 # results in a new version of a function being created.
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;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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
315 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700317 # You can find out more about this error model and how to work with it in the
318 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320 # user-facing error message should be localized and sent in the
321 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700323 # message types for APIs to use.
324 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700325 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 },
327 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700329 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
331 # contains progress information and common metadata such as create time.
332 # Some services might not provide such metadata. Any method that returns a
333 # long-running operation should document the metadata type, if any.
334 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
335 },
336 &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 -0700337 # If `true`, the operation is completed, and either `error` or `response` is
338 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700339 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 # method returns no data on success, such as `Delete`, the response is
341 # `google.protobuf.Empty`. If the original method is standard
342 # `Get`/`Create`/`Update`, the response should be the resource. For other
343 # methods, the response should have the type `XxxResponse`, where `Xxx`
344 # is the original method name. For example, if the original method name
345 # is `TakeSnapshot()`, the inferred response type is
346 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700349 &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 -0700350 # originally returns it. If you use the default HTTP mapping, the
351 # `name` should be a resource name ending with `operations/{unique_id}`.
352 }</pre>
353</div>
354
355<div class="method">
356 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
357 <pre>Deletes a function with the given name from the specified project. If the
358given function is used by some trigger, the trigger will be updated to
359remove this function.
360
361Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 name: string, Required. The name of the function which should be deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 x__xgafv: string, V1 error format.
364 Allowed values
365 1 - v1 error format
366 2 - v2 error format
367
368Returns:
369 An object of the form:
370
371 { # This resource represents a long-running operation that is the result of a
372 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -0700375 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
376 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700378 # You can find out more about this error model and how to work with it in the
379 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 # user-facing error message should be localized and sent in the
382 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700383 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384 # message types for APIs to use.
385 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700387 },
388 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700389 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700390 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
392 # contains progress information and common metadata such as create time.
393 # Some services might not provide such metadata. Any method that returns a
394 # long-running operation should document the metadata type, if any.
395 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
396 },
397 &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 -0700398 # If `true`, the operation is completed, and either `error` or `response` is
399 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700400 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 # method returns no data on success, such as `Delete`, the response is
402 # `google.protobuf.Empty`. If the original method is standard
403 # `Get`/`Create`/`Update`, the response should be the resource. For other
404 # methods, the response should have the type `XxxResponse`, where `Xxx`
405 # is the original method name. For example, if the original method name
406 # is `TakeSnapshot()`, the inferred response type is
407 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700408 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700409 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &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 -0700411 # originally returns it. If you use the default HTTP mapping, the
412 # `name` should be a resource name ending with `operations/{unique_id}`.
413 }</pre>
414</div>
415
416<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 <code class="details" id="generateDownloadUrl">generateDownloadUrl(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 <pre>Returns a signed URL for downloading deployed function source code.
419The URL is only valid for a limited period and should be used within
420minutes after generation.
421For more information about the signed URL usage see:
422https://cloud.google.com/storage/docs/access-control/signed-urls
423
424Args:
425 name: string, The name of function for which source code Google Cloud Storage signed
426URL should be generated. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700427 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700428 The object takes the form of:
429
430{ # Request of `GenerateDownloadUrl` method.
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 Kim65020912020-05-20 12:08:20 -0700516 # response to an event. It encapsulate function and triggers configurations.
517 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
518 # archive which contains the function.
519 &quot;sourceRepository&quot;: { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
520 #
521 # The source repository where a function is hosted.
522 # source repository where a function is hosted.
523 &quot;deployedUrl&quot;: &quot;A String&quot;, # Output only. The URL pointing to the hosted repository where the function
524 # were defined at the time of deployment. It always points to a specific
525 # commit in the format described above.
526 &quot;url&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
527 # There are supported Cloud Source Repository URLs in the following
528 # formats:
529 #
530 # To refer to a specific commit:
531 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
532 # To refer to a moveable alias (branch):
533 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
534 # In particular, to refer to HEAD use `master` moveable alias.
535 # To refer to a specific fixed alias (tag):
536 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
537 #
538 # You may omit `paths/*` if you want to use the main directory.
539 },
540 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
541 # either the fully-qualified URI, or the short name of the network resource.
542 # If the short network name is used, the network must belong to the same
543 # project. Otherwise, it must belong to a project within the same
544 # organization. The format of this field is either
545 # `projects/{project}/global/networks/{network}` or `{network}`, where
546 # {project} is a project id where the network is defined, and {network} is
547 # the short name of the network.
548 #
549 # This field is mutually exclusive with `vpc_connector` and will be replaced
550 # by it.
551 #
552 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
553 # more information on connecting Cloud projects.
554 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
555 # be either the fully-qualified URI, or the short name of the network
556 # connector resource. The format of this field is
557 # `projects/*/locations/*/connectors/*`
558 #
559 # This field is mutually exclusive with `network` field and will eventually
560 # replace it.
561 #
562 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
563 # more information on connecting Cloud projects.
564 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
565 # executed. Defaults to the resource name suffix, if not specified. For
566 # backward compatibility, if function with given name is not found, then the
567 # system will try to use function named &quot;function&quot;.
568 # For Node.js this is name of a function exported by the module specified
569 # in `source_location`.
570 &quot;labels&quot;: { # Labels associated with this Cloud Function.
571 &quot;a_key&quot;: &quot;A String&quot;,
572 },
573 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
574 &quot;vpcConnectorEgressSettings&quot;: &quot;A String&quot;, # The egress settings for the connector, controlling what traffic is diverted
575 # through it.
576 &quot;ingressSettings&quot;: &quot;A String&quot;, # The ingress settings for the function, controlling what traffic can reach
577 # it.
578 &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.
579 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
580 },
581 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
582 # `{project_id}@appspot.gserviceaccount.com`.
583 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
584 # given time.
585 &quot;description&quot;: &quot;A String&quot;, # User-provided description of a function.
586 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
587 &quot;a_key&quot;: &quot;A String&quot;,
588 },
589 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
590 # can be terminated if the function is not completed at the end of the
591 # timeout period. Defaults to 60 seconds.
592 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
593 &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.
594 # service.
595 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
596 # If empty, then defaults to ignoring failures (i.e. not retrying them).
597 &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.
598 # A function execution will be retried on any failure.
599 # A failed execution will be retried up to 7 days with an exponential backoff
600 # (capped at 10 seconds).
601 # Retried execution is charged as any other execution.
Dan O'Mearadd494642020-05-01 07:42:23 -0700602 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 &quot;eventType&quot;: &quot;A String&quot;, # Required. The type of event to observe. For example:
605 # `providers/cloud.storage/eventTypes/object.change` and
606 # `providers/cloud.pubsub/eventTypes/topic.publish`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700608 # Event types match pattern `providers/*/eventTypes/*.*`.
609 # The pattern contains:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700611 # 1. namespace: For example, `cloud.storage` and
612 # `google.firebase.analytics`.
613 # 2. resource type: The type of resource on which event occurs. For
614 # example, the Google Cloud Storage API includes the type `object`.
615 # 3. action: The action that generates the event. For example, action for
616 # a Google Cloud Storage Object is &#x27;change&#x27;.
617 # These parts are lower case.
618 &quot;resource&quot;: &quot;A String&quot;, # Required. The resource(s) from which to observe events, for example,
619 # `projects/_/buckets/myBucket`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700620 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 # Not all syntactically correct values are accepted by all services. For
622 # example:
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700624 # 1. The authorization model must support it. Google Cloud Functions
625 # only allows EventTriggers to be deployed that observe resources in the
626 # same project as the `CloudFunction`.
627 # 2. The resource type must match the pattern expected for an
628 # `event_type`. For example, an `EventTrigger` that has an
629 # `event_type` of &quot;google.pubsub.topic.publish&quot; should have a resource
630 # that matches Google Cloud Pub/Sub topics.
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 # Additionally, some services may support short names when creating an
633 # `EventTrigger`. These will always be returned in the normalized &quot;long&quot;
634 # format.
635 #
636 # See each *service&#x27;s* documentation for supported formats.
637 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
638 #
639 # If no string is provided, the default service implementing the API will
640 # be used. For example, `storage.googleapis.com` is the default for all
641 # event types in the `google.storage` namespace.
642 },
643 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
644 # by google.cloud.functions.v1.GenerateUploadUrl
645 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
646 # Defaults to 256MB.
647 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
648 # function, optional when updating an existing function. For a complete
649 # list of possible choices, see the
650 # [`gcloud` command
651 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
652 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
653 # globally and match pattern `projects/*/locations/*/functions/*`
654 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
655 # results in a new version of a function being created.
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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
756 # prevent simultaneous updates of a policy from overwriting each other.
757 # It is strongly suggested that systems make use of the `etag` in the
758 # read-modify-write cycle to perform policy updates in order to avoid race
759 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
760 # systems are expected to put that etag in the request to `setIamPolicy` to
761 # ensure that their change will be applied to the same version of the policy.
762 #
763 # **Important:** If you use IAM Conditions, you must include the `etag` field
764 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
765 # you to overwrite a version `3` policy with a version `1` policy, and all of
766 # the conditions in the version `3` policy are lost.
767 &quot;version&quot;: 42, # Specifies the format of the policy.
768 #
769 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
770 # are rejected.
771 #
772 # Any operation that affects conditional role bindings must specify version
773 # `3`. This requirement applies to the following operations:
774 #
775 # * Getting a policy that includes a conditional role binding
776 # * Adding a conditional role binding to a policy
777 # * Changing a conditional role binding in a policy
778 # * Removing any role binding, with or without a condition, from a policy
779 # that includes conditions
780 #
781 # **Important:** If you use IAM Conditions, you must include the `etag` field
782 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
783 # you to overwrite a version `3` policy with a version `1` policy, and all of
784 # the conditions in the version `3` policy are lost.
785 #
786 # If a policy does not include any conditions, operations on that policy may
787 # specify any valid version or leave the field unset.
788 #
789 # To learn which resources support conditions in their IAM policies, see the
790 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
791 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
792 { # Specifies the audit configuration for a service.
793 # The configuration determines which permission types are logged, and what
794 # identities, if any, are exempted from logging.
795 # An AuditConfig must have one or more AuditLogConfigs.
796 #
797 # If there are AuditConfigs for both `allServices` and a specific service,
798 # the union of the two AuditConfigs is used for that service: the log_types
799 # specified in each AuditConfig are enabled, and the exempted_members in each
800 # AuditLogConfig are exempted.
801 #
802 # Example Policy with multiple AuditConfigs:
803 #
804 # {
805 # &quot;audit_configs&quot;: [
806 # {
807 # &quot;service&quot;: &quot;allServices&quot;
808 # &quot;audit_log_configs&quot;: [
809 # {
810 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
811 # &quot;exempted_members&quot;: [
812 # &quot;user:jose@example.com&quot;
813 # ]
814 # },
815 # {
816 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
817 # },
818 # {
819 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
820 # }
821 # ]
822 # },
823 # {
824 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
825 # &quot;audit_log_configs&quot;: [
826 # {
827 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
828 # },
829 # {
830 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
831 # &quot;exempted_members&quot;: [
832 # &quot;user:aliya@example.com&quot;
833 # ]
834 # }
835 # ]
836 # }
837 # ]
838 # }
839 #
840 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
841 # logging. It also exempts jose@example.com from DATA_READ logging, and
842 # aliya@example.com from DATA_WRITE logging.
843 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
844 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
845 # `allServices` is a special value that covers all services.
846 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
847 { # Provides the configuration for logging a type of permissions.
848 # Example:
849 #
850 # {
851 # &quot;audit_log_configs&quot;: [
852 # {
853 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
854 # &quot;exempted_members&quot;: [
855 # &quot;user:jose@example.com&quot;
856 # ]
857 # },
858 # {
859 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
860 # }
861 # ]
862 # }
863 #
864 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
865 # jose@example.com from DATA_READ logging.
866 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
867 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
868 # permission.
869 # Follows the same format of Binding.members.
870 &quot;A String&quot;,
871 ],
872 },
873 ],
874 },
875 ],
876 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700877 # `condition` that determines how and when the `bindings` are applied. Each
878 # of the `bindings` must contain at least one member.
879 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
881 #
882 # If the condition evaluates to `true`, then this binding applies to the
883 # current request.
884 #
885 # If the condition evaluates to `false`, then this binding does not apply to
886 # the current request. However, a different role binding might grant the same
887 # role to one or more of the members in this binding.
888 #
889 # To learn which resources support conditions in their IAM policies, see the
890 # [IAM
891 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
892 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
893 # are documented at https://github.com/google/cel-spec.
894 #
895 # Example (Comparison):
896 #
897 # title: &quot;Summary size limit&quot;
898 # description: &quot;Determines if a summary is less than 100 chars&quot;
899 # expression: &quot;document.summary.size() &lt; 100&quot;
900 #
901 # Example (Equality):
902 #
903 # title: &quot;Requestor is owner&quot;
904 # description: &quot;Determines if requestor is the document owner&quot;
905 # expression: &quot;document.owner == request.auth.claims.email&quot;
906 #
907 # Example (Logic):
908 #
909 # title: &quot;Public documents&quot;
910 # description: &quot;Determine whether the document should be publicly visible&quot;
911 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
912 #
913 # Example (Data Manipulation):
914 #
915 # title: &quot;Notification string&quot;
916 # description: &quot;Create a notification string with a timestamp.&quot;
917 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
918 #
919 # The exact variables and functions that may be referenced within an expression
920 # are determined by the service that evaluates it. See the service
921 # documentation for additional information.
922 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
923 # describes the expression, e.g. when hovered over it in a UI.
924 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
925 # syntax.
926 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
927 # its purpose. This can be used e.g. in UIs which allow to enter the
928 # expression.
929 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
930 # reporting, e.g. a file name and a position in the file.
931 },
932 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700933 # `members` can have the following values:
934 #
935 # * `allUsers`: A special identifier that represents anyone who is
936 # on the internet; with or without a Google account.
937 #
938 # * `allAuthenticatedUsers`: A special identifier that represents anyone
939 # who is authenticated with a Google account or a service account.
940 #
941 # * `user:{emailid}`: An email address that represents a specific Google
942 # account. For example, `alice@example.com` .
943 #
944 #
945 # * `serviceAccount:{emailid}`: An email address that represents a service
946 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
947 #
948 # * `group:{emailid}`: An email address that represents a Google group.
949 # For example, `admins@example.com`.
950 #
951 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
952 # identifier) representing a user that has been recently deleted. For
953 # example, `alice@example.com?uid=123456789012345678901`. If the user is
954 # recovered, this value reverts to `user:{emailid}` and the recovered user
955 # retains the role in the binding.
956 #
957 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
958 # unique identifier) representing a service account that has been recently
959 # deleted. For example,
960 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
961 # If the service account is undeleted, this value reverts to
962 # `serviceAccount:{emailid}` and the undeleted service account retains the
963 # role in the binding.
964 #
965 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
966 # identifier) representing a Google group that has been recently
967 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
968 # the group is recovered, this value reverts to `group:{emailid}` and the
969 # recovered group retains the role in the binding.
970 #
971 #
972 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
973 # users of that domain. For example, `google.com` or `example.com`.
974 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700977 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
978 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700979 },
980 ],
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;nextPageToken&quot;: &quot;A String&quot;, # If not empty, indicates that there may be more functions that match
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001010 # the request; this value should be passed in a new
1011 # google.cloud.functions.v1.ListFunctionsRequest
1012 # to get more functions.
Bu Sun Kim65020912020-05-20 12:08:20 -07001013 &quot;unreachable&quot;: [ # Locations that could not be reached. The response does not include any
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 # functions from these locations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001015 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001016 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001017 &quot;functions&quot;: [ # The functions that match the request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 { # Describes a Cloud Function that contains user computation executed in
Bu Sun Kim65020912020-05-20 12:08:20 -07001019 # response to an event. It encapsulate function and triggers configurations.
1020 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
1021 # archive which contains the function.
1022 &quot;sourceRepository&quot;: { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
1023 #
1024 # The source repository where a function is hosted.
1025 # source repository where a function is hosted.
1026 &quot;deployedUrl&quot;: &quot;A String&quot;, # Output only. The URL pointing to the hosted repository where the function
1027 # were defined at the time of deployment. It always points to a specific
1028 # commit in the format described above.
1029 &quot;url&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
1030 # There are supported Cloud Source Repository URLs in the following
1031 # formats:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001032 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001033 # To refer to a specific commit:
1034 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
1035 # To refer to a moveable alias (branch):
1036 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
1037 # In particular, to refer to HEAD use `master` moveable alias.
1038 # To refer to a specific fixed alias (tag):
1039 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001041 # You may omit `paths/*` if you want to use the main directory.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001042 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001043 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
1044 # either the fully-qualified URI, or the short name of the network resource.
1045 # If the short network name is used, the network must belong to the same
1046 # project. Otherwise, it must belong to a project within the same
1047 # organization. The format of this field is either
1048 # `projects/{project}/global/networks/{network}` or `{network}`, where
1049 # {project} is a project id where the network is defined, and {network} is
1050 # the short name of the network.
1051 #
1052 # This field is mutually exclusive with `vpc_connector` and will be replaced
1053 # by it.
1054 #
1055 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1056 # more information on connecting Cloud projects.
1057 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
1058 # be either the fully-qualified URI, or the short name of the network
1059 # connector resource. The format of this field is
1060 # `projects/*/locations/*/connectors/*`
1061 #
1062 # This field is mutually exclusive with `network` field and will eventually
1063 # replace it.
1064 #
1065 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1066 # more information on connecting Cloud projects.
1067 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
1068 # executed. Defaults to the resource name suffix, if not specified. For
1069 # backward compatibility, if function with given name is not found, then the
1070 # system will try to use function named &quot;function&quot;.
1071 # For Node.js this is name of a function exported by the module specified
1072 # in `source_location`.
1073 &quot;labels&quot;: { # Labels associated with this Cloud Function.
1074 &quot;a_key&quot;: &quot;A String&quot;,
1075 },
1076 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
1077 &quot;vpcConnectorEgressSettings&quot;: &quot;A String&quot;, # The egress settings for the connector, controlling what traffic is diverted
1078 # through it.
1079 &quot;ingressSettings&quot;: &quot;A String&quot;, # The ingress settings for the function, controlling what traffic can reach
1080 # it.
1081 &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.
1082 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
1083 },
1084 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
1085 # `{project_id}@appspot.gserviceaccount.com`.
1086 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
1087 # given time.
1088 &quot;description&quot;: &quot;A String&quot;, # User-provided description of a function.
1089 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
1090 &quot;a_key&quot;: &quot;A String&quot;,
1091 },
1092 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
1093 # can be terminated if the function is not completed at the end of the
1094 # timeout period. Defaults to 60 seconds.
1095 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
1096 &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.
1097 # service.
1098 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
1099 # If empty, then defaults to ignoring failures (i.e. not retrying them).
1100 &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.
1101 # A function execution will be retried on any failure.
1102 # A failed execution will be retried up to 7 days with an exponential backoff
1103 # (capped at 10 seconds).
1104 # Retried execution is charged as any other execution.
1105 },
1106 },
1107 &quot;eventType&quot;: &quot;A String&quot;, # Required. The type of event to observe. For example:
1108 # `providers/cloud.storage/eventTypes/object.change` and
1109 # `providers/cloud.pubsub/eventTypes/topic.publish`.
1110 #
1111 # Event types match pattern `providers/*/eventTypes/*.*`.
1112 # The pattern contains:
1113 #
1114 # 1. namespace: For example, `cloud.storage` and
1115 # `google.firebase.analytics`.
1116 # 2. resource type: The type of resource on which event occurs. For
1117 # example, the Google Cloud Storage API includes the type `object`.
1118 # 3. action: The action that generates the event. For example, action for
1119 # a Google Cloud Storage Object is &#x27;change&#x27;.
1120 # These parts are lower case.
1121 &quot;resource&quot;: &quot;A String&quot;, # Required. The resource(s) from which to observe events, for example,
1122 # `projects/_/buckets/myBucket`.
1123 #
1124 # Not all syntactically correct values are accepted by all services. For
1125 # example:
1126 #
1127 # 1. The authorization model must support it. Google Cloud Functions
1128 # only allows EventTriggers to be deployed that observe resources in the
1129 # same project as the `CloudFunction`.
1130 # 2. The resource type must match the pattern expected for an
1131 # `event_type`. For example, an `EventTrigger` that has an
1132 # `event_type` of &quot;google.pubsub.topic.publish&quot; should have a resource
1133 # that matches Google Cloud Pub/Sub topics.
1134 #
1135 # Additionally, some services may support short names when creating an
1136 # `EventTrigger`. These will always be returned in the normalized &quot;long&quot;
1137 # format.
1138 #
1139 # See each *service&#x27;s* documentation for supported formats.
1140 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
1141 #
1142 # If no string is provided, the default service implementing the API will
1143 # be used. For example, `storage.googleapis.com` is the default for all
1144 # event types in the `google.storage` namespace.
1145 },
1146 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
1147 # by google.cloud.functions.v1.GenerateUploadUrl
1148 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
1149 # Defaults to 256MB.
1150 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
1151 # function, optional when updating an existing function. For a complete
1152 # list of possible choices, see the
1153 # [`gcloud` command
1154 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
1155 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
1156 # globally and match pattern `projects/*/locations/*/functions/*`
1157 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
1158 # results in a new version of a function being created.
1159 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001160 ],
1161 }</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 Kim65020912020-05-20 12:08:20 -07001189 # response to an event. It encapsulate function and triggers configurations.
1190 &quot;sourceArchiveUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage URL, starting with gs://, pointing to the zip
1191 # archive which contains the function.
1192 &quot;sourceRepository&quot;: { # Describes SourceRepository, used to represent parameters related to # **Beta Feature**
1193 #
1194 # The source repository where a function is hosted.
1195 # source repository where a function is hosted.
1196 &quot;deployedUrl&quot;: &quot;A String&quot;, # Output only. The URL pointing to the hosted repository where the function
1197 # were defined at the time of deployment. It always points to a specific
1198 # commit in the format described above.
1199 &quot;url&quot;: &quot;A String&quot;, # The URL pointing to the hosted repository where the function is defined.
1200 # There are supported Cloud Source Repository URLs in the following
1201 # formats:
1202 #
1203 # To refer to a specific commit:
1204 # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`
1205 # To refer to a moveable alias (branch):
1206 # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`
1207 # In particular, to refer to HEAD use `master` moveable alias.
1208 # To refer to a specific fixed alias (tag):
1209 # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`
1210 #
1211 # You may omit `paths/*` if you want to use the main directory.
1212 },
1213 &quot;network&quot;: &quot;A String&quot;, # The VPC Network that this cloud function can connect to. It can be
1214 # either the fully-qualified URI, or the short name of the network resource.
1215 # If the short network name is used, the network must belong to the same
1216 # project. Otherwise, it must belong to a project within the same
1217 # organization. The format of this field is either
1218 # `projects/{project}/global/networks/{network}` or `{network}`, where
1219 # {project} is a project id where the network is defined, and {network} is
1220 # the short name of the network.
1221 #
1222 # This field is mutually exclusive with `vpc_connector` and will be replaced
1223 # by it.
1224 #
1225 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1226 # more information on connecting Cloud projects.
1227 &quot;vpcConnector&quot;: &quot;A String&quot;, # The VPC Network Connector that this cloud function can connect to. It can
1228 # be either the fully-qualified URI, or the short name of the network
1229 # connector resource. The format of this field is
1230 # `projects/*/locations/*/connectors/*`
1231 #
1232 # This field is mutually exclusive with `network` field and will eventually
1233 # replace it.
1234 #
1235 # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for
1236 # more information on connecting Cloud projects.
1237 &quot;entryPoint&quot;: &quot;A String&quot;, # The name of the function (as defined in source code) that will be
1238 # executed. Defaults to the resource name suffix, if not specified. For
1239 # backward compatibility, if function with given name is not found, then the
1240 # system will try to use function named &quot;function&quot;.
1241 # For Node.js this is name of a function exported by the module specified
1242 # in `source_location`.
1243 &quot;labels&quot;: { # Labels associated with this Cloud Function.
1244 &quot;a_key&quot;: &quot;A String&quot;,
1245 },
1246 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The last update timestamp of a Cloud Function.
1247 &quot;vpcConnectorEgressSettings&quot;: &quot;A String&quot;, # The egress settings for the connector, controlling what traffic is diverted
1248 # through it.
1249 &quot;ingressSettings&quot;: &quot;A String&quot;, # The ingress settings for the function, controlling what traffic can reach
1250 # it.
1251 &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.
1252 &quot;url&quot;: &quot;A String&quot;, # Output only. The deployed url for the function.
1253 },
1254 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # The email of the function&#x27;s service account. If empty, defaults to
1255 # `{project_id}@appspot.gserviceaccount.com`.
1256 &quot;maxInstances&quot;: 42, # The limit on the maximum number of function instances that may coexist at a
1257 # given time.
1258 &quot;description&quot;: &quot;A String&quot;, # User-provided description of a function.
1259 &quot;environmentVariables&quot;: { # Environment variables that shall be available during function execution.
1260 &quot;a_key&quot;: &quot;A String&quot;,
1261 },
1262 &quot;timeout&quot;: &quot;A String&quot;, # The function execution timeout. Execution is considered failed and
1263 # can be terminated if the function is not completed at the end of the
1264 # timeout period. Defaults to 60 seconds.
1265 &quot;status&quot;: &quot;A String&quot;, # Output only. Status of the function deployment.
1266 &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.
1267 # service.
1268 &quot;failurePolicy&quot;: { # Describes the policy in case of function&#x27;s execution failure. # Specifies policy for failed executions.
1269 # If empty, then defaults to ignoring failures (i.e. not retrying them).
1270 &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.
1271 # A function execution will be retried on any failure.
1272 # A failed execution will be retried up to 7 days with an exponential backoff
1273 # (capped at 10 seconds).
1274 # Retried execution is charged as any other execution.
Dan O'Mearadd494642020-05-01 07:42:23 -07001275 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001276 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001277 &quot;eventType&quot;: &quot;A String&quot;, # Required. The type of event to observe. For example:
1278 # `providers/cloud.storage/eventTypes/object.change` and
1279 # `providers/cloud.pubsub/eventTypes/topic.publish`.
1280 #
1281 # Event types match pattern `providers/*/eventTypes/*.*`.
1282 # The pattern contains:
1283 #
1284 # 1. namespace: For example, `cloud.storage` and
1285 # `google.firebase.analytics`.
1286 # 2. resource type: The type of resource on which event occurs. For
1287 # example, the Google Cloud Storage API includes the type `object`.
1288 # 3. action: The action that generates the event. For example, action for
1289 # a Google Cloud Storage Object is &#x27;change&#x27;.
1290 # These parts are lower case.
1291 &quot;resource&quot;: &quot;A String&quot;, # Required. The resource(s) from which to observe events, for example,
1292 # `projects/_/buckets/myBucket`.
1293 #
1294 # Not all syntactically correct values are accepted by all services. For
1295 # example:
1296 #
1297 # 1. The authorization model must support it. Google Cloud Functions
1298 # only allows EventTriggers to be deployed that observe resources in the
1299 # same project as the `CloudFunction`.
1300 # 2. The resource type must match the pattern expected for an
1301 # `event_type`. For example, an `EventTrigger` that has an
1302 # `event_type` of &quot;google.pubsub.topic.publish&quot; should have a resource
1303 # that matches Google Cloud Pub/Sub topics.
1304 #
1305 # Additionally, some services may support short names when creating an
1306 # `EventTrigger`. These will always be returned in the normalized &quot;long&quot;
1307 # format.
1308 #
1309 # See each *service&#x27;s* documentation for supported formats.
1310 &quot;service&quot;: &quot;A String&quot;, # The hostname of the service that should be observed.
1311 #
1312 # If no string is provided, the default service implementing the API will
1313 # be used. For example, `storage.googleapis.com` is the default for all
1314 # event types in the `google.storage` namespace.
1315 },
1316 &quot;sourceUploadUrl&quot;: &quot;A String&quot;, # The Google Cloud Storage signed URL used for source uploading, generated
1317 # by google.cloud.functions.v1.GenerateUploadUrl
1318 &quot;availableMemoryMb&quot;: 42, # The amount of memory in MB available for a function.
1319 # Defaults to 256MB.
1320 &quot;runtime&quot;: &quot;A String&quot;, # The runtime in which to run the function. Required when deploying a new
1321 # function, optional when updating an existing function. For a complete
1322 # list of possible choices, see the
1323 # [`gcloud` command
1324 # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
1325 &quot;name&quot;: &quot;A String&quot;, # A user-defined name of the function. Function names must be unique
1326 # globally and match pattern `projects/*/locations/*/functions/*`
1327 &quot;versionId&quot;: &quot;A String&quot;, # Output only. The version identifier of the Cloud Function. Each deployment attempt
1328 # results in a new version of a function being created.
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;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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001343 # different programming environments, including REST APIs and RPC APIs. It is
Dan O'Mearadd494642020-05-01 07:42:23 -07001344 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1345 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001346 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001347 # You can find out more about this error model and how to work with it in the
1348 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -07001349 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001350 # user-facing error message should be localized and sent in the
1351 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001352 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001353 # message types for APIs to use.
1354 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001355 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 },
1357 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001359 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001360 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1361 # contains progress information and common metadata such as create time.
1362 # Some services might not provide such metadata. Any method that returns a
1363 # long-running operation should document the metadata type, if any.
1364 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1365 },
1366 &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 -07001367 # If `true`, the operation is completed, and either `error` or `response` is
1368 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -07001369 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001370 # method returns no data on success, such as `Delete`, the response is
1371 # `google.protobuf.Empty`. If the original method is standard
1372 # `Get`/`Create`/`Update`, the response should be the resource. For other
1373 # methods, the response should have the type `XxxResponse`, where `Xxx`
1374 # is the original method name. For example, if the original method name
1375 # is `TakeSnapshot()`, the inferred response type is
1376 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001377 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001378 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001379 &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 -07001380 # originally returns it. If you use the default HTTP mapping, the
1381 # `name` should be a resource name ending with `operations/{unique_id}`.
1382 }</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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1468 # prevent simultaneous updates of a policy from overwriting each other.
1469 # It is strongly suggested that systems make use of the `etag` in the
1470 # read-modify-write cycle to perform policy updates in order to avoid race
1471 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1472 # systems are expected to put that etag in the request to `setIamPolicy` to
1473 # ensure that their change will be applied to the same version of the policy.
1474 #
1475 # **Important:** If you use IAM Conditions, you must include the `etag` field
1476 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1477 # you to overwrite a version `3` policy with a version `1` policy, and all of
1478 # the conditions in the version `3` policy are lost.
1479 &quot;version&quot;: 42, # Specifies the format of the policy.
1480 #
1481 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1482 # are rejected.
1483 #
1484 # Any operation that affects conditional role bindings must specify version
1485 # `3`. This requirement applies to the following operations:
1486 #
1487 # * Getting a policy that includes a conditional role binding
1488 # * Adding a conditional role binding to a policy
1489 # * Changing a conditional role binding in a policy
1490 # * Removing any role binding, with or without a condition, from a policy
1491 # that includes conditions
1492 #
1493 # **Important:** If you use IAM Conditions, you must include the `etag` field
1494 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1495 # you to overwrite a version `3` policy with a version `1` policy, and all of
1496 # the conditions in the version `3` policy are lost.
1497 #
1498 # If a policy does not include any conditions, operations on that policy may
1499 # specify any valid version or leave the field unset.
1500 #
1501 # To learn which resources support conditions in their IAM policies, see the
1502 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1503 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1504 { # Specifies the audit configuration for a service.
1505 # The configuration determines which permission types are logged, and what
1506 # identities, if any, are exempted from logging.
1507 # An AuditConfig must have one or more AuditLogConfigs.
1508 #
1509 # If there are AuditConfigs for both `allServices` and a specific service,
1510 # the union of the two AuditConfigs is used for that service: the log_types
1511 # specified in each AuditConfig are enabled, and the exempted_members in each
1512 # AuditLogConfig are exempted.
1513 #
1514 # Example Policy with multiple AuditConfigs:
1515 #
1516 # {
1517 # &quot;audit_configs&quot;: [
1518 # {
1519 # &quot;service&quot;: &quot;allServices&quot;
1520 # &quot;audit_log_configs&quot;: [
1521 # {
1522 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1523 # &quot;exempted_members&quot;: [
1524 # &quot;user:jose@example.com&quot;
1525 # ]
1526 # },
1527 # {
1528 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1529 # },
1530 # {
1531 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
1532 # }
1533 # ]
1534 # },
1535 # {
1536 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
1537 # &quot;audit_log_configs&quot;: [
1538 # {
1539 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1540 # },
1541 # {
1542 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1543 # &quot;exempted_members&quot;: [
1544 # &quot;user:aliya@example.com&quot;
1545 # ]
1546 # }
1547 # ]
1548 # }
1549 # ]
1550 # }
1551 #
1552 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1553 # logging. It also exempts jose@example.com from DATA_READ logging, and
1554 # aliya@example.com from DATA_WRITE logging.
1555 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1556 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1557 # `allServices` is a special value that covers all services.
1558 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1559 { # Provides the configuration for logging a type of permissions.
1560 # Example:
1561 #
1562 # {
1563 # &quot;audit_log_configs&quot;: [
1564 # {
1565 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1566 # &quot;exempted_members&quot;: [
1567 # &quot;user:jose@example.com&quot;
1568 # ]
1569 # },
1570 # {
1571 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1572 # }
1573 # ]
1574 # }
1575 #
1576 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1577 # jose@example.com from DATA_READ logging.
1578 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1579 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1580 # permission.
1581 # Follows the same format of Binding.members.
1582 &quot;A String&quot;,
1583 ],
1584 },
1585 ],
1586 },
1587 ],
1588 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001589 # `condition` that determines how and when the `bindings` are applied. Each
1590 # of the `bindings` must contain at least one member.
1591 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001592 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1593 #
1594 # If the condition evaluates to `true`, then this binding applies to the
1595 # current request.
1596 #
1597 # If the condition evaluates to `false`, then this binding does not apply to
1598 # the current request. However, a different role binding might grant the same
1599 # role to one or more of the members in this binding.
1600 #
1601 # To learn which resources support conditions in their IAM policies, see the
1602 # [IAM
1603 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1604 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1605 # are documented at https://github.com/google/cel-spec.
1606 #
1607 # Example (Comparison):
1608 #
1609 # title: &quot;Summary size limit&quot;
1610 # description: &quot;Determines if a summary is less than 100 chars&quot;
1611 # expression: &quot;document.summary.size() &lt; 100&quot;
1612 #
1613 # Example (Equality):
1614 #
1615 # title: &quot;Requestor is owner&quot;
1616 # description: &quot;Determines if requestor is the document owner&quot;
1617 # expression: &quot;document.owner == request.auth.claims.email&quot;
1618 #
1619 # Example (Logic):
1620 #
1621 # title: &quot;Public documents&quot;
1622 # description: &quot;Determine whether the document should be publicly visible&quot;
1623 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1624 #
1625 # Example (Data Manipulation):
1626 #
1627 # title: &quot;Notification string&quot;
1628 # description: &quot;Create a notification string with a timestamp.&quot;
1629 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1630 #
1631 # The exact variables and functions that may be referenced within an expression
1632 # are determined by the service that evaluates it. See the service
1633 # documentation for additional information.
1634 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1635 # describes the expression, e.g. when hovered over it in a UI.
1636 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1637 # syntax.
1638 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1639 # its purpose. This can be used e.g. in UIs which allow to enter the
1640 # expression.
1641 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1642 # reporting, e.g. a file name and a position in the file.
1643 },
1644 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001645 # `members` can have the following values:
1646 #
1647 # * `allUsers`: A special identifier that represents anyone who is
1648 # on the internet; with or without a Google account.
1649 #
1650 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1651 # who is authenticated with a Google account or a service account.
1652 #
1653 # * `user:{emailid}`: An email address that represents a specific Google
1654 # account. For example, `alice@example.com` .
1655 #
1656 #
1657 # * `serviceAccount:{emailid}`: An email address that represents a service
1658 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1659 #
1660 # * `group:{emailid}`: An email address that represents a Google group.
1661 # For example, `admins@example.com`.
1662 #
1663 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1664 # identifier) representing a user that has been recently deleted. For
1665 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1666 # recovered, this value reverts to `user:{emailid}` and the recovered user
1667 # retains the role in the binding.
1668 #
1669 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1670 # unique identifier) representing a service account that has been recently
1671 # deleted. For example,
1672 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1673 # If the service account is undeleted, this value reverts to
1674 # `serviceAccount:{emailid}` and the undeleted service account retains the
1675 # role in the binding.
1676 #
1677 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1678 # identifier) representing a Google group that has been recently
1679 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1680 # the group is recovered, this value reverts to `group:{emailid}` and the
1681 # recovered group retains the role in the binding.
1682 #
1683 #
1684 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1685 # users of that domain. For example, `google.com` or `example.com`.
1686 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001687 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001688 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001689 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1690 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001691 },
1692 ],
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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1777 # prevent simultaneous updates of a policy from overwriting each other.
1778 # It is strongly suggested that systems make use of the `etag` in the
1779 # read-modify-write cycle to perform policy updates in order to avoid race
1780 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1781 # systems are expected to put that etag in the request to `setIamPolicy` to
1782 # ensure that their change will be applied to the same version of the policy.
1783 #
1784 # **Important:** If you use IAM Conditions, you must include the `etag` field
1785 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1786 # you to overwrite a version `3` policy with a version `1` policy, and all of
1787 # the conditions in the version `3` policy are lost.
1788 &quot;version&quot;: 42, # Specifies the format of the policy.
1789 #
1790 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1791 # are rejected.
1792 #
1793 # Any operation that affects conditional role bindings must specify version
1794 # `3`. This requirement applies to the following operations:
1795 #
1796 # * Getting a policy that includes a conditional role binding
1797 # * Adding a conditional role binding to a policy
1798 # * Changing a conditional role binding in a policy
1799 # * Removing any role binding, with or without a condition, from a policy
1800 # that includes conditions
1801 #
1802 # **Important:** If you use IAM Conditions, you must include the `etag` field
1803 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1804 # you to overwrite a version `3` policy with a version `1` policy, and all of
1805 # the conditions in the version `3` policy are lost.
1806 #
1807 # If a policy does not include any conditions, operations on that policy may
1808 # specify any valid version or leave the field unset.
1809 #
1810 # To learn which resources support conditions in their IAM policies, see the
1811 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1812 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1813 { # Specifies the audit configuration for a service.
1814 # The configuration determines which permission types are logged, and what
1815 # identities, if any, are exempted from logging.
1816 # An AuditConfig must have one or more AuditLogConfigs.
1817 #
1818 # If there are AuditConfigs for both `allServices` and a specific service,
1819 # the union of the two AuditConfigs is used for that service: the log_types
1820 # specified in each AuditConfig are enabled, and the exempted_members in each
1821 # AuditLogConfig are exempted.
1822 #
1823 # Example Policy with multiple AuditConfigs:
1824 #
1825 # {
1826 # &quot;audit_configs&quot;: [
1827 # {
1828 # &quot;service&quot;: &quot;allServices&quot;
1829 # &quot;audit_log_configs&quot;: [
1830 # {
1831 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1832 # &quot;exempted_members&quot;: [
1833 # &quot;user:jose@example.com&quot;
1834 # ]
1835 # },
1836 # {
1837 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1838 # },
1839 # {
1840 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
1841 # }
1842 # ]
1843 # },
1844 # {
1845 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
1846 # &quot;audit_log_configs&quot;: [
1847 # {
1848 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1849 # },
1850 # {
1851 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1852 # &quot;exempted_members&quot;: [
1853 # &quot;user:aliya@example.com&quot;
1854 # ]
1855 # }
1856 # ]
1857 # }
1858 # ]
1859 # }
1860 #
1861 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1862 # logging. It also exempts jose@example.com from DATA_READ logging, and
1863 # aliya@example.com from DATA_WRITE logging.
1864 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1865 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1866 # `allServices` is a special value that covers all services.
1867 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1868 { # Provides the configuration for logging a type of permissions.
1869 # Example:
1870 #
1871 # {
1872 # &quot;audit_log_configs&quot;: [
1873 # {
1874 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1875 # &quot;exempted_members&quot;: [
1876 # &quot;user:jose@example.com&quot;
1877 # ]
1878 # },
1879 # {
1880 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1881 # }
1882 # ]
1883 # }
1884 #
1885 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1886 # jose@example.com from DATA_READ logging.
1887 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1888 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1889 # permission.
1890 # Follows the same format of Binding.members.
1891 &quot;A String&quot;,
1892 ],
1893 },
1894 ],
1895 },
1896 ],
1897 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001898 # `condition` that determines how and when the `bindings` are applied. Each
1899 # of the `bindings` must contain at least one member.
1900 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001901 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1902 #
1903 # If the condition evaluates to `true`, then this binding applies to the
1904 # current request.
1905 #
1906 # If the condition evaluates to `false`, then this binding does not apply to
1907 # the current request. However, a different role binding might grant the same
1908 # role to one or more of the members in this binding.
1909 #
1910 # To learn which resources support conditions in their IAM policies, see the
1911 # [IAM
1912 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1913 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1914 # are documented at https://github.com/google/cel-spec.
1915 #
1916 # Example (Comparison):
1917 #
1918 # title: &quot;Summary size limit&quot;
1919 # description: &quot;Determines if a summary is less than 100 chars&quot;
1920 # expression: &quot;document.summary.size() &lt; 100&quot;
1921 #
1922 # Example (Equality):
1923 #
1924 # title: &quot;Requestor is owner&quot;
1925 # description: &quot;Determines if requestor is the document owner&quot;
1926 # expression: &quot;document.owner == request.auth.claims.email&quot;
1927 #
1928 # Example (Logic):
1929 #
1930 # title: &quot;Public documents&quot;
1931 # description: &quot;Determine whether the document should be publicly visible&quot;
1932 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1933 #
1934 # Example (Data Manipulation):
1935 #
1936 # title: &quot;Notification string&quot;
1937 # description: &quot;Create a notification string with a timestamp.&quot;
1938 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1939 #
1940 # The exact variables and functions that may be referenced within an expression
1941 # are determined by the service that evaluates it. See the service
1942 # documentation for additional information.
1943 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1944 # describes the expression, e.g. when hovered over it in a UI.
1945 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1946 # syntax.
1947 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1948 # its purpose. This can be used e.g. in UIs which allow to enter the
1949 # expression.
1950 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1951 # reporting, e.g. a file name and a position in the file.
1952 },
1953 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001954 # `members` can have the following values:
1955 #
1956 # * `allUsers`: A special identifier that represents anyone who is
1957 # on the internet; with or without a Google account.
1958 #
1959 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1960 # who is authenticated with a Google account or a service account.
1961 #
1962 # * `user:{emailid}`: An email address that represents a specific Google
1963 # account. For example, `alice@example.com` .
1964 #
1965 #
1966 # * `serviceAccount:{emailid}`: An email address that represents a service
1967 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1968 #
1969 # * `group:{emailid}`: An email address that represents a Google group.
1970 # For example, `admins@example.com`.
1971 #
1972 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1973 # identifier) representing a user that has been recently deleted. For
1974 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1975 # recovered, this value reverts to `user:{emailid}` and the recovered user
1976 # retains the role in the binding.
1977 #
1978 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1979 # unique identifier) representing a service account that has been recently
1980 # deleted. For example,
1981 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1982 # If the service account is undeleted, this value reverts to
1983 # `serviceAccount:{emailid}` and the undeleted service account retains the
1984 # role in the binding.
1985 #
1986 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1987 # identifier) representing a Google group that has been recently
1988 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1989 # the group is recovered, this value reverts to `group:{emailid}` and the
1990 # recovered group retains the role in the binding.
1991 #
1992 #
1993 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1994 # users of that domain. For example, `google.com` or `example.com`.
1995 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001996 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001997 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001998 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1999 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -07002000 },
2001 ],
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>