blob: 63039896ff039c7b5ee3c3657ce915839314ba0b [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="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.backups.html">backups</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="spanner_v1.projects.instances.backups.operations.html">operations()</a></code>
79</p>
80<p class="firstline">Returns the operations Resource.</p>
81
82<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070083 <code><a href="#close">close()</a></code></p>
84<p class="firstline">Close httplib2 connections.</p>
85<p class="toc_element">
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080086 <code><a href="#create">create(parent, backupId=None, body=None, encryptionConfig_encryptionType=None, encryptionConfig_kmsKeyName=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087<p class="firstline">Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070088<p class="toc_element">
89 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
90<p class="firstline">Deletes a pending or completed Backup.</p>
91<p class="toc_element">
92 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
93<p class="firstline">Gets metadata on a pending or completed Backup.</p>
94<p class="toc_element">
95 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070096<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>
Bu Sun Kim65020912020-05-20 12:08:20 -070097<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080098 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099<p class="firstline">Lists completed and pending backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -0700100<p class="toc_element">
101 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
102<p class="firstline">Retrieves the next page of results.</p>
103<p class="toc_element">
104 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
105<p class="firstline">Updates a pending or completed Backup.</p>
106<p class="toc_element">
107 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700108<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>
Bu Sun Kim65020912020-05-20 12:08:20 -0700109<p class="toc_element">
110 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700111<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>
Bu Sun Kim65020912020-05-20 12:08:20 -0700112<h3>Method Details</h3>
113<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 <code class="details" id="close">close()</code>
115 <pre>Close httplib2 connections.</pre>
116</div>
117
118<div class="method">
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800119 <code class="details" id="create">create(parent, backupId=None, body=None, encryptionConfig_encryptionType=None, encryptionConfig_kmsKeyName=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700120 <pre>Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121
122Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 parent: string, Required. The name of the instance in which the backup will be created. This must be the same instance that contains the database the backup will be created from. The backup will be stored in the location(s) specified in the instance configuration of this instance. Values are of the form `projects//instances/`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 body: object, The request body.
125 The object takes the form of:
126
127{ # A backup of a Cloud Spanner database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800128 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800129 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800130 &quot;encryptionInfo&quot;: { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup.
131 &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.
132 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
133 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
134 {
135 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
136 },
137 ],
138 &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.
139 },
140 &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
141 &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
142 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800143 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
144 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.
145 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed.
146 &quot;A String&quot;,
147 ],
148 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
149 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800150 &quot;versionTime&quot;: &quot;A String&quot;, # The backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800151}
Bu Sun Kim65020912020-05-20 12:08:20 -0700152
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700153 backupId: string, Required. The id of the backup to be created. The `backup_id` appended to `parent` forms the full backup name of the form `projects//instances//backups/`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800154 encryptionConfig_encryptionType: string, Required. The encryption type of the backup.
155 Allowed values
156 ENCRYPTION_TYPE_UNSPECIFIED - Unspecified. Do not use.
157 USE_DATABASE_ENCRYPTION - Use the same encryption configuration as the database. This is the default option when encryption_config is empty. For example, if the database is using `Customer_Managed_Encryption`, the backup will be using the same Cloud KMS key as the database.
158 GOOGLE_DEFAULT_ENCRYPTION - Use Google default encryption.
159 CUSTOMER_MANAGED_ENCRYPTION - Use customer managed encryption. If specified, `kms_key_name` must contain a valid Cloud KMS key.
160 encryptionConfig_kmsKeyName: string, Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 x__xgafv: string, V1 error format.
162 Allowed values
163 1 - v1 error format
164 2 - v2 error format
165
166Returns:
167 An object of the form:
168
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700169 { # This resource represents a long-running operation that is the result of a network API call.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800170 &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.
171 &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.
172 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
173 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
174 {
175 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
176 },
177 ],
178 &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.
179 },
180 &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.
181 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
182 },
183 &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}`.
184 &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`.
185 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
186 },
187}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700188</div>
189
190<div class="method">
191 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
192 <pre>Deletes a pending or completed Backup.
193
194Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700195 name: string, Required. Name of the backup to delete. Values are of the form `projects//instances//backups/`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700196 x__xgafv: string, V1 error format.
197 Allowed values
198 1 - v1 error format
199 2 - v2 error format
200
201Returns:
202 An object of the form:
203
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700204 { # 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 -0800205}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700206</div>
207
208<div class="method">
209 <code class="details" id="get">get(name, x__xgafv=None)</code>
210 <pre>Gets metadata on a pending or completed Backup.
211
212Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700213 name: string, Required. Name of the backup. Values are of the form `projects//instances//backups/`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 x__xgafv: string, V1 error format.
215 Allowed values
216 1 - v1 error format
217 2 - v2 error format
218
219Returns:
220 An object of the form:
221
222 { # A backup of a Cloud Spanner database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800223 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800224 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800225 &quot;encryptionInfo&quot;: { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup.
226 &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.
227 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
228 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
229 {
230 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
231 },
232 ],
233 &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.
234 },
235 &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
236 &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
237 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800238 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
239 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.
240 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed.
241 &quot;A String&quot;,
242 ],
243 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
244 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800245 &quot;versionTime&quot;: &quot;A String&quot;, # The backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800246}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700247</div>
248
249<div class="method">
250 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700251 <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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252
253Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700254 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 Kim65020912020-05-20 12:08:20 -0700255 body: object, The request body.
256 The object takes the form of:
257
258{ # Request message for `GetIamPolicy` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800259 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
260 &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).
261 },
262}
Bu Sun Kim65020912020-05-20 12:08:20 -0700263
264 x__xgafv: string, V1 error format.
265 Allowed values
266 1 - v1 error format
267 2 - v2 error format
268
269Returns:
270 An object of the form:
271
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700272 { # 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 -0800273 &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.
274 { # Associates `members` with a `role`.
275 &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).
276 &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.
277 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
278 &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.
279 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800281 &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`.
282 &quot;A String&quot;,
283 ],
284 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
285 },
286 ],
287 &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.
288 &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).
289}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700290</div>
291
292<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800293 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700294 <pre>Lists completed and pending backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700295
296Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700297 parent: string, Required. The instance to list backups from. Values are of the form `projects//instances/`. (required)
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800298 filter: string, An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `&lt;`, `&gt;`, `&lt;=`, `&gt;=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: * `name` * `database` * `state` * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup&#x27;s name contains the string &quot;howl&quot;. * `database:prod` - The database&#x27;s name contains the string &quot;prod&quot;. * `state:CREATING` - The backup is pending creation. * `state:READY` - The backup is fully created and ready for use. * `(name:howl) AND (create_time &lt; \&quot;2018-03-28T14:50:00Z\&quot;)` - The backup name contains the string &quot;howl&quot; and `create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time &lt; \&quot;2018-03-28T14:50:00Z\&quot;` - The backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes &gt; 10000000000` - The backup&#x27;s size is greater than 10GB
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800299 pageSize: integer, Number of backups to be returned in the response. If 0 or less, defaults to the server&#x27;s maximum allowed page size.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800300 pageToken: string, If non-empty, `page_token` should contain a next_page_token from a previous ListBackupsResponse to the same `parent` and with the same `filter`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 x__xgafv: string, V1 error format.
302 Allowed values
303 1 - v1 error format
304 2 - v2 error format
305
306Returns:
307 An object of the form:
308
309 { # The response for ListBackups.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800310 &quot;backups&quot;: [ # The list of matching backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`.
311 { # A backup of a Cloud Spanner database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800312 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800313 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800314 &quot;encryptionInfo&quot;: { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup.
315 &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.
316 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
317 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
318 {
319 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
320 },
321 ],
322 &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.
323 },
324 &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
325 &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
326 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800327 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
328 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.
329 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed.
330 &quot;A String&quot;,
331 ],
332 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
333 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800334 &quot;versionTime&quot;: &quot;A String&quot;, # The backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800335 },
336 ],
337 &quot;nextPageToken&quot;: &quot;A String&quot;, # `next_page_token` can be sent in a subsequent ListBackups call to fetch more of the matching backups.
338}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700339</div>
340
341<div class="method">
342 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
343 <pre>Retrieves the next page of results.
344
345Args:
346 previous_request: The request for the previous page. (required)
347 previous_response: The response from the request for the previous page. (required)
348
349Returns:
350 A request object that you can call &#x27;execute()&#x27; on to request the next
351 page. Returns None if there are no more items in the collection.
352 </pre>
353</div>
354
355<div class="method">
356 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
357 <pre>Updates a pending or completed Backup.
358
359Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700360 name: string, Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 body: object, The request body.
362 The object takes the form of:
363
364{ # A backup of a Cloud Spanner database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800365 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800366 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800367 &quot;encryptionInfo&quot;: { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup.
368 &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.
369 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
370 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
371 {
372 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
373 },
374 ],
375 &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.
376 },
377 &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
378 &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
379 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800380 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
381 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.
382 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed.
383 &quot;A String&quot;,
384 ],
385 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
386 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800387 &quot;versionTime&quot;: &quot;A String&quot;, # The backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800388}
Bu Sun Kim65020912020-05-20 12:08:20 -0700389
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700390 updateMask: string, Required. A mask specifying which fields (e.g. `expire_time`) in the Backup resource should be updated. This mask is relative to the Backup resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally by clients that do not know about them.
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 x__xgafv: string, V1 error format.
392 Allowed values
393 1 - v1 error format
394 2 - v2 error format
395
396Returns:
397 An object of the form:
398
399 { # A backup of a Cloud Spanner database.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800400 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800401 &quot;database&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800402 &quot;encryptionInfo&quot;: { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup.
403 &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.
404 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
405 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
406 {
407 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
408 },
409 ],
410 &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.
411 },
412 &quot;encryptionType&quot;: &quot;A String&quot;, # Output only. The type of encryption.
413 &quot;kmsKeyVersion&quot;: &quot;A String&quot;, # Output only. A Cloud KMS key version that is being used to protect the database or backup.
414 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800415 &quot;expireTime&quot;: &quot;A String&quot;, # Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
416 &quot;name&quot;: &quot;A String&quot;, # Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.
417 &quot;referencingDatabases&quot;: [ # Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed.
418 &quot;A String&quot;,
419 ],
420 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. Size of the backup in bytes.
421 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of the backup.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800422 &quot;versionTime&quot;: &quot;A String&quot;, # The backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800423}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700424</div>
425
426<div class="method">
427 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700428 <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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700429
430Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700431 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)
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 body: object, The request body.
433 The object takes the form of:
434
435{ # Request message for `SetIamPolicy` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800436 &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.
437 &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.
438 { # Associates `members` with a `role`.
439 &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).
440 &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.
441 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
442 &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.
443 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700444 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800445 &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`.
446 &quot;A String&quot;,
447 ],
448 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
449 },
450 ],
451 &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.
452 &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).
453 },
454}
Bu Sun Kim65020912020-05-20 12:08:20 -0700455
456 x__xgafv: string, V1 error format.
457 Allowed values
458 1 - v1 error format
459 2 - v2 error format
460
461Returns:
462 An object of the form:
463
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700464 { # 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 -0800465 &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.
466 { # Associates `members` with a `role`.
467 &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).
468 &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.
469 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
470 &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.
471 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800473 &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`.
474 &quot;A String&quot;,
475 ],
476 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
477 },
478 ],
479 &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.
480 &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).
481}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700482</div>
483
484<div class="method">
485 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700486 <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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700487
488Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700489 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)
Bu Sun Kim65020912020-05-20 12:08:20 -0700490 body: object, The request body.
491 The object takes the form of:
492
493{ # Request message for `TestIamPermissions` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800494 &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.
495 &quot;A String&quot;,
496 ],
497}
Bu Sun Kim65020912020-05-20 12:08:20 -0700498
499 x__xgafv: string, V1 error format.
500 Allowed values
501 1 - v1 error format
502 2 - v2 error format
503
504Returns:
505 An object of the form:
506
507 { # Response message for `TestIamPermissions` method.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800508 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
509 &quot;A String&quot;,
510 ],
511}</pre>
Bu Sun Kim65020912020-05-20 12:08:20 -0700512</div>
513
514</body></html>