blob: a3a1780ca3cc0cf5ea4836993c76e67c56103c3d [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> . <a href="spanner_v1.projects.instances.databases.html">databases</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="spanner_v1.projects.instances.databases.operations.html">operations()</a></code>
79</p>
80<p class="firstline">Returns the operations Resource.</p>
81
82<p class="toc_element">
83 <code><a href="spanner_v1.projects.instances.databases.sessions.html">sessions()</a></code>
84</p>
85<p class="firstline">Returns the sessions Resource.</p>
86
87<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070088 <code><a href="#close">close()</a></code></p>
89<p class="firstline">Close httplib2 connections.</p>
90<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070091 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070092<p class="firstline">Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093<p class="toc_element">
94 <code><a href="#dropDatabase">dropDatabase(database, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070095<p class="firstline">Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their `expire_time`.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040096<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070097 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040098<p class="firstline">Gets the state of a Cloud Spanner database.</p>
99<p class="toc_element">
100 <code><a href="#getDdl">getDdl(database, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700101<p class="firstline">Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the Operations API.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400102<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700104<p class="firstline">Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400105<p class="toc_element">
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700106 <code><a href="#getScans">getScans(name, endTime=None, startTime=None, view=None, x__xgafv=None)</a></code></p>
107<p class="firstline">Request a specific scan with Database-specific data for Cloud Key Visualizer.</p>
108<p class="toc_element">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800109 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400110<p class="firstline">Lists Cloud Spanner databases.</p>
111<p class="toc_element">
112 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
113<p class="firstline">Retrieves the next page of results.</p>
114<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 <code><a href="#restore">restore(parent, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700116<p class="firstline">Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of the operation, and to cancel it. The metadata field type is RestoreDatabaseMetadata. The response type is Database, if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400117<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700119<p class="firstline">Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400120<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700122<p class="firstline">Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700123<p class="toc_element">
124 <code><a href="#updateDdl">updateDdl(database, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700125<p class="firstline">Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned long-running operation will have a name of the format `/operations/` and can be used to track execution of the schema change(s). The metadata field type is UpdateDatabaseDdlMetadata. The operation has no response.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400126<h3>Method Details</h3>
127<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700128 <code class="details" id="close">close()</code>
129 <pre>Close httplib2 connections.</pre>
130</div>
131
132<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700133 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700134 <pre>Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400135
136Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700137 parent: string, Required. The name of the instance that will serve the new database. Values are of the form `projects//instances/`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400139 The object takes the form of:
140
141{ # The request for CreateDatabase.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800142 &quot;createStatement&quot;: &quot;A String&quot;, # Required. A `CREATE DATABASE` statement, which specifies the ID of the new database. The database ID must conform to the regular expression `a-z*[a-z0-9]` and be between 2 and 30 characters in length. If the database ID is a reserved word or if it contains a hyphen, the database ID must be enclosed in backticks (`` ` ``).
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800143 &quot;encryptionConfig&quot;: { # Encryption configuration for a Cloud Spanner database. # Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption.
144 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
145 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800146 &quot;extraStatements&quot;: [ # Optional. A list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created.
147 &quot;A String&quot;,
148 ],
149}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400150
151 x__xgafv: string, V1 error format.
152 Allowed values
153 1 - v1 error format
154 2 - v2 error format
155
156Returns:
157 An object of the form:
158
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700159 { # This resource represents a long-running operation that is the result of a network API call.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800160 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
161 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
162 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
163 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
164 {
165 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
166 },
167 ],
168 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
169 },
170 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
171 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
172 },
173 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
174 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
175 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
176 },
177}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400178</div>
179
180<div class="method">
181 <code class="details" id="dropDatabase">dropDatabase(database, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700182 <pre>Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their `expire_time`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400183
184Args:
185 database: string, Required. The database to be dropped. (required)
186 x__xgafv: string, V1 error format.
187 Allowed values
188 1 - v1 error format
189 2 - v2 error format
190
191Returns:
192 An object of the form:
193
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700194 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800195}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400196</div>
197
198<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700199 <code class="details" id="get">get(name, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400200 <pre>Gets the state of a Cloud Spanner database.
201
202Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700203 name: string, Required. The name of the requested database. Values are of the form `projects//instances//databases/`. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400204 x__xgafv: string, V1 error format.
205 Allowed values
206 1 - v1 error format
207 2 - v2 error format
208
209Returns:
210 An object of the form:
211
212 { # A Cloud Spanner database.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800213 &quot;createTime&quot;: &quot;A String&quot;, # Output only. If exists, the time at which the database creation started.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800214 &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
215 &quot;encryptionConfig&quot;: { # Encryption configuration for a Cloud Spanner database. # Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.
216 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
217 },
218 &quot;encryptionInfo&quot;: [ # Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.
219 { # Encryption information for a Cloud Spanner database or backup.
220 &quot;encryptionStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. If present, the status of a recent encrypt/decrypt call on underlying data for this database or backup. Regardless of status, data is always encrypted at rest.
221 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
222 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
223 {
224 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
225 },
226 ],
227 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
228 },
229 &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
230 &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
231 },
232 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800233 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.
234 &quot;restoreInfo&quot;: { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information about the restore source.
235 &quot;backupInfo&quot;: { # Information about a backup. # Information about the backup used to restore the database. The backup may no longer exist.
236 &quot;backup&quot;: &quot;A String&quot;, # Name of the backup.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800237 &quot;createTime&quot;: &quot;A String&quot;, # The time the CreateBackup request was received.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800238 &quot;sourceDatabase&quot;: &quot;A String&quot;, # Name of the database the backup was created from.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800239 &quot;versionTime&quot;: &quot;A String&quot;, # The backup contains an externally consistent copy of `source_database` at the timestamp specified by `version_time`. If the CreateBackup request did not specify `version_time`, the `version_time` of the backup is equivalent to the `create_time`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800241 &quot;sourceType&quot;: &quot;A String&quot;, # The type of the restore source.
242 },
243 &quot;state&quot;: &quot;A String&quot;, # Output only. The current database state.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800244 &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800245}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400246</div>
247
248<div class="method">
249 <code class="details" id="getDdl">getDdl(database, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700250 <pre>Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the Operations API.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400251
252Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700253 database: string, Required. The database whose schema we wish to get. Values are of the form `projects//instances//databases/` (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400254 x__xgafv: string, V1 error format.
255 Allowed values
256 1 - v1 error format
257 2 - v2 error format
258
259Returns:
260 An object of the form:
261
262 { # The response for GetDatabaseDdl.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800263 &quot;statements&quot;: [ # A list of formatted DDL statements defining the schema of the database specified in the request.
264 &quot;A String&quot;,
265 ],
266}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400267</div>
268
269<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700270 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700271 <pre>Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400272
273Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700274 resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400276 The object takes the form of:
277
278{ # Request message for `GetIamPolicy` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800279 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
280 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
281 },
282}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400283
284 x__xgafv: string, V1 error format.
285 Allowed values
286 1 - v1 error format
287 2 - v2 error format
288
289Returns:
290 An object of the form:
291
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700292 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800293 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
294 { # Associates `members` with a `role`.
295 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
296 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
297 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
298 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
299 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400300 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800301 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
302 &quot;A String&quot;,
303 ],
304 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
305 },
306 ],
307 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
308 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
309}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400310</div>
311
312<div class="method">
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700313 <code class="details" id="getScans">getScans(name, endTime=None, startTime=None, view=None, x__xgafv=None)</code>
314 <pre>Request a specific scan with Database-specific data for Cloud Key Visualizer.
315
316Args:
317 name: string, Required. The unique name of the scan containing the requested information, specific to the Database service implementing this interface. (required)
318 endTime: string, The upper bound for the time range to retrieve Scan data for.
319 startTime: string, These fields restrict the Database-specific information returned in the `Scan.data` field. If a `View` is provided that does not include the `Scan.data` field, these are ignored. This range of time must be entirely contained within the defined time range of the targeted scan. The lower bound for the time range to retrieve Scan data for.
320 view: string, Specifies which parts of the Scan should be returned in the response. Note, if left unspecified, the FULL view is assumed.
321 Allowed values
322 VIEW_UNSPECIFIED - Not specified, equivalent to SUMMARY.
323 SUMMARY - Server responses only include `name`, `details`, `start_time` and `end_time`. The default value. Note, the ListScans method may only use this view type, others view types are not supported.
324 FULL - Full representation of the scan is returned in the server response, including `data`.
325 x__xgafv: string, V1 error format.
326 Allowed values
327 1 - v1 error format
328 2 - v2 error format
329
330Returns:
331 An object of the form:
332
333 { # Scan is a structure which describes Cloud Key Visualizer scan information.
334 &quot;details&quot;: { # Additional information provided by the implementer.
335 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
336 },
337 &quot;endTime&quot;: &quot;A String&quot;, # The upper bound for when the scan is defined.
338 &quot;name&quot;: &quot;A String&quot;, # The unique name of the scan, specific to the Database service implementing this interface.
339 &quot;scanData&quot;: { # ScanData contains Cloud Key Visualizer scan data used by the caller to construct a visualization. # Output only. Cloud Key Visualizer scan data. Note, this field is not available to the ListScans method.
340 &quot;data&quot;: { # Cloud Key Visualizer scan data. The range of time this information covers is captured via the above time range fields. Note, this field is not available to the ListScans method.
341 &quot;dataSourceEndToken&quot;: &quot;A String&quot;, # The token signifying the end of a data_source.
342 &quot;dataSourceSeparatorToken&quot;: &quot;A String&quot;, # The token delimiting a datasource name from the rest of a key in a data_source.
343 &quot;diagnosticMessages&quot;: [ # The list of messages (info, alerts, ...)
344 { # A message representing the key visualizer diagnostic messages.
345 &quot;info&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # Information about this diagnostic information.
346 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
347 &quot;a_key&quot;: &quot;A String&quot;,
348 },
349 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
350 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
351 },
352 &quot;metric&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The metric.
353 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
354 &quot;a_key&quot;: &quot;A String&quot;,
355 },
356 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
357 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
358 },
359 &quot;metricSpecific&quot;: True or False, # Whether this message is specific only for the current metric. By default Diagnostics are shown for all metrics, regardless which metric is the currently selected metric in the UI. However occasionally a metric will generate so many messages that the resulting visual clutter becomes overwhelming. In this case setting this to true, will show the diagnostic messages for that metric only if it is the currently selected metric.
360 &quot;severity&quot;: &quot;A String&quot;, # The severity of the diagnostic message.
361 &quot;shortMessage&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The short message.
362 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
363 &quot;a_key&quot;: &quot;A String&quot;,
364 },
365 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
366 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
367 },
368 },
369 ],
370 &quot;endKeyStrings&quot;: [ # We discretize the entire keyspace into buckets. Assuming each bucket has an inclusive keyrange and covers keys from k(i) ... k(n). In this case k(n) would be an end key for a given range. end_key_string is the collection of all such end keys
371 &quot;A String&quot;,
372 ],
373 &quot;hasPii&quot;: True or False, # Whether this scan contains PII.
374 &quot;indexedKeys&quot;: [ # Keys of key ranges that contribute significantly to a given metric Can be thought of as heavy hitters.
375 &quot;A String&quot;,
376 ],
377 &quot;keySeparator&quot;: &quot;A String&quot;, # The token delimiting the key prefixes.
378 &quot;keyUnit&quot;: &quot;A String&quot;, # The unit for the key: e.g. &#x27;key&#x27; or &#x27;chunk&#x27;.
379 &quot;metrics&quot;: [ # The list of data objects for each metric.
380 { # A message representing the actual monitoring data, values for each key bucket over time, of a metric.
381 &quot;aggregation&quot;: &quot;A String&quot;, # The aggregation function used to aggregate each key bucket
382 &quot;category&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The category of the metric, e.g. &quot;Activity&quot;, &quot;Alerts&quot;, &quot;Reads&quot;, etc.
383 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
384 &quot;a_key&quot;: &quot;A String&quot;,
385 },
386 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
387 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
388 },
389 &quot;derived&quot;: { # A message representing a derived metric. # The references to numerator and denominator metrics for a derived metric.
390 &quot;denominator&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The name of the denominator metric. e.g. &quot;rows&quot;.
391 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
392 &quot;a_key&quot;: &quot;A String&quot;,
393 },
394 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
395 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
396 },
397 &quot;numerator&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The name of the numerator metric. e.g. &quot;latency&quot;.
398 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
399 &quot;a_key&quot;: &quot;A String&quot;,
400 },
401 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
402 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
403 },
404 },
405 &quot;displayLabel&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The displayed label of the metric.
406 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
407 &quot;a_key&quot;: &quot;A String&quot;,
408 },
409 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
410 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
411 },
412 &quot;hasNonzeroData&quot;: True or False, # Whether the metric has any non-zero data.
413 &quot;hotValue&quot;: 3.14, # The value that is considered hot for the metric. On a per metric basis hotness signals high utilization and something that might potentially be a cause for concern by the end user. hot_value is used to calibrate and scale visual color scales.
414 &quot;indexedHotKeys&quot;: { # The (sparse) mapping from time index to an IndexedHotKey message, representing those time intervals for which there are hot keys.
415 &quot;a_key&quot;: { # A message representing a (sparse) collection of hot keys for specific key buckets.
416 &quot;sparseHotKeys&quot;: { # A (sparse) mapping from key bucket index to the index of the specific hot row key for that key bucket. The index of the hot row key can be translated to the actual row key via the ScanData.VisualizationData.indexed_keys repeated field.
417 &quot;a_key&quot;: 42,
418 },
419 },
420 },
421 &quot;indexedKeyRangeInfos&quot;: { # The (sparse) mapping from time interval index to an IndexedKeyRangeInfos message, representing those time intervals for which there are informational messages concerning key ranges.
422 &quot;a_key&quot;: { # A message representing a (sparse) collection of KeyRangeInfos for specific key buckets.
423 &quot;keyRangeInfos&quot;: { # A (sparse) mapping from key bucket index to the KeyRangeInfos for that key bucket.
424 &quot;a_key&quot;: { # A message representing a list of specific information for multiple key ranges.
425 &quot;infos&quot;: [ # The list individual KeyRangeInfos.
426 { # A message representing information for a key range (possibly one key).
427 &quot;contextValues&quot;: [ # The list of context values for this key range.
428 { # A message representing context for a KeyRangeInfo, including a label, value, unit, and severity.
429 &quot;label&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The label for the context value. e.g. &quot;latency&quot;.
430 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
431 &quot;a_key&quot;: &quot;A String&quot;,
432 },
433 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
434 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
435 },
436 &quot;severity&quot;: &quot;A String&quot;, # The severity of this context.
437 &quot;unit&quot;: &quot;A String&quot;, # The unit of the context value.
438 &quot;value&quot;: 3.14, # The value for the context.
439 },
440 ],
441 &quot;endKeyIndex&quot;: 42, # The index of the end key in indexed_keys.
442 &quot;info&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # Information about this key range, for all metrics.
443 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
444 &quot;a_key&quot;: &quot;A String&quot;,
445 },
446 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
447 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
448 },
449 &quot;keysCount&quot;: &quot;A String&quot;, # The number of keys this range covers.
450 &quot;metric&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The name of the metric. e.g. &quot;latency&quot;.
451 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
452 &quot;a_key&quot;: &quot;A String&quot;,
453 },
454 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
455 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
456 },
457 &quot;startKeyIndex&quot;: 42, # The index of the start key in indexed_keys.
yoshi-code-bota933dad2021-07-06 00:26:24 -0700458 &quot;timeOffset&quot;: &quot;A String&quot;, # The time offset. This is the time since the start of the time interval.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700459 &quot;unit&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The unit of the metric. This is an unstructured field and will be mapped as is to the user.
460 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
461 &quot;a_key&quot;: &quot;A String&quot;,
462 },
463 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
464 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
465 },
466 &quot;value&quot;: 3.14, # The value of the metric.
467 },
468 ],
469 &quot;totalSize&quot;: 42, # The total size of the list of all KeyRangeInfos. This may be larger than the number of repeated messages above. If that is the case, this number may be used to determine how many are not being shown.
470 },
471 },
472 },
473 },
474 &quot;info&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # Information about the metric.
475 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
476 &quot;a_key&quot;: &quot;A String&quot;,
477 },
478 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
479 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
480 },
481 &quot;matrix&quot;: { # A message representing a matrix of floats. # The data for the metric as a matrix.
482 &quot;rows&quot;: [ # The rows of the matrix.
483 { # A message representing a row of a matrix of floats.
484 &quot;cols&quot;: [ # The columns of the row.
485 3.14,
486 ],
487 },
488 ],
489 },
490 &quot;unit&quot;: { # A message representing a user-facing string whose value may need to be translated before being displayed. # The unit of the metric.
491 &quot;args&quot;: { # A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.
492 &quot;a_key&quot;: &quot;A String&quot;,
493 },
494 &quot;message&quot;: &quot;A String&quot;, # The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.
495 &quot;token&quot;: &quot;A String&quot;, # The token identifying the message, e.g. &#x27;METRIC_READ_CPU&#x27;. This should be unique within the service.
496 },
497 &quot;visible&quot;: True or False, # Whether the metric is visible to the end user.
498 },
499 ],
500 &quot;prefixNodes&quot;: [ # The list of extracted key prefix nodes used in the key prefix hierarchy.
501 { # A message representing a key prefix node in the key prefix hierarchy. for eg. Bigtable keyspaces are lexicographically ordered mappings of keys to values. Keys often have a shared prefix structure where users use the keys to organize data. Eg ///employee In this case Keysight will possibly use one node for a company and reuse it for all employees that fall under the company. Doing so improves legibility in the UI.
502 &quot;dataSourceNode&quot;: True or False, # Whether this corresponds to a data_source name.
503 &quot;depth&quot;: 42, # The depth in the prefix hierarchy.
504 &quot;endIndex&quot;: 42, # The index of the end key bucket of the range that this node spans.
505 &quot;startIndex&quot;: 42, # The index of the start key bucket of the range that this node spans.
506 &quot;word&quot;: &quot;A String&quot;, # The string represented by the prefix node.
507 },
508 ],
509 },
510 &quot;endTime&quot;: &quot;A String&quot;, # The upper bound for when the contained data is defined.
511 &quot;startTime&quot;: &quot;A String&quot;, # A range of time (inclusive) for when the contained data is defined. The lower bound for when the contained data is defined.
512 },
513 &quot;startTime&quot;: &quot;A String&quot;, # A range of time (inclusive) for when the scan is defined. The lower bound for when the scan is defined.
514}</pre>
515</div>
516
517<div class="method">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800518 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400519 <pre>Lists Cloud Spanner databases.
520
521Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700522 parent: string, Required. The instance whose databases should be listed. Values are of the form `projects//instances/`. (required)
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800523 pageSize: integer, Number of databases to be returned in the response. If 0 or less, defaults to the server&#x27;s maximum allowed page size.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800524 pageToken: string, If non-empty, `page_token` should contain a next_page_token from a previous ListDatabasesResponse.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400525 x__xgafv: string, V1 error format.
526 Allowed values
527 1 - v1 error format
528 2 - v2 error format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400529
530Returns:
531 An object of the form:
532
533 { # The response for ListDatabases.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800534 &quot;databases&quot;: [ # Databases that matched the request.
535 { # A Cloud Spanner database.
536 &quot;createTime&quot;: &quot;A String&quot;, # Output only. If exists, the time at which the database creation started.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800537 &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
538 &quot;encryptionConfig&quot;: { # Encryption configuration for a Cloud Spanner database. # Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.
539 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
540 },
541 &quot;encryptionInfo&quot;: [ # Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.
542 { # Encryption information for a Cloud Spanner database or backup.
543 &quot;encryptionStatus&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. If present, the status of a recent encrypt/decrypt call on underlying data for this database or backup. Regardless of status, data is always encrypted at rest.
544 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
545 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
546 {
547 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
548 },
549 ],
550 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
551 },
552 &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
553 &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
554 },
555 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800556 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.
557 &quot;restoreInfo&quot;: { # Information about the database restore. # Output only. Applicable only for restored databases. Contains information about the restore source.
558 &quot;backupInfo&quot;: { # Information about a backup. # Information about the backup used to restore the database. The backup may no longer exist.
559 &quot;backup&quot;: &quot;A String&quot;, # Name of the backup.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800560 &quot;createTime&quot;: &quot;A String&quot;, # The time the CreateBackup request was received.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800561 &quot;sourceDatabase&quot;: &quot;A String&quot;, # Name of the database the backup was created from.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800562 &quot;versionTime&quot;: &quot;A String&quot;, # The backup contains an externally consistent copy of `source_database` at the timestamp specified by `version_time`. If the CreateBackup request did not specify `version_time`, the `version_time` of the backup is equivalent to the `create_time`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800564 &quot;sourceType&quot;: &quot;A String&quot;, # The type of the restore source.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400565 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800566 &quot;state&quot;: &quot;A String&quot;, # Output only. The current database state.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800567 &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800568 },
569 ],
570 &quot;nextPageToken&quot;: &quot;A String&quot;, # `next_page_token` can be sent in a subsequent ListDatabases call to fetch more of the matching databases.
571}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400572</div>
573
574<div class="method">
575 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
576 <pre>Retrieves the next page of results.
577
578Args:
579 previous_request: The request for the previous page. (required)
580 previous_response: The response from the request for the previous page. (required)
581
582Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400584 page. Returns None if there are no more items in the collection.
585 </pre>
586</div>
587
588<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700589 <code class="details" id="restore">restore(parent, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700590 <pre>Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of the operation, and to cancel it. The metadata field type is RestoreDatabaseMetadata. The response type is Database, if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400591
592Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700593 parent: string, Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects//instances/`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700594 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400595 The object takes the form of:
596
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700597{ # The request for RestoreDatabase.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800598 &quot;backup&quot;: &quot;A String&quot;, # Name of the backup from which to restore. Values are of the form `projects//instances//backups/`.
599 &quot;databaseId&quot;: &quot;A String&quot;, # Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects//instances//databases/`.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700600 &quot;encryptionConfig&quot;: { # Encryption configuration for the restored database. # Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800601 &quot;encryptionType&quot;: &quot;A String&quot;, # Required. The encryption type of the restored database.
602 &quot;kmsKeyName&quot;: &quot;A String&quot;, # Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored database. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
603 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800604}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400605
606 x__xgafv: string, V1 error format.
607 Allowed values
608 1 - v1 error format
609 2 - v2 error format
610
611Returns:
612 An object of the form:
613
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700614 { # This resource represents a long-running operation that is the result of a network API call.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800615 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
616 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
617 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
618 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
619 {
620 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
621 },
622 ],
623 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
624 },
625 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
626 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
627 },
628 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
629 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
630 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
631 },
632}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700633</div>
634
635<div class="method">
636 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700637 <pre>Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700638
639Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700640 resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 body: object, The request body.
642 The object takes the form of:
643
644{ # Request message for `SetIamPolicy` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800645 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
646 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
647 { # Associates `members` with a `role`.
648 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
649 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
650 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
651 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
652 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Dan O'Mearadd494642020-05-01 07:42:23 -0700653 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800654 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
655 &quot;A String&quot;,
656 ],
657 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
658 },
659 ],
660 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
661 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
662 },
663}
Dan O'Mearadd494642020-05-01 07:42:23 -0700664
665 x__xgafv: string, V1 error format.
666 Allowed values
667 1 - v1 error format
668 2 - v2 error format
669
670Returns:
671 An object of the form:
672
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700673 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800674 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
675 { # Associates `members` with a `role`.
676 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
677 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
678 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
679 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
680 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Dan O'Mearadd494642020-05-01 07:42:23 -0700681 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800682 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
683 &quot;A String&quot;,
684 ],
685 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
686 },
687 ],
688 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
689 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
690}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700691</div>
692
693<div class="method">
694 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700695 <pre>Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700696
697Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700698 resource: string, REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700699 body: object, The request body.
700 The object takes the form of:
701
702{ # Request message for `TestIamPermissions` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800703 &quot;permissions&quot;: [ # REQUIRED: The set of permissions to check for &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27;, &#x27;spanner.*&#x27;, &#x27;spanner.instances.*&#x27;) are not allowed.
704 &quot;A String&quot;,
705 ],
706}
Dan O'Mearadd494642020-05-01 07:42:23 -0700707
708 x__xgafv: string, V1 error format.
709 Allowed values
710 1 - v1 error format
711 2 - v2 error format
712
713Returns:
714 An object of the form:
715
716 { # Response message for `TestIamPermissions` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800717 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
718 &quot;A String&quot;,
719 ],
720}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700721</div>
722
723<div class="method">
724 <code class="details" id="updateDdl">updateDdl(database, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700725 <pre>Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned long-running operation will have a name of the format `/operations/` and can be used to track execution of the schema change(s). The metadata field type is UpdateDatabaseDdlMetadata. The operation has no response.
Dan O'Mearadd494642020-05-01 07:42:23 -0700726
727Args:
728 database: string, Required. The database to update. (required)
729 body: object, The request body.
730 The object takes the form of:
731
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700732{ # Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to the database schema at some point (or points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a `NULL` value in a column to which `NOT NULL` would be added). If a statement fails, all subsequent statements in the batch are automatically cancelled. Each batch of statements is assigned a name which can be used with the Operations API to monitor progress. See the operation_id field for more details.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800733 &quot;operationId&quot;: &quot;A String&quot;, # If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting Operation. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and `operation_id` fields can be combined to form the name of the resulting longrunning.Operation: `/operations/`. `operation_id` should be unique within the database, and must be a valid identifier: `a-z*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns `ALREADY_EXISTS`.
734 &quot;statements&quot;: [ # Required. DDL statements to be applied to the database.
735 &quot;A String&quot;,
736 ],
737}
Dan O'Mearadd494642020-05-01 07:42:23 -0700738
739 x__xgafv: string, V1 error format.
740 Allowed values
741 1 - v1 error format
742 2 - v2 error format
743
744Returns:
745 An object of the form:
746
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700747 { # This resource represents a long-running operation that is the result of a network API call.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800748 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
749 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
750 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
751 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
752 {
753 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
754 },
755 ],
756 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
757 },
758 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
759 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
760 },
761 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
762 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
763 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
764 },
765}</pre>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400766</div>
767
768</body></html>