• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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">
78  <code><a href="spanner_v1.projects.instances.databases.html">databases()</a></code>
79</p>
80<p class="firstline">Returns the databases Resource.</p>
81
82<p class="toc_element">
83  <code><a href="spanner_v1.projects.instances.operations.html">operations()</a></code>
84</p>
85<p class="firstline">Returns the operations Resource.</p>
86
87<p class="toc_element">
88  <code><a href="#create">create(parent, body, x__xgafv=None)</a></code></p>
89<p class="firstline">Creates an instance and begins preparing it to begin serving. The</p>
90<p class="toc_element">
91  <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
92<p class="firstline">Deletes an instance.</p>
93<p class="toc_element">
94  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
95<p class="firstline">Gets information about a particular instance.</p>
96<p class="toc_element">
97  <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
98<p class="firstline">Gets the access control policy for an instance resource. Returns an empty</p>
99<p class="toc_element">
100  <code><a href="#list">list(parent, pageToken=None, x__xgafv=None, pageSize=None, filter=None)</a></code></p>
101<p class="firstline">Lists all instances in the given project.</p>
102<p class="toc_element">
103  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
104<p class="firstline">Retrieves the next page of results.</p>
105<p class="toc_element">
106  <code><a href="#patch">patch(name, body, x__xgafv=None)</a></code></p>
107<p class="firstline">Updates an instance, and begins allocating or releasing resources</p>
108<p class="toc_element">
109  <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
110<p class="firstline">Sets the access control policy on an instance resource. Replaces any</p>
111<p class="toc_element">
112  <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
113<p class="firstline">Returns permissions that the caller has on the specified instance resource.</p>
114<h3>Method Details</h3>
115<div class="method">
116    <code class="details" id="create">create(parent, body, x__xgafv=None)</code>
117  <pre>Creates an instance and begins preparing it to begin serving. The
118returned long-running operation
119can be used to track the progress of preparing the new
120instance. The instance name is assigned by the caller. If the
121named instance already exists, `CreateInstance` returns
122`ALREADY_EXISTS`.
123
124Immediately upon completion of this request:
125
126  * The instance is readable via the API, with all requested attributes
127    but no allocated resources. Its state is `CREATING`.
128
129Until completion of the returned operation:
130
131  * Cancelling the operation renders the instance immediately unreadable
132    via the API.
133  * The instance can be deleted.
134  * All other attempts to modify the instance are rejected.
135
136Upon completion of the returned operation:
137
138  * Billing for all successfully-allocated resources begins (some types
139    may have lower than the requested levels).
140  * Databases can be created in the instance.
141  * The instance's allocated resource levels are readable via the API.
142  * The instance's state becomes `READY`.
143
144The returned long-running operation will
145have a name of the format `<instance_name>/operations/<operation_id>` and
146can be used to track creation of the instance.  The
147metadata field type is
148CreateInstanceMetadata.
149The response field type is
150Instance, if successful.
151
152Args:
153  parent: string, Required. The name of the project in which to create the instance. Values
154are of the form `projects/<project>`. (required)
155  body: object, The request body. (required)
156    The object takes the form of:
157
158{ # The request for CreateInstance.
159    "instanceId": "A String", # Required. The ID of the instance to create.  Valid identifiers are of the
160        # form `a-z*[a-z0-9]` and must be between 2 and 64 characters in
161        # length.
162    "instance": { # 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
163        # specified must be `<parent>/instances/<instance_id>`.
164      "displayName": "A String", # Required. The descriptive name for this instance as it appears in UIs.
165          # Must be unique per project and between 4 and 30 characters in length.
166      "name": "A String", # Required. A unique identifier for the instance, which cannot be changed
167          # after the instance is created. Values are of the form
168          # `projects/<project>/instances/a-z*[a-z0-9]`. The final
169          # segment of the name must be between 2 and 64 characters in length.
170      "labels": { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
171          # resources into groups that reflect a customer's organizational needs and
172          # deployment strategies. Cloud Labels can be used to filter collections of
173          # resources. They can be used to control how resource metrics are aggregated.
174          # And they can be used as arguments to policy management rules (e.g. route,
175          # firewall, load balancing, etc.).
176          #
177          #  * Label keys must be between 1 and 63 characters long and must conform to
178          #    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
179          #  * Label values must be between 0 and 63 characters long and must conform
180          #    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
181          #  * No more than 64 labels can be associated with a given resource.
182          #
183          # See https://goo.gl/xmQnxf for more information on and examples of labels.
184          #
185          # If you plan to use labels in your own code, please note that additional
186          # characters may be allowed in the future. And so you are advised to use an
187          # internal label representation, such as JSON, which doesn't rely upon
188          # specific characters being disallowed.  For example, representing labels
189          # as the string:  name + "_" + value  would prove problematic if we were to
190          # allow "_" in a future release.
191        "a_key": "A String",
192      },
193      "state": "A String", # Output only. The current instance state. For
194          # CreateInstance, the state must be
195          # either omitted or set to `CREATING`. For
196          # UpdateInstance, the state must be
197          # either omitted or set to `READY`.
198      "nodeCount": 42, # Required. The number of nodes allocated to this instance. This may be zero
199          # in API responses for instances that are not yet in state `READY`.
200          #
201          # See [the
202          # documentation](https://cloud.google.com/spanner/docs/instances#node_count)
203          # for more information about nodes.
204      "config": "A String", # Required. The name of the instance's configuration. Values are of the form
205          # `projects/<project>/instanceConfigs/<configuration>`. See
206          # also InstanceConfig and
207          # ListInstanceConfigs.
208    },
209  }
210
211  x__xgafv: string, V1 error format.
212    Allowed values
213      1 - v1 error format
214      2 - v2 error format
215
216Returns:
217  An object of the form:
218
219    { # This resource represents a long-running operation that is the result of a
220      # network API call.
221    "metadata": { # Service-specific metadata associated with the operation.  It typically
222        # contains progress information and common metadata such as create time.
223        # Some services might not provide such metadata.  Any method that returns a
224        # long-running operation should document the metadata type, if any.
225      "a_key": "", # Properties of the object. Contains field @type with type URL.
226    },
227    "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
228        # different programming environments, including REST APIs and RPC APIs. It is
229        # used by [gRPC](https://github.com/grpc). The error model is designed to be:
230        #
231        # - Simple to use and understand for most users
232        # - Flexible enough to meet unexpected needs
233        #
234        # # Overview
235        #
236        # The `Status` message contains three pieces of data: error code, error
237        # message, and error details. The error code should be an enum value of
238        # google.rpc.Code, but it may accept additional error codes if needed.  The
239        # error message should be a developer-facing English message that helps
240        # developers *understand* and *resolve* the error. If a localized user-facing
241        # error message is needed, put the localized message in the error details or
242        # localize it in the client. The optional error details may contain arbitrary
243        # information about the error. There is a predefined set of error detail types
244        # in the package `google.rpc` that can be used for common error conditions.
245        #
246        # # Language mapping
247        #
248        # The `Status` message is the logical representation of the error model, but it
249        # is not necessarily the actual wire format. When the `Status` message is
250        # exposed in different client libraries and different wire protocols, it can be
251        # mapped differently. For example, it will likely be mapped to some exceptions
252        # in Java, but more likely mapped to some error codes in C.
253        #
254        # # Other uses
255        #
256        # The error model and the `Status` message can be used in a variety of
257        # environments, either with or without APIs, to provide a
258        # consistent developer experience across different environments.
259        #
260        # Example uses of this error model include:
261        #
262        # - Partial errors. If a service needs to return partial errors to the client,
263        #     it may embed the `Status` in the normal response to indicate the partial
264        #     errors.
265        #
266        # - Workflow errors. A typical workflow has multiple steps. Each step may
267        #     have a `Status` message for error reporting.
268        #
269        # - Batch operations. If a client uses batch request and batch response, the
270        #     `Status` message should be used directly inside batch response, one for
271        #     each error sub-response.
272        #
273        # - Asynchronous operations. If an API call embeds asynchronous operation
274        #     results in its response, the status of those operations should be
275        #     represented directly using the `Status` message.
276        #
277        # - Logging. If some API errors are stored in logs, the message `Status` could
278        #     be used directly after any stripping needed for security/privacy reasons.
279      "message": "A String", # A developer-facing error message, which should be in English. Any
280          # user-facing error message should be localized and sent in the
281          # google.rpc.Status.details field, or localized by the client.
282      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
283      "details": [ # A list of messages that carry the error details.  There is a common set of
284          # message types for APIs to use.
285        {
286          "a_key": "", # Properties of the object. Contains field @type with type URL.
287        },
288      ],
289    },
290    "done": True or False, # If the value is `false`, it means the operation is still in progress.
291        # If `true`, the operation is completed, and either `error` or `response` is
292        # available.
293    "response": { # The normal response of the operation in case of success.  If the original
294        # method returns no data on success, such as `Delete`, the response is
295        # `google.protobuf.Empty`.  If the original method is standard
296        # `Get`/`Create`/`Update`, the response should be the resource.  For other
297        # methods, the response should have the type `XxxResponse`, where `Xxx`
298        # is the original method name.  For example, if the original method name
299        # is `TakeSnapshot()`, the inferred response type is
300        # `TakeSnapshotResponse`.
301      "a_key": "", # Properties of the object. Contains field @type with type URL.
302    },
303    "name": "A String", # The server-assigned name, which is only unique within the same service that
304        # originally returns it. If you use the default HTTP mapping, the
305        # `name` should be a resource name ending with `operations/{unique_id}`.
306  }</pre>
307</div>
308
309<div class="method">
310    <code class="details" id="delete">delete(name, x__xgafv=None)</code>
311  <pre>Deletes an instance.
312
313Immediately upon completion of the request:
314
315  * Billing ceases for all of the instance's reserved resources.
316
317Soon afterward:
318
319  * The instance and *all of its databases* immediately and
320    irrevocably disappear from the API. All data in the databases
321    is permanently deleted.
322
323Args:
324  name: string, Required. The name of the instance to be deleted. Values are of the form
325`projects/<project>/instances/<instance>` (required)
326  x__xgafv: string, V1 error format.
327    Allowed values
328      1 - v1 error format
329      2 - v2 error format
330
331Returns:
332  An object of the form:
333
334    { # A generic empty message that you can re-use to avoid defining duplicated
335      # empty messages in your APIs. A typical example is to use it as the request
336      # or the response type of an API method. For instance:
337      #
338      #     service Foo {
339      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
340      #     }
341      #
342      # The JSON representation for `Empty` is empty JSON object `{}`.
343  }</pre>
344</div>
345
346<div class="method">
347    <code class="details" id="get">get(name, x__xgafv=None)</code>
348  <pre>Gets information about a particular instance.
349
350Args:
351  name: string, Required. The name of the requested instance. Values are of the form
352`projects/<project>/instances/<instance>`. (required)
353  x__xgafv: string, V1 error format.
354    Allowed values
355      1 - v1 error format
356      2 - v2 error format
357
358Returns:
359  An object of the form:
360
361    { # An isolated set of Cloud Spanner resources on which databases can be hosted.
362    "displayName": "A String", # Required. The descriptive name for this instance as it appears in UIs.
363        # Must be unique per project and between 4 and 30 characters in length.
364    "name": "A String", # Required. A unique identifier for the instance, which cannot be changed
365        # after the instance is created. Values are of the form
366        # `projects/<project>/instances/a-z*[a-z0-9]`. The final
367        # segment of the name must be between 2 and 64 characters in length.
368    "labels": { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
369        # resources into groups that reflect a customer's organizational needs and
370        # deployment strategies. Cloud Labels can be used to filter collections of
371        # resources. They can be used to control how resource metrics are aggregated.
372        # And they can be used as arguments to policy management rules (e.g. route,
373        # firewall, load balancing, etc.).
374        #
375        #  * Label keys must be between 1 and 63 characters long and must conform to
376        #    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
377        #  * Label values must be between 0 and 63 characters long and must conform
378        #    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
379        #  * No more than 64 labels can be associated with a given resource.
380        #
381        # See https://goo.gl/xmQnxf for more information on and examples of labels.
382        #
383        # If you plan to use labels in your own code, please note that additional
384        # characters may be allowed in the future. And so you are advised to use an
385        # internal label representation, such as JSON, which doesn't rely upon
386        # specific characters being disallowed.  For example, representing labels
387        # as the string:  name + "_" + value  would prove problematic if we were to
388        # allow "_" in a future release.
389      "a_key": "A String",
390    },
391    "state": "A String", # Output only. The current instance state. For
392        # CreateInstance, the state must be
393        # either omitted or set to `CREATING`. For
394        # UpdateInstance, the state must be
395        # either omitted or set to `READY`.
396    "nodeCount": 42, # Required. The number of nodes allocated to this instance. This may be zero
397        # in API responses for instances that are not yet in state `READY`.
398        #
399        # See [the
400        # documentation](https://cloud.google.com/spanner/docs/instances#node_count)
401        # for more information about nodes.
402    "config": "A String", # Required. The name of the instance's configuration. Values are of the form
403        # `projects/<project>/instanceConfigs/<configuration>`. See
404        # also InstanceConfig and
405        # ListInstanceConfigs.
406  }</pre>
407</div>
408
409<div class="method">
410    <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
411  <pre>Gets the access control policy for an instance resource. Returns an empty
412policy if an instance exists but does not have a policy set.
413
414Authorization requires `spanner.instances.getIamPolicy` on
415resource.
416
417Args:
418  resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for database resources. (required)
419  body: object, The request body.
420    The object takes the form of:
421
422{ # Request message for `GetIamPolicy` method.
423  }
424
425  x__xgafv: string, V1 error format.
426    Allowed values
427      1 - v1 error format
428      2 - v2 error format
429
430Returns:
431  An object of the form:
432
433    { # Defines an Identity and Access Management (IAM) policy. It is used to
434      # specify access control policies for Cloud Platform resources.
435      #
436      #
437      # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
438      # `members` to a `role`, where the members can be user accounts, Google groups,
439      # Google domains, and service accounts. A `role` is a named list of permissions
440      # defined by IAM.
441      #
442      # **JSON Example**
443      #
444      #     {
445      #       "bindings": [
446      #         {
447      #           "role": "roles/owner",
448      #           "members": [
449      #             "user:mike@example.com",
450      #             "group:admins@example.com",
451      #             "domain:google.com",
452      #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
453      #           ]
454      #         },
455      #         {
456      #           "role": "roles/viewer",
457      #           "members": ["user:sean@example.com"]
458      #         }
459      #       ]
460      #     }
461      #
462      # **YAML Example**
463      #
464      #     bindings:
465      #     - members:
466      #       - user:mike@example.com
467      #       - group:admins@example.com
468      #       - domain:google.com
469      #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
470      #       role: roles/owner
471      #     - members:
472      #       - user:sean@example.com
473      #       role: roles/viewer
474      #
475      #
476      # For a description of IAM and its features, see the
477      # [IAM developer's guide](https://cloud.google.com/iam/docs).
478    "bindings": [ # Associates a list of `members` to a `role`.
479        # `bindings` with no members will result in an error.
480      { # Associates `members` with a `role`.
481        "role": "A String", # Role that is assigned to `members`.
482            # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
483        "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
484            # `members` can have the following values:
485            #
486            # * `allUsers`: A special identifier that represents anyone who is
487            #    on the internet; with or without a Google account.
488            #
489            # * `allAuthenticatedUsers`: A special identifier that represents anyone
490            #    who is authenticated with a Google account or a service account.
491            #
492            # * `user:{emailid}`: An email address that represents a specific Google
493            #    account. For example, `alice@gmail.com` .
494            #
495            #
496            # * `serviceAccount:{emailid}`: An email address that represents a service
497            #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
498            #
499            # * `group:{emailid}`: An email address that represents a Google group.
500            #    For example, `admins@example.com`.
501            #
502            #
503            # * `domain:{domain}`: The G Suite domain (primary) that represents all the
504            #    users of that domain. For example, `google.com` or `example.com`.
505            #
506          "A String",
507        ],
508        "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
509            # NOTE: An unsatisfied condition will not allow user access via current
510            # binding. Different bindings, including their conditions, are examined
511            # independently.
512            #
513            #     title: "User account presence"
514            #     description: "Determines whether the request has a user account"
515            #     expression: "size(request.user) > 0"
516          "location": "A String", # An optional string indicating the location of the expression for error
517              # reporting, e.g. a file name and a position in the file.
518          "expression": "A String", # Textual representation of an expression in
519              # Common Expression Language syntax.
520              #
521              # The application context of the containing message determines which
522              # well-known feature set of CEL is supported.
523          "description": "A String", # An optional description of the expression. This is a longer text which
524              # describes the expression, e.g. when hovered over it in a UI.
525          "title": "A String", # An optional title for the expression, i.e. a short string describing
526              # its purpose. This can be used e.g. in UIs which allow to enter the
527              # expression.
528        },
529      },
530    ],
531    "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
532        # prevent simultaneous updates of a policy from overwriting each other.
533        # It is strongly suggested that systems make use of the `etag` in the
534        # read-modify-write cycle to perform policy updates in order to avoid race
535        # conditions: An `etag` is returned in the response to `getIamPolicy`, and
536        # systems are expected to put that etag in the request to `setIamPolicy` to
537        # ensure that their change will be applied to the same version of the policy.
538        #
539        # If no `etag` is provided in the call to `setIamPolicy`, then the existing
540        # policy is overwritten blindly.
541    "version": 42, # Deprecated.
542  }</pre>
543</div>
544
545<div class="method">
546    <code class="details" id="list">list(parent, pageToken=None, x__xgafv=None, pageSize=None, filter=None)</code>
547  <pre>Lists all instances in the given project.
548
549Args:
550  parent: string, Required. The name of the project for which a list of instances is
551requested. Values are of the form `projects/<project>`. (required)
552  pageToken: string, If non-empty, `page_token` should contain a
553next_page_token from a
554previous ListInstancesResponse.
555  x__xgafv: string, V1 error format.
556    Allowed values
557      1 - v1 error format
558      2 - v2 error format
559  pageSize: integer, Number of instances to be returned in the response. If 0 or less, defaults
560to the server's maximum allowed page size.
561  filter: string, An expression for filtering the results of the request. Filter rules are
562case insensitive. The fields eligible for filtering are:
563
564  * `name`
565  * `display_name`
566  * `labels.key` where key is the name of a label
567
568Some examples of using filters are:
569
570  * `name:*` --> The instance has a name.
571  * `name:Howl` --> The instance's name contains the string "howl".
572  * `name:HOWL` --> Equivalent to above.
573  * `NAME:howl` --> Equivalent to above.
574  * `labels.env:*` --> The instance has the label "env".
575  * `labels.env:dev` --> The instance has the label "env" and the value of
576                       the label contains the string "dev".
577  * `name:howl labels.env:dev` --> The instance's name contains "howl" and
578                                 it has the label "env" with its value
579                                 containing "dev".
580
581Returns:
582  An object of the form:
583
584    { # The response for ListInstances.
585    "nextPageToken": "A String", # `next_page_token` can be sent in a subsequent
586        # ListInstances call to fetch more
587        # of the matching instances.
588    "instances": [ # The list of requested instances.
589      { # An isolated set of Cloud Spanner resources on which databases can be hosted.
590        "displayName": "A String", # Required. The descriptive name for this instance as it appears in UIs.
591            # Must be unique per project and between 4 and 30 characters in length.
592        "name": "A String", # Required. A unique identifier for the instance, which cannot be changed
593            # after the instance is created. Values are of the form
594            # `projects/<project>/instances/a-z*[a-z0-9]`. The final
595            # segment of the name must be between 2 and 64 characters in length.
596        "labels": { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
597            # resources into groups that reflect a customer's organizational needs and
598            # deployment strategies. Cloud Labels can be used to filter collections of
599            # resources. They can be used to control how resource metrics are aggregated.
600            # And they can be used as arguments to policy management rules (e.g. route,
601            # firewall, load balancing, etc.).
602            #
603            #  * Label keys must be between 1 and 63 characters long and must conform to
604            #    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
605            #  * Label values must be between 0 and 63 characters long and must conform
606            #    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
607            #  * No more than 64 labels can be associated with a given resource.
608            #
609            # See https://goo.gl/xmQnxf for more information on and examples of labels.
610            #
611            # If you plan to use labels in your own code, please note that additional
612            # characters may be allowed in the future. And so you are advised to use an
613            # internal label representation, such as JSON, which doesn't rely upon
614            # specific characters being disallowed.  For example, representing labels
615            # as the string:  name + "_" + value  would prove problematic if we were to
616            # allow "_" in a future release.
617          "a_key": "A String",
618        },
619        "state": "A String", # Output only. The current instance state. For
620            # CreateInstance, the state must be
621            # either omitted or set to `CREATING`. For
622            # UpdateInstance, the state must be
623            # either omitted or set to `READY`.
624        "nodeCount": 42, # Required. The number of nodes allocated to this instance. This may be zero
625            # in API responses for instances that are not yet in state `READY`.
626            #
627            # See [the
628            # documentation](https://cloud.google.com/spanner/docs/instances#node_count)
629            # for more information about nodes.
630        "config": "A String", # Required. The name of the instance's configuration. Values are of the form
631            # `projects/<project>/instanceConfigs/<configuration>`. See
632            # also InstanceConfig and
633            # ListInstanceConfigs.
634      },
635    ],
636  }</pre>
637</div>
638
639<div class="method">
640    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
641  <pre>Retrieves the next page of results.
642
643Args:
644  previous_request: The request for the previous page. (required)
645  previous_response: The response from the request for the previous page. (required)
646
647Returns:
648  A request object that you can call 'execute()' on to request the next
649  page. Returns None if there are no more items in the collection.
650    </pre>
651</div>
652
653<div class="method">
654    <code class="details" id="patch">patch(name, body, x__xgafv=None)</code>
655  <pre>Updates an instance, and begins allocating or releasing resources
656as requested. The returned long-running
657operation can be used to track the
658progress of updating the instance. If the named instance does not
659exist, returns `NOT_FOUND`.
660
661Immediately upon completion of this request:
662
663  * For resource types for which a decrease in the instance's allocation
664    has been requested, billing is based on the newly-requested level.
665
666Until completion of the returned operation:
667
668  * Cancelling the operation sets its metadata's
669    cancel_time, and begins
670    restoring resources to their pre-request values. The operation
671    is guaranteed to succeed at undoing all resource changes,
672    after which point it terminates with a `CANCELLED` status.
673  * All other attempts to modify the instance are rejected.
674  * Reading the instance via the API continues to give the pre-request
675    resource levels.
676
677Upon completion of the returned operation:
678
679  * Billing begins for all successfully-allocated resources (some types
680    may have lower than the requested levels).
681  * All newly-reserved resources are available for serving the instance's
682    tables.
683  * The instance's new resource levels are readable via the API.
684
685The returned long-running operation will
686have a name of the format `<instance_name>/operations/<operation_id>` and
687can be used to track the instance modification.  The
688metadata field type is
689UpdateInstanceMetadata.
690The response field type is
691Instance, if successful.
692
693Authorization requires `spanner.instances.update` permission on
694resource name.
695
696Args:
697  name: string, Required. A unique identifier for the instance, which cannot be changed
698after the instance is created. Values are of the form
699`projects/<project>/instances/a-z*[a-z0-9]`. The final
700segment of the name must be between 2 and 64 characters in length. (required)
701  body: object, The request body. (required)
702    The object takes the form of:
703
704{ # The request for UpdateInstance.
705    "instance": { # An isolated set of Cloud Spanner resources on which databases can be hosted. # Required. The instance to update, which must always include the instance
706        # name.  Otherwise, only fields mentioned in [][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included.
707      "displayName": "A String", # Required. The descriptive name for this instance as it appears in UIs.
708          # Must be unique per project and between 4 and 30 characters in length.
709      "name": "A String", # Required. A unique identifier for the instance, which cannot be changed
710          # after the instance is created. Values are of the form
711          # `projects/<project>/instances/a-z*[a-z0-9]`. The final
712          # segment of the name must be between 2 and 64 characters in length.
713      "labels": { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud
714          # resources into groups that reflect a customer's organizational needs and
715          # deployment strategies. Cloud Labels can be used to filter collections of
716          # resources. They can be used to control how resource metrics are aggregated.
717          # And they can be used as arguments to policy management rules (e.g. route,
718          # firewall, load balancing, etc.).
719          #
720          #  * Label keys must be between 1 and 63 characters long and must conform to
721          #    the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
722          #  * Label values must be between 0 and 63 characters long and must conform
723          #    to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
724          #  * No more than 64 labels can be associated with a given resource.
725          #
726          # See https://goo.gl/xmQnxf for more information on and examples of labels.
727          #
728          # If you plan to use labels in your own code, please note that additional
729          # characters may be allowed in the future. And so you are advised to use an
730          # internal label representation, such as JSON, which doesn't rely upon
731          # specific characters being disallowed.  For example, representing labels
732          # as the string:  name + "_" + value  would prove problematic if we were to
733          # allow "_" in a future release.
734        "a_key": "A String",
735      },
736      "state": "A String", # Output only. The current instance state. For
737          # CreateInstance, the state must be
738          # either omitted or set to `CREATING`. For
739          # UpdateInstance, the state must be
740          # either omitted or set to `READY`.
741      "nodeCount": 42, # Required. The number of nodes allocated to this instance. This may be zero
742          # in API responses for instances that are not yet in state `READY`.
743          #
744          # See [the
745          # documentation](https://cloud.google.com/spanner/docs/instances#node_count)
746          # for more information about nodes.
747      "config": "A String", # Required. The name of the instance's configuration. Values are of the form
748          # `projects/<project>/instanceConfigs/<configuration>`. See
749          # also InstanceConfig and
750          # ListInstanceConfigs.
751    },
752    "fieldMask": "A String", # Required. A mask specifying which fields in [][google.spanner.admin.instance.v1.UpdateInstanceRequest.instance] should be updated.
753        # The field mask must always be specified; this prevents any future fields in
754        # [][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know
755        # about them.
756  }
757
758  x__xgafv: string, V1 error format.
759    Allowed values
760      1 - v1 error format
761      2 - v2 error format
762
763Returns:
764  An object of the form:
765
766    { # This resource represents a long-running operation that is the result of a
767      # network API call.
768    "metadata": { # Service-specific metadata associated with the operation.  It typically
769        # contains progress information and common metadata such as create time.
770        # Some services might not provide such metadata.  Any method that returns a
771        # long-running operation should document the metadata type, if any.
772      "a_key": "", # Properties of the object. Contains field @type with type URL.
773    },
774    "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
775        # different programming environments, including REST APIs and RPC APIs. It is
776        # used by [gRPC](https://github.com/grpc). The error model is designed to be:
777        #
778        # - Simple to use and understand for most users
779        # - Flexible enough to meet unexpected needs
780        #
781        # # Overview
782        #
783        # The `Status` message contains three pieces of data: error code, error
784        # message, and error details. The error code should be an enum value of
785        # google.rpc.Code, but it may accept additional error codes if needed.  The
786        # error message should be a developer-facing English message that helps
787        # developers *understand* and *resolve* the error. If a localized user-facing
788        # error message is needed, put the localized message in the error details or
789        # localize it in the client. The optional error details may contain arbitrary
790        # information about the error. There is a predefined set of error detail types
791        # in the package `google.rpc` that can be used for common error conditions.
792        #
793        # # Language mapping
794        #
795        # The `Status` message is the logical representation of the error model, but it
796        # is not necessarily the actual wire format. When the `Status` message is
797        # exposed in different client libraries and different wire protocols, it can be
798        # mapped differently. For example, it will likely be mapped to some exceptions
799        # in Java, but more likely mapped to some error codes in C.
800        #
801        # # Other uses
802        #
803        # The error model and the `Status` message can be used in a variety of
804        # environments, either with or without APIs, to provide a
805        # consistent developer experience across different environments.
806        #
807        # Example uses of this error model include:
808        #
809        # - Partial errors. If a service needs to return partial errors to the client,
810        #     it may embed the `Status` in the normal response to indicate the partial
811        #     errors.
812        #
813        # - Workflow errors. A typical workflow has multiple steps. Each step may
814        #     have a `Status` message for error reporting.
815        #
816        # - Batch operations. If a client uses batch request and batch response, the
817        #     `Status` message should be used directly inside batch response, one for
818        #     each error sub-response.
819        #
820        # - Asynchronous operations. If an API call embeds asynchronous operation
821        #     results in its response, the status of those operations should be
822        #     represented directly using the `Status` message.
823        #
824        # - Logging. If some API errors are stored in logs, the message `Status` could
825        #     be used directly after any stripping needed for security/privacy reasons.
826      "message": "A String", # A developer-facing error message, which should be in English. Any
827          # user-facing error message should be localized and sent in the
828          # google.rpc.Status.details field, or localized by the client.
829      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
830      "details": [ # A list of messages that carry the error details.  There is a common set of
831          # message types for APIs to use.
832        {
833          "a_key": "", # Properties of the object. Contains field @type with type URL.
834        },
835      ],
836    },
837    "done": True or False, # If the value is `false`, it means the operation is still in progress.
838        # If `true`, the operation is completed, and either `error` or `response` is
839        # available.
840    "response": { # The normal response of the operation in case of success.  If the original
841        # method returns no data on success, such as `Delete`, the response is
842        # `google.protobuf.Empty`.  If the original method is standard
843        # `Get`/`Create`/`Update`, the response should be the resource.  For other
844        # methods, the response should have the type `XxxResponse`, where `Xxx`
845        # is the original method name.  For example, if the original method name
846        # is `TakeSnapshot()`, the inferred response type is
847        # `TakeSnapshotResponse`.
848      "a_key": "", # Properties of the object. Contains field @type with type URL.
849    },
850    "name": "A String", # The server-assigned name, which is only unique within the same service that
851        # originally returns it. If you use the default HTTP mapping, the
852        # `name` should be a resource name ending with `operations/{unique_id}`.
853  }</pre>
854</div>
855
856<div class="method">
857    <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
858  <pre>Sets the access control policy on an instance resource. Replaces any
859existing policy.
860
861Authorization requires `spanner.instances.setIamPolicy` on
862resource.
863
864Args:
865  resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for databases resources. (required)
866  body: object, The request body. (required)
867    The object takes the form of:
868
869{ # Request message for `SetIamPolicy` method.
870    "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of
871        # the policy is limited to a few 10s of KB. An empty policy is a
872        # valid policy but certain Cloud Platform services (such as Projects)
873        # might reject them.
874        # specify access control policies for Cloud Platform resources.
875        #
876        #
877        # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
878        # `members` to a `role`, where the members can be user accounts, Google groups,
879        # Google domains, and service accounts. A `role` is a named list of permissions
880        # defined by IAM.
881        #
882        # **JSON Example**
883        #
884        #     {
885        #       "bindings": [
886        #         {
887        #           "role": "roles/owner",
888        #           "members": [
889        #             "user:mike@example.com",
890        #             "group:admins@example.com",
891        #             "domain:google.com",
892        #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
893        #           ]
894        #         },
895        #         {
896        #           "role": "roles/viewer",
897        #           "members": ["user:sean@example.com"]
898        #         }
899        #       ]
900        #     }
901        #
902        # **YAML Example**
903        #
904        #     bindings:
905        #     - members:
906        #       - user:mike@example.com
907        #       - group:admins@example.com
908        #       - domain:google.com
909        #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
910        #       role: roles/owner
911        #     - members:
912        #       - user:sean@example.com
913        #       role: roles/viewer
914        #
915        #
916        # For a description of IAM and its features, see the
917        # [IAM developer's guide](https://cloud.google.com/iam/docs).
918      "bindings": [ # Associates a list of `members` to a `role`.
919          # `bindings` with no members will result in an error.
920        { # Associates `members` with a `role`.
921          "role": "A String", # Role that is assigned to `members`.
922              # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
923          "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
924              # `members` can have the following values:
925              #
926              # * `allUsers`: A special identifier that represents anyone who is
927              #    on the internet; with or without a Google account.
928              #
929              # * `allAuthenticatedUsers`: A special identifier that represents anyone
930              #    who is authenticated with a Google account or a service account.
931              #
932              # * `user:{emailid}`: An email address that represents a specific Google
933              #    account. For example, `alice@gmail.com` .
934              #
935              #
936              # * `serviceAccount:{emailid}`: An email address that represents a service
937              #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
938              #
939              # * `group:{emailid}`: An email address that represents a Google group.
940              #    For example, `admins@example.com`.
941              #
942              #
943              # * `domain:{domain}`: The G Suite domain (primary) that represents all the
944              #    users of that domain. For example, `google.com` or `example.com`.
945              #
946            "A String",
947          ],
948          "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
949              # NOTE: An unsatisfied condition will not allow user access via current
950              # binding. Different bindings, including their conditions, are examined
951              # independently.
952              #
953              #     title: "User account presence"
954              #     description: "Determines whether the request has a user account"
955              #     expression: "size(request.user) > 0"
956            "location": "A String", # An optional string indicating the location of the expression for error
957                # reporting, e.g. a file name and a position in the file.
958            "expression": "A String", # Textual representation of an expression in
959                # Common Expression Language syntax.
960                #
961                # The application context of the containing message determines which
962                # well-known feature set of CEL is supported.
963            "description": "A String", # An optional description of the expression. This is a longer text which
964                # describes the expression, e.g. when hovered over it in a UI.
965            "title": "A String", # An optional title for the expression, i.e. a short string describing
966                # its purpose. This can be used e.g. in UIs which allow to enter the
967                # expression.
968          },
969        },
970      ],
971      "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
972          # prevent simultaneous updates of a policy from overwriting each other.
973          # It is strongly suggested that systems make use of the `etag` in the
974          # read-modify-write cycle to perform policy updates in order to avoid race
975          # conditions: An `etag` is returned in the response to `getIamPolicy`, and
976          # systems are expected to put that etag in the request to `setIamPolicy` to
977          # ensure that their change will be applied to the same version of the policy.
978          #
979          # If no `etag` is provided in the call to `setIamPolicy`, then the existing
980          # policy is overwritten blindly.
981      "version": 42, # Deprecated.
982    },
983  }
984
985  x__xgafv: string, V1 error format.
986    Allowed values
987      1 - v1 error format
988      2 - v2 error format
989
990Returns:
991  An object of the form:
992
993    { # Defines an Identity and Access Management (IAM) policy. It is used to
994      # specify access control policies for Cloud Platform resources.
995      #
996      #
997      # A `Policy` consists of a list of `bindings`. A `binding` binds a list of
998      # `members` to a `role`, where the members can be user accounts, Google groups,
999      # Google domains, and service accounts. A `role` is a named list of permissions
1000      # defined by IAM.
1001      #
1002      # **JSON Example**
1003      #
1004      #     {
1005      #       "bindings": [
1006      #         {
1007      #           "role": "roles/owner",
1008      #           "members": [
1009      #             "user:mike@example.com",
1010      #             "group:admins@example.com",
1011      #             "domain:google.com",
1012      #             "serviceAccount:my-other-app@appspot.gserviceaccount.com"
1013      #           ]
1014      #         },
1015      #         {
1016      #           "role": "roles/viewer",
1017      #           "members": ["user:sean@example.com"]
1018      #         }
1019      #       ]
1020      #     }
1021      #
1022      # **YAML Example**
1023      #
1024      #     bindings:
1025      #     - members:
1026      #       - user:mike@example.com
1027      #       - group:admins@example.com
1028      #       - domain:google.com
1029      #       - serviceAccount:my-other-app@appspot.gserviceaccount.com
1030      #       role: roles/owner
1031      #     - members:
1032      #       - user:sean@example.com
1033      #       role: roles/viewer
1034      #
1035      #
1036      # For a description of IAM and its features, see the
1037      # [IAM developer's guide](https://cloud.google.com/iam/docs).
1038    "bindings": [ # Associates a list of `members` to a `role`.
1039        # `bindings` with no members will result in an error.
1040      { # Associates `members` with a `role`.
1041        "role": "A String", # Role that is assigned to `members`.
1042            # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1043        "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
1044            # `members` can have the following values:
1045            #
1046            # * `allUsers`: A special identifier that represents anyone who is
1047            #    on the internet; with or without a Google account.
1048            #
1049            # * `allAuthenticatedUsers`: A special identifier that represents anyone
1050            #    who is authenticated with a Google account or a service account.
1051            #
1052            # * `user:{emailid}`: An email address that represents a specific Google
1053            #    account. For example, `alice@gmail.com` .
1054            #
1055            #
1056            # * `serviceAccount:{emailid}`: An email address that represents a service
1057            #    account. For example, `my-other-app@appspot.gserviceaccount.com`.
1058            #
1059            # * `group:{emailid}`: An email address that represents a Google group.
1060            #    For example, `admins@example.com`.
1061            #
1062            #
1063            # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1064            #    users of that domain. For example, `google.com` or `example.com`.
1065            #
1066          "A String",
1067        ],
1068        "condition": { # Represents an expression text. Example: # The condition that is associated with this binding.
1069            # NOTE: An unsatisfied condition will not allow user access via current
1070            # binding. Different bindings, including their conditions, are examined
1071            # independently.
1072            #
1073            #     title: "User account presence"
1074            #     description: "Determines whether the request has a user account"
1075            #     expression: "size(request.user) > 0"
1076          "location": "A String", # An optional string indicating the location of the expression for error
1077              # reporting, e.g. a file name and a position in the file.
1078          "expression": "A String", # Textual representation of an expression in
1079              # Common Expression Language syntax.
1080              #
1081              # The application context of the containing message determines which
1082              # well-known feature set of CEL is supported.
1083          "description": "A String", # An optional description of the expression. This is a longer text which
1084              # describes the expression, e.g. when hovered over it in a UI.
1085          "title": "A String", # An optional title for the expression, i.e. a short string describing
1086              # its purpose. This can be used e.g. in UIs which allow to enter the
1087              # expression.
1088        },
1089      },
1090    ],
1091    "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1092        # prevent simultaneous updates of a policy from overwriting each other.
1093        # It is strongly suggested that systems make use of the `etag` in the
1094        # read-modify-write cycle to perform policy updates in order to avoid race
1095        # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1096        # systems are expected to put that etag in the request to `setIamPolicy` to
1097        # ensure that their change will be applied to the same version of the policy.
1098        #
1099        # If no `etag` is provided in the call to `setIamPolicy`, then the existing
1100        # policy is overwritten blindly.
1101    "version": 42, # Deprecated.
1102  }</pre>
1103</div>
1104
1105<div class="method">
1106    <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
1107  <pre>Returns permissions that the caller has on the specified instance resource.
1108
1109Attempting this RPC on a non-existent Cloud Spanner instance resource will
1110result in a NOT_FOUND error if the user has `spanner.instances.list`
1111permission on the containing Google Cloud Project. Otherwise returns an
1112empty set of permissions.
1113
1114Args:
1115  resource: string, REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for database resources. (required)
1116  body: object, The request body. (required)
1117    The object takes the form of:
1118
1119{ # Request message for `TestIamPermissions` method.
1120    "permissions": [ # REQUIRED: The set of permissions to check for 'resource'.
1121        # Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') are not allowed.
1122      "A String",
1123    ],
1124  }
1125
1126  x__xgafv: string, V1 error format.
1127    Allowed values
1128      1 - v1 error format
1129      2 - v2 error format
1130
1131Returns:
1132  An object of the form:
1133
1134    { # Response message for `TestIamPermissions` method.
1135    "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1136        # allowed.
1137      "A String",
1138    ],
1139  }</pre>
1140</div>
1141
1142</body></html>