blob: 9556650080adf286485bd0cb03129d72dc6b79cc [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="spanner_v1.html">Cloud Spanner API</a> . <a href="spanner_v1.projects.html">projects</a> . <a href="spanner_v1.projects.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="spanner_v1.projects.instances.backupOperations.html">backupOperations()</a></code>
79</p>
80<p class="firstline">Returns the backupOperations Resource.</p>
81
82<p class="toc_element">
83 <code><a href="spanner_v1.projects.instances.backups.html">backups()</a></code>
84</p>
85<p class="firstline">Returns the backups Resource.</p>
86
87<p class="toc_element">
88 <code><a href="spanner_v1.projects.instances.databaseOperations.html">databaseOperations()</a></code>
89</p>
90<p class="firstline">Returns the databaseOperations Resource.</p>
91
92<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="spanner_v1.projects.instances.databases.html">databases()</a></code>
94</p>
95<p class="firstline">Returns the databases Resource.</p>
96
97<p class="toc_element">
98 <code><a href="spanner_v1.projects.instances.operations.html">operations()</a></code>
99</p>
100<p class="firstline">Returns the operations Resource.</p>
101
102<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400104<p class="firstline">Creates an instance and begins preparing it to begin serving. The</p>
105<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -0700106 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400107<p class="firstline">Deletes an instance.</p>
108<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code><a href="#get">get(name, fieldMask=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400110<p class="firstline">Gets information about a particular instance.</p>
111<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400113<p class="firstline">Gets the access control policy for an instance resource. Returns an empty</p>
114<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700115 <code><a href="#list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400116<p class="firstline">Lists all instances in the given project.</p>
117<p class="toc_element">
118 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
119<p class="firstline">Retrieves the next page of results.</p>
120<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400122<p class="firstline">Updates an instance, and begins allocating or releasing resources</p>
123<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700124 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400125<p class="firstline">Sets the access control policy on an instance resource. Replaces any</p>
126<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400128<p class="firstline">Returns permissions that the caller has on the specified instance resource.</p>
129<h3>Method Details</h3>
130<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700131 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400132 <pre>Creates an instance and begins preparing it to begin serving. The
133returned long-running operation
134can be used to track the progress of preparing the new
135instance. The instance name is assigned by the caller. If the
136named instance already exists, `CreateInstance` returns
137`ALREADY_EXISTS`.
138
139Immediately upon completion of this request:
140
141 * The instance is readable via the API, with all requested attributes
142 but no allocated resources. Its state is `CREATING`.
143
144Until completion of the returned operation:
145
146 * Cancelling the operation renders the instance immediately unreadable
147 via the API.
148 * The instance can be deleted.
149 * All other attempts to modify the instance are rejected.
150
151Upon completion of the returned operation:
152
153 * Billing for all successfully-allocated resources begins (some types
154 may have lower than the requested levels).
155 * Databases can be created in the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 * The instance&#x27;s allocated resource levels are readable via the API.
157 * The instance&#x27;s state becomes `READY`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400158
159The returned long-running operation will
Dan O'Mearadd494642020-05-01 07:42:23 -0700160have a name of the format `&lt;instance_name&gt;/operations/&lt;operation_id&gt;` and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400161can be used to track creation of the instance. The
162metadata field type is
163CreateInstanceMetadata.
164The response field type is
165Instance, if successful.
166
167Args:
168 parent: string, Required. The name of the project in which to create the instance. Values
Dan O'Mearadd494642020-05-01 07:42:23 -0700169are of the form `projects/&lt;project&gt;`. (required)
170 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400171 The object takes the form of:
172
173{ # The request for CreateInstance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700174 &quot;instanceId&quot;: &quot;A String&quot;, # Required. The ID of the instance to create. Valid identifiers are of the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175 # form `a-z*[a-z0-9]` and must be between 2 and 64 characters in
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400176 # length.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;instance&quot;: { # An isolated set of Cloud Spanner resources on which databases can be hosted. # Required. The instance to create. The name may be omitted, but if
Dan O'Mearadd494642020-05-01 07:42:23 -0700178 # specified must be `&lt;parent&gt;/instances/&lt;instance_id&gt;`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 &quot;name&quot;: &quot;A String&quot;, # Required. A unique identifier for the instance, which cannot be changed
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400180 # after the instance is created. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 # `projects/&lt;project&gt;/instances/a-z*[a-z0-9]`. The final
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 # segment of the name must be between 2 and 64 characters in length.
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &quot;displayName&quot;: &quot;A String&quot;, # Required. The descriptive name for this instance as it appears in UIs.
184 # Must be unique per project and between 4 and 30 characters in length.
185 &quot;endpointUris&quot;: [ # Deprecated. This field is not populated.
186 &quot;A String&quot;,
187 ],
188 &quot;nodeCount&quot;: 42, # The number of nodes allocated to this instance. This
189 # may be zero in API responses for instances that are not yet in state
190 # `READY`.
191 #
192 # See [the
193 # documentation](https://cloud.google.com/spanner/docs/instances#node_count)
194 # for more information about nodes.
195 &quot;labels&quot;: { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
196 # resources into groups that reflect a customer&#x27;s organizational needs and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400197 # deployment strategies. Cloud Labels can be used to filter collections of
198 # resources. They can be used to control how resource metrics are aggregated.
199 # And they can be used as arguments to policy management rules (e.g. route,
200 # firewall, load balancing, etc.).
201 #
202 # * Label keys must be between 1 and 63 characters long and must conform to
203 # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
204 # * Label values must be between 0 and 63 characters long and must conform
205 # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
206 # * No more than 64 labels can be associated with a given resource.
207 #
208 # See https://goo.gl/xmQnxf for more information on and examples of labels.
209 #
210 # If you plan to use labels in your own code, please note that additional
211 # characters may be allowed in the future. And so you are advised to use an
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 # internal label representation, such as JSON, which doesn&#x27;t rely upon
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400213 # specific characters being disallowed. For example, representing labels
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 # as the string: name + &quot;_&quot; + value would prove problematic if we were to
215 # allow &quot;_&quot; in a future release.
216 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400217 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700218 &quot;config&quot;: &quot;A String&quot;, # Required. The name of the instance&#x27;s configuration. Values are of the form
219 # `projects/&lt;project&gt;/instanceConfigs/&lt;configuration&gt;`. See
220 # also InstanceConfig and
221 # ListInstanceConfigs.
222 &quot;state&quot;: &quot;A String&quot;, # Output only. The current instance state. For
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400223 # CreateInstance, the state must be
224 # either omitted or set to `CREATING`. For
225 # UpdateInstance, the state must be
226 # either omitted or set to `READY`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400227 },
228 }
229
230 x__xgafv: string, V1 error format.
231 Allowed values
232 1 - v1 error format
233 2 - v2 error format
234
235Returns:
236 An object of the form:
237
238 { # This resource represents a long-running operation that is the result of a
239 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &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 -0700241 # If `true`, the operation is completed, and either `error` or `response` is
242 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244 # method returns no data on success, such as `Delete`, the response is
245 # `google.protobuf.Empty`. If the original method is standard
246 # `Get`/`Create`/`Update`, the response should be the resource. For other
247 # methods, the response should have the type `XxxResponse`, where `Xxx`
248 # is the original method name. For example, if the original method name
249 # is `TakeSnapshot()`, the inferred response type is
250 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 &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 -0700254 # originally returns it. If you use the default HTTP mapping, the
255 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 &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.
257 # different programming environments, including REST APIs and RPC APIs. It is
258 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
259 # three pieces of data: error code, error message, and error details.
260 #
261 # You can find out more about this error model and how to work with it in the
262 # [API Design Guide](https://cloud.google.com/apis/design/errors).
263 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
264 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
265 # user-facing error message should be localized and sent in the
266 # google.rpc.Status.details field, or localized by the client.
267 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
268 # message types for APIs to use.
269 {
270 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
271 },
272 ],
273 },
274 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
Dan O'Mearadd494642020-05-01 07:42:23 -0700275 # contains progress information and common metadata such as create time.
276 # Some services might not provide such metadata. Any method that returns a
277 # long-running operation should document the metadata type, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700278 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400280 }</pre>
281</div>
282
283<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700284 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400285 <pre>Deletes an instance.
286
287Immediately upon completion of the request:
288
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 * Billing ceases for all of the instance&#x27;s reserved resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400290
291Soon afterward:
292
293 * The instance and *all of its databases* immediately and
294 irrevocably disappear from the API. All data in the databases
295 is permanently deleted.
296
297Args:
298 name: string, Required. The name of the instance to be deleted. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700299`projects/&lt;project&gt;/instances/&lt;instance&gt;` (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400300 x__xgafv: string, V1 error format.
301 Allowed values
302 1 - v1 error format
303 2 - v2 error format
304
305Returns:
306 An object of the form:
307
308 { # A generic empty message that you can re-use to avoid defining duplicated
309 # empty messages in your APIs. A typical example is to use it as the request
310 # or the response type of an API method. For instance:
311 #
312 # service Foo {
313 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
314 # }
315 #
316 # The JSON representation for `Empty` is empty JSON object `{}`.
317 }</pre>
318</div>
319
320<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 <code class="details" id="get">get(name, fieldMask=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400322 <pre>Gets information about a particular instance.
323
324Args:
325 name: string, Required. The name of the requested instance. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700326`projects/&lt;project&gt;/instances/&lt;instance&gt;`. (required)
327 fieldMask: string, If field_mask is present, specifies the subset of Instance fields that
328should be returned.
329If absent, all Instance fields are returned.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400330 x__xgafv: string, V1 error format.
331 Allowed values
332 1 - v1 error format
333 2 - v2 error format
334
335Returns:
336 An object of the form:
337
338 { # An isolated set of Cloud Spanner resources on which databases can be hosted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700339 &quot;name&quot;: &quot;A String&quot;, # Required. A unique identifier for the instance, which cannot be changed
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400340 # after the instance is created. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700341 # `projects/&lt;project&gt;/instances/a-z*[a-z0-9]`. The final
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 # segment of the name must be between 2 and 64 characters in length.
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 &quot;displayName&quot;: &quot;A String&quot;, # Required. The descriptive name for this instance as it appears in UIs.
344 # Must be unique per project and between 4 and 30 characters in length.
345 &quot;endpointUris&quot;: [ # Deprecated. This field is not populated.
346 &quot;A String&quot;,
347 ],
348 &quot;nodeCount&quot;: 42, # The number of nodes allocated to this instance. This
349 # may be zero in API responses for instances that are not yet in state
350 # `READY`.
351 #
352 # See [the
353 # documentation](https://cloud.google.com/spanner/docs/instances#node_count)
354 # for more information about nodes.
355 &quot;labels&quot;: { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
356 # resources into groups that reflect a customer&#x27;s organizational needs and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400357 # deployment strategies. Cloud Labels can be used to filter collections of
358 # resources. They can be used to control how resource metrics are aggregated.
359 # And they can be used as arguments to policy management rules (e.g. route,
360 # firewall, load balancing, etc.).
361 #
362 # * Label keys must be between 1 and 63 characters long and must conform to
363 # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
364 # * Label values must be between 0 and 63 characters long and must conform
365 # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
366 # * No more than 64 labels can be associated with a given resource.
367 #
368 # See https://goo.gl/xmQnxf for more information on and examples of labels.
369 #
370 # If you plan to use labels in your own code, please note that additional
371 # characters may be allowed in the future. And so you are advised to use an
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 # internal label representation, such as JSON, which doesn&#x27;t rely upon
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400373 # specific characters being disallowed. For example, representing labels
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 # as the string: name + &quot;_&quot; + value would prove problematic if we were to
375 # allow &quot;_&quot; in a future release.
376 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400377 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 &quot;config&quot;: &quot;A String&quot;, # Required. The name of the instance&#x27;s configuration. Values are of the form
379 # `projects/&lt;project&gt;/instanceConfigs/&lt;configuration&gt;`. See
380 # also InstanceConfig and
381 # ListInstanceConfigs.
382 &quot;state&quot;: &quot;A String&quot;, # Output only. The current instance state. For
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400383 # CreateInstance, the state must be
384 # either omitted or set to `CREATING`. For
385 # UpdateInstance, the state must be
386 # either omitted or set to `READY`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400387 }</pre>
388</div>
389
390<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700391 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400392 <pre>Gets the access control policy for an instance resource. Returns an empty
393policy if an instance exists but does not have a policy set.
394
395Authorization requires `spanner.instances.getIamPolicy` on
396resource.
397
398Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700399 resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;` for instance resources and `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;/databases/&lt;database ID&gt;` for database resources. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700400 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400401 The object takes the form of:
402
403{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700404 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
405 # `GetIamPolicy`.
406 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -0700407 #
408 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
409 # rejected.
410 #
411 # Requests for policies with any conditional bindings must specify version 3.
412 # Policies without any conditional bindings may specify any valid value or
413 # leave the field unset.
414 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400415 }
416
417 x__xgafv: string, V1 error format.
418 Allowed values
419 1 - v1 error format
420 2 - v2 error format
421
422Returns:
423 An object of the form:
424
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 { # An Identity and Access Management (IAM) policy, which specifies access
426 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400427 #
428 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700429 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
430 # `members` to a single `role`. Members can be user accounts, service accounts,
431 # Google groups, and domains (such as G Suite). A `role` is a named list of
432 # permissions; each `role` can be an IAM predefined role or a user-created
433 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400434 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700435 # Optionally, a `binding` can specify a `condition`, which is a logical
436 # expression that allows access to a resource only if the expression evaluates
437 # to `true`. A condition can add constraints based on attributes of the
438 # request, the resource, or both.
439 #
440 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400441 #
442 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400444 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700445 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
446 # &quot;members&quot;: [
447 # &quot;user:mike@example.com&quot;,
448 # &quot;group:admins@example.com&quot;,
449 # &quot;domain:google.com&quot;,
450 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400451 # ]
452 # },
453 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
455 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
456 # &quot;condition&quot;: {
457 # &quot;title&quot;: &quot;expirable access&quot;,
458 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
459 # &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 -0700460 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400461 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700462 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
464 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400465 # }
466 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700467 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 #
469 # bindings:
470 # - members:
471 # - user:mike@example.com
472 # - group:admins@example.com
473 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700474 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
475 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700477 # - user:eve@example.com
478 # role: roles/resourcemanager.organizationViewer
479 # condition:
480 # title: expirable access
481 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700482 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700483 # - etag: BwWWja0YfJA=
484 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400486 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700487 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700488 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
489 # prevent simultaneous updates of a policy from overwriting each other.
490 # It is strongly suggested that systems make use of the `etag` in the
491 # read-modify-write cycle to perform policy updates in order to avoid race
492 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
493 # systems are expected to put that etag in the request to `setIamPolicy` to
494 # ensure that their change will be applied to the same version of the policy.
495 #
496 # **Important:** If you use IAM Conditions, you must include the `etag` field
497 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
498 # you to overwrite a version `3` policy with a version `1` policy, and all of
499 # the conditions in the version `3` policy are lost.
500 &quot;version&quot;: 42, # Specifies the format of the policy.
501 #
502 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
503 # are rejected.
504 #
505 # Any operation that affects conditional role bindings must specify version
506 # `3`. This requirement applies to the following operations:
507 #
508 # * Getting a policy that includes a conditional role binding
509 # * Adding a conditional role binding to a policy
510 # * Changing a conditional role binding in a policy
511 # * Removing any role binding, with or without a condition, from a policy
512 # that includes conditions
513 #
514 # **Important:** If you use IAM Conditions, you must include the `etag` field
515 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
516 # you to overwrite a version `3` policy with a version `1` policy, and all of
517 # the conditions in the version `3` policy are lost.
518 #
519 # If a policy does not include any conditions, operations on that policy may
520 # specify any valid version or leave the field unset.
521 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700522 # `condition` that determines how and when the `bindings` are applied. Each
523 # of the `bindings` must contain at least one member.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400524 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700525 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
526 # NOTE: An unsatisfied condition will not allow user access via current
527 # binding. Different bindings, including their conditions, are examined
528 # independently.
529 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
530 # are documented at https://github.com/google/cel-spec.
531 #
532 # Example (Comparison):
533 #
534 # title: &quot;Summary size limit&quot;
535 # description: &quot;Determines if a summary is less than 100 chars&quot;
536 # expression: &quot;document.summary.size() &lt; 100&quot;
537 #
538 # Example (Equality):
539 #
540 # title: &quot;Requestor is owner&quot;
541 # description: &quot;Determines if requestor is the document owner&quot;
542 # expression: &quot;document.owner == request.auth.claims.email&quot;
543 #
544 # Example (Logic):
545 #
546 # title: &quot;Public documents&quot;
547 # description: &quot;Determine whether the document should be publicly visible&quot;
548 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
549 #
550 # Example (Data Manipulation):
551 #
552 # title: &quot;Notification string&quot;
553 # description: &quot;Create a notification string with a timestamp.&quot;
554 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
555 #
556 # The exact variables and functions that may be referenced within an expression
557 # are determined by the service that evaluates it. See the service
558 # documentation for additional information.
559 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
560 # reporting, e.g. a file name and a position in the file.
561 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
562 # its purpose. This can be used e.g. in UIs which allow to enter the
563 # expression.
564 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
565 # describes the expression, e.g. when hovered over it in a UI.
566 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
567 # syntax.
568 },
569 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400570 # `members` can have the following values:
571 #
572 # * `allUsers`: A special identifier that represents anyone who is
573 # on the internet; with or without a Google account.
574 #
575 # * `allAuthenticatedUsers`: A special identifier that represents anyone
576 # who is authenticated with a Google account or a service account.
577 #
578 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 # account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400580 #
581 #
582 # * `serviceAccount:{emailid}`: An email address that represents a service
583 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
584 #
585 # * `group:{emailid}`: An email address that represents a Google group.
586 # For example, `admins@example.com`.
587 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700588 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
589 # identifier) representing a user that has been recently deleted. For
590 # example, `alice@example.com?uid=123456789012345678901`. If the user is
591 # recovered, this value reverts to `user:{emailid}` and the recovered user
592 # retains the role in the binding.
593 #
594 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
595 # unique identifier) representing a service account that has been recently
596 # deleted. For example,
597 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
598 # If the service account is undeleted, this value reverts to
599 # `serviceAccount:{emailid}` and the undeleted service account retains the
600 # role in the binding.
601 #
602 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
603 # identifier) representing a Google group that has been recently
604 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
605 # the group is recovered, this value reverts to `group:{emailid}` and the
606 # recovered group retains the role in the binding.
607 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 #
609 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400610 # users of that domain. For example, `google.com` or `example.com`.
611 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700612 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400613 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
615 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400616 },
617 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400618 }</pre>
619</div>
620
621<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 <code class="details" id="list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400623 <pre>Lists all instances in the given project.
624
625Args:
626 parent: string, Required. The name of the project for which a list of instances is
Dan O'Mearadd494642020-05-01 07:42:23 -0700627requested. Values are of the form `projects/&lt;project&gt;`. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700628 filter: string, An expression for filtering the results of the request. Filter rules are
629case insensitive. The fields eligible for filtering are:
630
631 * `name`
632 * `display_name`
633 * `labels.key` where key is the name of a label
634
635Some examples of using filters are:
636
Dan O'Mearadd494642020-05-01 07:42:23 -0700637 * `name:*` --&gt; The instance has a name.
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 * `name:Howl` --&gt; The instance&#x27;s name contains the string &quot;howl&quot;.
Dan O'Mearadd494642020-05-01 07:42:23 -0700639 * `name:HOWL` --&gt; Equivalent to above.
640 * `NAME:howl` --&gt; Equivalent to above.
Bu Sun Kim65020912020-05-20 12:08:20 -0700641 * `labels.env:*` --&gt; The instance has the label &quot;env&quot;.
642 * `labels.env:dev` --&gt; The instance has the label &quot;env&quot; and the value of
643 the label contains the string &quot;dev&quot;.
644 * `name:howl labels.env:dev` --&gt; The instance&#x27;s name contains &quot;howl&quot; and
645 it has the label &quot;env&quot; with its value
646 containing &quot;dev&quot;.
647 pageToken: string, If non-empty, `page_token` should contain a
648next_page_token from a
649previous ListInstancesResponse.
650 pageSize: integer, Number of instances to be returned in the response. If 0 or less, defaults
651to the server&#x27;s maximum allowed page size.
652 x__xgafv: string, V1 error format.
653 Allowed values
654 1 - v1 error format
655 2 - v2 error format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400656
657Returns:
658 An object of the form:
659
660 { # The response for ListInstances.
Bu Sun Kim65020912020-05-20 12:08:20 -0700661 &quot;instances&quot;: [ # The list of requested instances.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400662 { # An isolated set of Cloud Spanner resources on which databases can be hosted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;name&quot;: &quot;A String&quot;, # Required. A unique identifier for the instance, which cannot be changed
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400664 # after the instance is created. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700665 # `projects/&lt;project&gt;/instances/a-z*[a-z0-9]`. The final
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700666 # segment of the name must be between 2 and 64 characters in length.
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 &quot;displayName&quot;: &quot;A String&quot;, # Required. The descriptive name for this instance as it appears in UIs.
668 # Must be unique per project and between 4 and 30 characters in length.
669 &quot;endpointUris&quot;: [ # Deprecated. This field is not populated.
670 &quot;A String&quot;,
671 ],
672 &quot;nodeCount&quot;: 42, # The number of nodes allocated to this instance. This
673 # may be zero in API responses for instances that are not yet in state
674 # `READY`.
675 #
676 # See [the
677 # documentation](https://cloud.google.com/spanner/docs/instances#node_count)
678 # for more information about nodes.
679 &quot;labels&quot;: { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
680 # resources into groups that reflect a customer&#x27;s organizational needs and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400681 # deployment strategies. Cloud Labels can be used to filter collections of
682 # resources. They can be used to control how resource metrics are aggregated.
683 # And they can be used as arguments to policy management rules (e.g. route,
684 # firewall, load balancing, etc.).
685 #
686 # * Label keys must be between 1 and 63 characters long and must conform to
687 # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
688 # * Label values must be between 0 and 63 characters long and must conform
689 # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
690 # * No more than 64 labels can be associated with a given resource.
691 #
692 # See https://goo.gl/xmQnxf for more information on and examples of labels.
693 #
694 # If you plan to use labels in your own code, please note that additional
695 # characters may be allowed in the future. And so you are advised to use an
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 # internal label representation, such as JSON, which doesn&#x27;t rely upon
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400697 # specific characters being disallowed. For example, representing labels
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 # as the string: name + &quot;_&quot; + value would prove problematic if we were to
699 # allow &quot;_&quot; in a future release.
700 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400701 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700702 &quot;config&quot;: &quot;A String&quot;, # Required. The name of the instance&#x27;s configuration. Values are of the form
703 # `projects/&lt;project&gt;/instanceConfigs/&lt;configuration&gt;`. See
704 # also InstanceConfig and
705 # ListInstanceConfigs.
706 &quot;state&quot;: &quot;A String&quot;, # Output only. The current instance state. For
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400707 # CreateInstance, the state must be
708 # either omitted or set to `CREATING`. For
709 # UpdateInstance, the state must be
710 # either omitted or set to `READY`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400711 },
712 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700713 &quot;nextPageToken&quot;: &quot;A String&quot;, # `next_page_token` can be sent in a subsequent
714 # ListInstances call to fetch more
715 # of the matching instances.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400716 }</pre>
717</div>
718
719<div class="method">
720 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
721 <pre>Retrieves the next page of results.
722
723Args:
724 previous_request: The request for the previous page. (required)
725 previous_response: The response from the request for the previous page. (required)
726
727Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400729 page. Returns None if there are no more items in the collection.
730 </pre>
731</div>
732
733<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700734 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400735 <pre>Updates an instance, and begins allocating or releasing resources
736as requested. The returned long-running
737operation can be used to track the
738progress of updating the instance. If the named instance does not
739exist, returns `NOT_FOUND`.
740
741Immediately upon completion of this request:
742
Bu Sun Kim65020912020-05-20 12:08:20 -0700743 * For resource types for which a decrease in the instance&#x27;s allocation
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400744 has been requested, billing is based on the newly-requested level.
745
746Until completion of the returned operation:
747
Bu Sun Kim65020912020-05-20 12:08:20 -0700748 * Cancelling the operation sets its metadata&#x27;s
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400749 cancel_time, and begins
750 restoring resources to their pre-request values. The operation
751 is guaranteed to succeed at undoing all resource changes,
752 after which point it terminates with a `CANCELLED` status.
753 * All other attempts to modify the instance are rejected.
754 * Reading the instance via the API continues to give the pre-request
755 resource levels.
756
757Upon completion of the returned operation:
758
759 * Billing begins for all successfully-allocated resources (some types
760 may have lower than the requested levels).
Bu Sun Kim65020912020-05-20 12:08:20 -0700761 * All newly-reserved resources are available for serving the instance&#x27;s
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400762 tables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700763 * The instance&#x27;s new resource levels are readable via the API.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400764
765The returned long-running operation will
Dan O'Mearadd494642020-05-01 07:42:23 -0700766have a name of the format `&lt;instance_name&gt;/operations/&lt;operation_id&gt;` and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400767can be used to track the instance modification. The
768metadata field type is
769UpdateInstanceMetadata.
770The response field type is
771Instance, if successful.
772
773Authorization requires `spanner.instances.update` permission on
774resource name.
775
776Args:
777 name: string, Required. A unique identifier for the instance, which cannot be changed
778after the instance is created. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700779`projects/&lt;project&gt;/instances/a-z*[a-z0-9]`. The final
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780segment of the name must be between 2 and 64 characters in length. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700781 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400782 The object takes the form of:
783
784{ # The request for UpdateInstance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 &quot;fieldMask&quot;: &quot;A String&quot;, # Required. A mask specifying which fields in Instance should be updated.
786 # The field mask must always be specified; this prevents any future fields in
787 # Instance from being erased accidentally by clients that do not know
788 # about them.
789 &quot;instance&quot;: { # An isolated set of Cloud Spanner resources on which databases can be hosted. # Required. The instance to update, which must always include the instance
Dan O'Mearadd494642020-05-01 07:42:23 -0700790 # name. Otherwise, only fields mentioned in field_mask need be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700791 &quot;name&quot;: &quot;A String&quot;, # Required. A unique identifier for the instance, which cannot be changed
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400792 # after the instance is created. Values are of the form
Dan O'Mearadd494642020-05-01 07:42:23 -0700793 # `projects/&lt;project&gt;/instances/a-z*[a-z0-9]`. The final
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 # segment of the name must be between 2 and 64 characters in length.
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 &quot;displayName&quot;: &quot;A String&quot;, # Required. The descriptive name for this instance as it appears in UIs.
796 # Must be unique per project and between 4 and 30 characters in length.
797 &quot;endpointUris&quot;: [ # Deprecated. This field is not populated.
798 &quot;A String&quot;,
799 ],
800 &quot;nodeCount&quot;: 42, # The number of nodes allocated to this instance. This
801 # may be zero in API responses for instances that are not yet in state
802 # `READY`.
803 #
804 # See [the
805 # documentation](https://cloud.google.com/spanner/docs/instances#node_count)
806 # for more information about nodes.
807 &quot;labels&quot;: { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
808 # resources into groups that reflect a customer&#x27;s organizational needs and
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400809 # deployment strategies. Cloud Labels can be used to filter collections of
810 # resources. They can be used to control how resource metrics are aggregated.
811 # And they can be used as arguments to policy management rules (e.g. route,
812 # firewall, load balancing, etc.).
813 #
814 # * Label keys must be between 1 and 63 characters long and must conform to
815 # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
816 # * Label values must be between 0 and 63 characters long and must conform
817 # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
818 # * No more than 64 labels can be associated with a given resource.
819 #
820 # See https://goo.gl/xmQnxf for more information on and examples of labels.
821 #
822 # If you plan to use labels in your own code, please note that additional
823 # characters may be allowed in the future. And so you are advised to use an
Bu Sun Kim65020912020-05-20 12:08:20 -0700824 # internal label representation, such as JSON, which doesn&#x27;t rely upon
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400825 # specific characters being disallowed. For example, representing labels
Bu Sun Kim65020912020-05-20 12:08:20 -0700826 # as the string: name + &quot;_&quot; + value would prove problematic if we were to
827 # allow &quot;_&quot; in a future release.
828 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400829 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 &quot;config&quot;: &quot;A String&quot;, # Required. The name of the instance&#x27;s configuration. Values are of the form
831 # `projects/&lt;project&gt;/instanceConfigs/&lt;configuration&gt;`. See
832 # also InstanceConfig and
833 # ListInstanceConfigs.
834 &quot;state&quot;: &quot;A String&quot;, # Output only. The current instance state. For
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400835 # CreateInstance, the state must be
836 # either omitted or set to `CREATING`. For
837 # UpdateInstance, the state must be
838 # either omitted or set to `READY`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400839 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400840 }
841
842 x__xgafv: string, V1 error format.
843 Allowed values
844 1 - v1 error format
845 2 - v2 error format
846
847Returns:
848 An object of the form:
849
850 { # This resource represents a long-running operation that is the result of a
851 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700852 &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 -0700853 # If `true`, the operation is completed, and either `error` or `response` is
854 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -0700855 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 # method returns no data on success, such as `Delete`, the response is
857 # `google.protobuf.Empty`. If the original method is standard
858 # `Get`/`Create`/`Update`, the response should be the resource. For other
859 # methods, the response should have the type `XxxResponse`, where `Xxx`
860 # is the original method name. For example, if the original method name
861 # is `TakeSnapshot()`, the inferred response type is
862 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700863 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 &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 -0700866 # originally returns it. If you use the default HTTP mapping, the
867 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &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.
869 # different programming environments, including REST APIs and RPC APIs. It is
870 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
871 # three pieces of data: error code, error message, and error details.
872 #
873 # You can find out more about this error model and how to work with it in the
874 # [API Design Guide](https://cloud.google.com/apis/design/errors).
875 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
876 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
877 # user-facing error message should be localized and sent in the
878 # google.rpc.Status.details field, or localized by the client.
879 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
880 # message types for APIs to use.
881 {
882 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
883 },
884 ],
885 },
886 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
Dan O'Mearadd494642020-05-01 07:42:23 -0700887 # contains progress information and common metadata such as create time.
888 # Some services might not provide such metadata. Any method that returns a
889 # long-running operation should document the metadata type, if any.
Bu Sun Kim65020912020-05-20 12:08:20 -0700890 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700891 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400892 }</pre>
893</div>
894
895<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700896 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400897 <pre>Sets the access control policy on an instance resource. Replaces any
898existing policy.
899
900Authorization requires `spanner.instances.setIamPolicy` on
901resource.
902
903Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700904 resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;` for instance resources and `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;/databases/&lt;database ID&gt;` for databases resources. (required)
905 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400906 The object takes the form of:
907
908{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700909 &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
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400910 # the policy is limited to a few 10s of KB. An empty policy is a
911 # valid policy but certain Cloud Platform services (such as Projects)
912 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700913 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400914 #
915 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700916 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
917 # `members` to a single `role`. Members can be user accounts, service accounts,
918 # Google groups, and domains (such as G Suite). A `role` is a named list of
919 # permissions; each `role` can be an IAM predefined role or a user-created
920 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400921 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700922 # Optionally, a `binding` can specify a `condition`, which is a logical
923 # expression that allows access to a resource only if the expression evaluates
924 # to `true`. A condition can add constraints based on attributes of the
925 # request, the resource, or both.
926 #
927 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400928 #
929 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400931 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700932 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
933 # &quot;members&quot;: [
934 # &quot;user:mike@example.com&quot;,
935 # &quot;group:admins@example.com&quot;,
936 # &quot;domain:google.com&quot;,
937 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400938 # ]
939 # },
940 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
942 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
943 # &quot;condition&quot;: {
944 # &quot;title&quot;: &quot;expirable access&quot;,
945 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
946 # &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 -0700947 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400948 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700949 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700950 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
951 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400952 # }
953 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700954 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700955 #
956 # bindings:
957 # - members:
958 # - user:mike@example.com
959 # - group:admins@example.com
960 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700961 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
962 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700963 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 # - user:eve@example.com
965 # role: roles/resourcemanager.organizationViewer
966 # condition:
967 # title: expirable access
968 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700970 # - etag: BwWWja0YfJA=
971 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700972 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400973 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700974 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
976 # prevent simultaneous updates of a policy from overwriting each other.
977 # It is strongly suggested that systems make use of the `etag` in the
978 # read-modify-write cycle to perform policy updates in order to avoid race
979 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
980 # systems are expected to put that etag in the request to `setIamPolicy` to
981 # ensure that their change will be applied to the same version of the policy.
982 #
983 # **Important:** If you use IAM Conditions, you must include the `etag` field
984 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
985 # you to overwrite a version `3` policy with a version `1` policy, and all of
986 # the conditions in the version `3` policy are lost.
987 &quot;version&quot;: 42, # Specifies the format of the policy.
988 #
989 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
990 # are rejected.
991 #
992 # Any operation that affects conditional role bindings must specify version
993 # `3`. This requirement applies to the following operations:
994 #
995 # * Getting a policy that includes a conditional role binding
996 # * Adding a conditional role binding to a policy
997 # * Changing a conditional role binding in a policy
998 # * Removing any role binding, with or without a condition, from a policy
999 # that includes conditions
1000 #
1001 # **Important:** If you use IAM Conditions, you must include the `etag` field
1002 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1003 # you to overwrite a version `3` policy with a version `1` policy, and all of
1004 # the conditions in the version `3` policy are lost.
1005 #
1006 # If a policy does not include any conditions, operations on that policy may
1007 # specify any valid version or leave the field unset.
1008 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001009 # `condition` that determines how and when the `bindings` are applied. Each
1010 # of the `bindings` must contain at least one member.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001011 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001012 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1013 # NOTE: An unsatisfied condition will not allow user access via current
1014 # binding. Different bindings, including their conditions, are examined
1015 # independently.
1016 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1017 # are documented at https://github.com/google/cel-spec.
1018 #
1019 # Example (Comparison):
1020 #
1021 # title: &quot;Summary size limit&quot;
1022 # description: &quot;Determines if a summary is less than 100 chars&quot;
1023 # expression: &quot;document.summary.size() &lt; 100&quot;
1024 #
1025 # Example (Equality):
1026 #
1027 # title: &quot;Requestor is owner&quot;
1028 # description: &quot;Determines if requestor is the document owner&quot;
1029 # expression: &quot;document.owner == request.auth.claims.email&quot;
1030 #
1031 # Example (Logic):
1032 #
1033 # title: &quot;Public documents&quot;
1034 # description: &quot;Determine whether the document should be publicly visible&quot;
1035 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1036 #
1037 # Example (Data Manipulation):
1038 #
1039 # title: &quot;Notification string&quot;
1040 # description: &quot;Create a notification string with a timestamp.&quot;
1041 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1042 #
1043 # The exact variables and functions that may be referenced within an expression
1044 # are determined by the service that evaluates it. See the service
1045 # documentation for additional information.
1046 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1047 # reporting, e.g. a file name and a position in the file.
1048 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1049 # its purpose. This can be used e.g. in UIs which allow to enter the
1050 # expression.
1051 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1052 # describes the expression, e.g. when hovered over it in a UI.
1053 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1054 # syntax.
1055 },
1056 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001057 # `members` can have the following values:
1058 #
1059 # * `allUsers`: A special identifier that represents anyone who is
1060 # on the internet; with or without a Google account.
1061 #
1062 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1063 # who is authenticated with a Google account or a service account.
1064 #
1065 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001066 # account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001067 #
1068 #
1069 # * `serviceAccount:{emailid}`: An email address that represents a service
1070 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1071 #
1072 # * `group:{emailid}`: An email address that represents a Google group.
1073 # For example, `admins@example.com`.
1074 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1076 # identifier) representing a user that has been recently deleted. For
1077 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1078 # recovered, this value reverts to `user:{emailid}` and the recovered user
1079 # retains the role in the binding.
1080 #
1081 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1082 # unique identifier) representing a service account that has been recently
1083 # deleted. For example,
1084 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1085 # If the service account is undeleted, this value reverts to
1086 # `serviceAccount:{emailid}` and the undeleted service account retains the
1087 # role in the binding.
1088 #
1089 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1090 # identifier) representing a Google group that has been recently
1091 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1092 # the group is recovered, this value reverts to `group:{emailid}` and the
1093 # recovered group retains the role in the binding.
1094 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 #
1096 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001097 # users of that domain. For example, `google.com` or `example.com`.
1098 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001100 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1102 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001103 },
1104 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001105 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001106 }
1107
1108 x__xgafv: string, V1 error format.
1109 Allowed values
1110 1 - v1 error format
1111 2 - v2 error format
1112
1113Returns:
1114 An object of the form:
1115
Dan O'Mearadd494642020-05-01 07:42:23 -07001116 { # An Identity and Access Management (IAM) policy, which specifies access
1117 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001118 #
1119 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001120 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1121 # `members` to a single `role`. Members can be user accounts, service accounts,
1122 # Google groups, and domains (such as G Suite). A `role` is a named list of
1123 # permissions; each `role` can be an IAM predefined role or a user-created
1124 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001125 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001126 # Optionally, a `binding` can specify a `condition`, which is a logical
1127 # expression that allows access to a resource only if the expression evaluates
1128 # to `true`. A condition can add constraints based on attributes of the
1129 # request, the resource, or both.
1130 #
1131 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001132 #
1133 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001135 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001136 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1137 # &quot;members&quot;: [
1138 # &quot;user:mike@example.com&quot;,
1139 # &quot;group:admins@example.com&quot;,
1140 # &quot;domain:google.com&quot;,
1141 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001142 # ]
1143 # },
1144 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1146 # &quot;members&quot;: [&quot;user:eve@example.com&quot;],
1147 # &quot;condition&quot;: {
1148 # &quot;title&quot;: &quot;expirable access&quot;,
1149 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1150 # &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 -07001151 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001152 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001153 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001154 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1155 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001156 # }
1157 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001158 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001159 #
1160 # bindings:
1161 # - members:
1162 # - user:mike@example.com
1163 # - group:admins@example.com
1164 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001165 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1166 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001167 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001168 # - user:eve@example.com
1169 # role: roles/resourcemanager.organizationViewer
1170 # condition:
1171 # title: expirable access
1172 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001173 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001174 # - etag: BwWWja0YfJA=
1175 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001176 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001177 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001178 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001179 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1180 # prevent simultaneous updates of a policy from overwriting each other.
1181 # It is strongly suggested that systems make use of the `etag` in the
1182 # read-modify-write cycle to perform policy updates in order to avoid race
1183 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1184 # systems are expected to put that etag in the request to `setIamPolicy` to
1185 # ensure that their change will be applied to the same version of the policy.
1186 #
1187 # **Important:** If you use IAM Conditions, you must include the `etag` field
1188 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1189 # you to overwrite a version `3` policy with a version `1` policy, and all of
1190 # the conditions in the version `3` policy are lost.
1191 &quot;version&quot;: 42, # Specifies the format of the policy.
1192 #
1193 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1194 # are rejected.
1195 #
1196 # Any operation that affects conditional role bindings must specify version
1197 # `3`. This requirement applies to the following operations:
1198 #
1199 # * Getting a policy that includes a conditional role binding
1200 # * Adding a conditional role binding to a policy
1201 # * Changing a conditional role binding in a policy
1202 # * Removing any role binding, with or without a condition, from a policy
1203 # that includes conditions
1204 #
1205 # **Important:** If you use IAM Conditions, you must include the `etag` field
1206 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1207 # you to overwrite a version `3` policy with a version `1` policy, and all of
1208 # the conditions in the version `3` policy are lost.
1209 #
1210 # If a policy does not include any conditions, operations on that policy may
1211 # specify any valid version or leave the field unset.
1212 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001213 # `condition` that determines how and when the `bindings` are applied. Each
1214 # of the `bindings` must contain at least one member.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001215 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001216 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1217 # NOTE: An unsatisfied condition will not allow user access via current
1218 # binding. Different bindings, including their conditions, are examined
1219 # independently.
1220 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1221 # are documented at https://github.com/google/cel-spec.
1222 #
1223 # Example (Comparison):
1224 #
1225 # title: &quot;Summary size limit&quot;
1226 # description: &quot;Determines if a summary is less than 100 chars&quot;
1227 # expression: &quot;document.summary.size() &lt; 100&quot;
1228 #
1229 # Example (Equality):
1230 #
1231 # title: &quot;Requestor is owner&quot;
1232 # description: &quot;Determines if requestor is the document owner&quot;
1233 # expression: &quot;document.owner == request.auth.claims.email&quot;
1234 #
1235 # Example (Logic):
1236 #
1237 # title: &quot;Public documents&quot;
1238 # description: &quot;Determine whether the document should be publicly visible&quot;
1239 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1240 #
1241 # Example (Data Manipulation):
1242 #
1243 # title: &quot;Notification string&quot;
1244 # description: &quot;Create a notification string with a timestamp.&quot;
1245 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1246 #
1247 # The exact variables and functions that may be referenced within an expression
1248 # are determined by the service that evaluates it. See the service
1249 # documentation for additional information.
1250 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1251 # reporting, e.g. a file name and a position in the file.
1252 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1253 # its purpose. This can be used e.g. in UIs which allow to enter the
1254 # expression.
1255 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1256 # describes the expression, e.g. when hovered over it in a UI.
1257 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1258 # syntax.
1259 },
1260 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001261 # `members` can have the following values:
1262 #
1263 # * `allUsers`: A special identifier that represents anyone who is
1264 # on the internet; with or without a Google account.
1265 #
1266 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1267 # who is authenticated with a Google account or a service account.
1268 #
1269 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001270 # account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001271 #
1272 #
1273 # * `serviceAccount:{emailid}`: An email address that represents a service
1274 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1275 #
1276 # * `group:{emailid}`: An email address that represents a Google group.
1277 # For example, `admins@example.com`.
1278 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001279 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1280 # identifier) representing a user that has been recently deleted. For
1281 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1282 # recovered, this value reverts to `user:{emailid}` and the recovered user
1283 # retains the role in the binding.
1284 #
1285 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1286 # unique identifier) representing a service account that has been recently
1287 # deleted. For example,
1288 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1289 # If the service account is undeleted, this value reverts to
1290 # `serviceAccount:{emailid}` and the undeleted service account retains the
1291 # role in the binding.
1292 #
1293 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1294 # identifier) representing a Google group that has been recently
1295 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1296 # the group is recovered, this value reverts to `group:{emailid}` and the
1297 # recovered group retains the role in the binding.
1298 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001299 #
1300 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001301 # users of that domain. For example, `google.com` or `example.com`.
1302 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001303 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001304 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001305 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1306 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001307 },
1308 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001309 }</pre>
1310</div>
1311
1312<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001313 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001314 <pre>Returns permissions that the caller has on the specified instance resource.
1315
1316Attempting this RPC on a non-existent Cloud Spanner instance resource will
1317result in a NOT_FOUND error if the user has `spanner.instances.list`
1318permission on the containing Google Cloud Project. Otherwise returns an
1319empty set of permissions.
1320
1321Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001322 resource: string, REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;` for instance resources and `projects/&lt;project ID&gt;/instances/&lt;instance ID&gt;/databases/&lt;database ID&gt;` for database resources. (required)
1323 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001324 The object takes the form of:
1325
1326{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001327 &quot;permissions&quot;: [ # REQUIRED: The set of permissions to check for &#x27;resource&#x27;.
1328 # Permissions with wildcards (such as &#x27;*&#x27;, &#x27;spanner.*&#x27;, &#x27;spanner.instances.*&#x27;) are not allowed.
1329 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001330 ],
1331 }
1332
1333 x__xgafv: string, V1 error format.
1334 Allowed values
1335 1 - v1 error format
1336 2 - v2 error format
1337
1338Returns:
1339 An object of the form:
1340
1341 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001342 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001343 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001344 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001345 ],
1346 }</pre>
1347</div>
1348
1349</body></html>