| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1 | <html><body> | 
|  | 2 | <style> | 
|  | 3 |  | 
|  | 4 | body, 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 |  | 
|  | 15 | body { | 
|  | 16 | font-size: 13px; | 
|  | 17 | padding: 1em; | 
|  | 18 | } | 
|  | 19 |  | 
|  | 20 | h1 { | 
|  | 21 | font-size: 26px; | 
|  | 22 | margin-bottom: 1em; | 
|  | 23 | } | 
|  | 24 |  | 
|  | 25 | h2 { | 
|  | 26 | font-size: 24px; | 
|  | 27 | margin-bottom: 1em; | 
|  | 28 | } | 
|  | 29 |  | 
|  | 30 | h3 { | 
|  | 31 | font-size: 20px; | 
|  | 32 | margin-bottom: 1em; | 
|  | 33 | margin-top: 1em; | 
|  | 34 | } | 
|  | 35 |  | 
|  | 36 | pre, code { | 
|  | 37 | line-height: 1.5; | 
|  | 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; | 
|  | 39 | } | 
|  | 40 |  | 
|  | 41 | pre { | 
|  | 42 | margin-top: 0.5em; | 
|  | 43 | } | 
|  | 44 |  | 
|  | 45 | h1, h2, h3, p { | 
|  | 46 | font-family: Arial, sans serif; | 
|  | 47 | } | 
|  | 48 |  | 
|  | 49 | h1, 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"> | 
|  | 83 | <code><a href="#create">create(parent, body=None, backupId=None, x__xgafv=None)</a></code></p> | 
|  | 84 | <p class="firstline">Starts creating a new Cloud Spanner Backup.</p> | 
|  | 85 | <p class="toc_element"> | 
|  | 86 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> | 
|  | 87 | <p class="firstline">Deletes a pending or completed Backup.</p> | 
|  | 88 | <p class="toc_element"> | 
|  | 89 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> | 
|  | 90 | <p class="firstline">Gets metadata on a pending or completed Backup.</p> | 
|  | 91 | <p class="toc_element"> | 
|  | 92 | <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> | 
|  | 93 | <p class="firstline">Gets the access control policy for a database or backup resource.</p> | 
|  | 94 | <p class="toc_element"> | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 95 | <code><a href="#list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</a></code></p> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 96 | <p class="firstline">Lists completed and pending backups.</p> | 
|  | 97 | <p class="toc_element"> | 
|  | 98 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> | 
|  | 99 | <p class="firstline">Retrieves the next page of results.</p> | 
|  | 100 | <p class="toc_element"> | 
|  | 101 | <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> | 
|  | 102 | <p class="firstline">Updates a pending or completed Backup.</p> | 
|  | 103 | <p class="toc_element"> | 
|  | 104 | <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> | 
|  | 105 | <p class="firstline">Sets the access control policy on a database or backup resource.</p> | 
|  | 106 | <p class="toc_element"> | 
|  | 107 | <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> | 
|  | 108 | <p class="firstline">Returns permissions that the caller has on the specified database or backup</p> | 
|  | 109 | <h3>Method Details</h3> | 
|  | 110 | <div class="method"> | 
|  | 111 | <code class="details" id="create">create(parent, body=None, backupId=None, x__xgafv=None)</code> | 
|  | 112 | <pre>Starts creating a new Cloud Spanner Backup. | 
|  | 113 | The returned backup long-running operation | 
|  | 114 | will have a name of the format | 
|  | 115 | `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>` | 
|  | 116 | and can be used to track creation of the backup. The | 
|  | 117 | metadata field type is | 
|  | 118 | CreateBackupMetadata. The | 
|  | 119 | response field type is | 
|  | 120 | Backup, if successful. Cancelling the returned operation will stop the | 
|  | 121 | creation and delete the backup. | 
|  | 122 | There can be only one pending backup creation per database. Backup creation | 
|  | 123 | of different databases can run concurrently. | 
|  | 124 |  | 
|  | 125 | Args: | 
|  | 126 | parent: string, Required. The name of the instance in which the backup will be | 
|  | 127 | created. This must be the same instance that contains the database the | 
|  | 128 | backup will be created from. The backup will be stored in the | 
|  | 129 | location(s) specified in the instance configuration of this | 
|  | 130 | instance. Values are of the form | 
|  | 131 | `projects/<project>/instances/<instance>`. (required) | 
|  | 132 | body: object, The request body. | 
|  | 133 | The object takes the form of: | 
|  | 134 |  | 
|  | 135 | { # A backup of a Cloud Spanner database. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 136 | "createTime": "A String", # Output only. The backup will contain an externally consistent | 
|  | 137 | # copy of the database at the timestamp specified by | 
|  | 138 | # `create_time`. `create_time` is approximately the time the | 
|  | 139 | # CreateBackup request is received. | 
|  | 140 | "state": "A String", # Output only. The current state of the backup. | 
|  | 141 | "database": "A String", # Required for the CreateBackup operation. | 
|  | 142 | # Name of the database from which this backup was | 
|  | 143 | # created. This needs to be in the same instance as the backup. | 
|  | 144 | # Values are of the form | 
|  | 145 | # `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 146 | "expireTime": "A String", # Required for the CreateBackup | 
|  | 147 | # operation. The expiration time of the backup, with microseconds | 
|  | 148 | # granularity that must be at least 6 hours and at most 366 days | 
|  | 149 | # from the time the CreateBackup request is processed. Once the `expire_time` | 
|  | 150 | # has passed, the backup is eligible to be automatically deleted by Cloud | 
|  | 151 | # Spanner to free the resources used by the backup. | 
|  | 152 | "referencingDatabases": [ # Output only. The names of the restored databases that reference the backup. | 
|  | 153 | # The database names are of | 
|  | 154 | # the form `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 155 | # Referencing databases may exist in different instances. The existence of | 
|  | 156 | # any referencing database prevents the backup from being deleted. When a | 
|  | 157 | # restored database from the backup enters the `READY` state, the reference | 
|  | 158 | # to the backup is removed. | 
|  | 159 | "A String", | 
|  | 160 | ], | 
|  | 161 | "sizeBytes": "A String", # Output only. Size of the backup in bytes. | 
|  | 162 | "name": "A String", # Output only for the CreateBackup operation. | 
|  | 163 | # Required for the UpdateBackup operation. | 
|  | 164 | # | 
|  | 165 | # A globally unique identifier for the backup which cannot be | 
|  | 166 | # changed. Values are of the form | 
|  | 167 | # `projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]` | 
|  | 168 | # The final segment of the name must be between 2 and 60 characters | 
|  | 169 | # in length. | 
|  | 170 | # | 
|  | 171 | # The backup is stored in the location(s) specified in the instance | 
|  | 172 | # configuration of the instance containing the backup, identified | 
|  | 173 | # by the prefix of the backup name of the form | 
|  | 174 | # `projects/<project>/instances/<instance>`. | 
|  | 175 | } | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 176 |  | 
|  | 177 | backupId: string, Required. The id of the backup to be created. The `backup_id` appended to | 
|  | 178 | `parent` forms the full backup name of the form | 
|  | 179 | `projects/<project>/instances/<instance>/backups/<backup_id>`. | 
|  | 180 | x__xgafv: string, V1 error format. | 
|  | 181 | Allowed values | 
|  | 182 | 1 - v1 error format | 
|  | 183 | 2 - v2 error format | 
|  | 184 |  | 
|  | 185 | Returns: | 
|  | 186 | An object of the form: | 
|  | 187 |  | 
|  | 188 | { # This resource represents a long-running operation that is the result of a | 
|  | 189 | # network API call. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 190 | "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. | 
|  | 191 | # different programming environments, including REST APIs and RPC APIs. It is | 
|  | 192 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
|  | 193 | # three pieces of data: error code, error message, and error details. | 
|  | 194 | # | 
|  | 195 | # You can find out more about this error model and how to work with it in the | 
|  | 196 | # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
|  | 197 | "details": [ # A list of messages that carry the error details.  There is a common set of | 
|  | 198 | # message types for APIs to use. | 
|  | 199 | { | 
|  | 200 | "a_key": "", # Properties of the object. Contains field @type with type URL. | 
|  | 201 | }, | 
|  | 202 | ], | 
|  | 203 | "message": "A String", # A developer-facing error message, which should be in English. Any | 
|  | 204 | # user-facing error message should be localized and sent in the | 
|  | 205 | # google.rpc.Status.details field, or localized by the client. | 
|  | 206 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
|  | 207 | }, | 
|  | 208 | "metadata": { # Service-specific metadata associated with the operation.  It typically | 
|  | 209 | # contains progress information and common metadata such as create time. | 
|  | 210 | # Some services might not provide such metadata.  Any method that returns a | 
|  | 211 | # long-running operation should document the metadata type, if any. | 
|  | 212 | "a_key": "", # Properties of the object. Contains field @type with type URL. | 
|  | 213 | }, | 
|  | 214 | "name": "A String", # The server-assigned name, which is only unique within the same service that | 
|  | 215 | # originally returns it. If you use the default HTTP mapping, the | 
|  | 216 | # `name` should be a resource name ending with `operations/{unique_id}`. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 217 | "done": True or False, # If the value is `false`, it means the operation is still in progress. | 
|  | 218 | # If `true`, the operation is completed, and either `error` or `response` is | 
|  | 219 | # available. | 
|  | 220 | "response": { # The normal response of the operation in case of success.  If the original | 
|  | 221 | # method returns no data on success, such as `Delete`, the response is | 
|  | 222 | # `google.protobuf.Empty`.  If the original method is standard | 
|  | 223 | # `Get`/`Create`/`Update`, the response should be the resource.  For other | 
|  | 224 | # methods, the response should have the type `XxxResponse`, where `Xxx` | 
|  | 225 | # is the original method name.  For example, if the original method name | 
|  | 226 | # is `TakeSnapshot()`, the inferred response type is | 
|  | 227 | # `TakeSnapshotResponse`. | 
|  | 228 | "a_key": "", # Properties of the object. Contains field @type with type URL. | 
|  | 229 | }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 230 | }</pre> | 
|  | 231 | </div> | 
|  | 232 |  | 
|  | 233 | <div class="method"> | 
|  | 234 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> | 
|  | 235 | <pre>Deletes a pending or completed Backup. | 
|  | 236 |  | 
|  | 237 | Args: | 
|  | 238 | name: string, Required. Name of the backup to delete. | 
|  | 239 | Values are of the form | 
|  | 240 | `projects/<project>/instances/<instance>/backups/<backup>`. (required) | 
|  | 241 | x__xgafv: string, V1 error format. | 
|  | 242 | Allowed values | 
|  | 243 | 1 - v1 error format | 
|  | 244 | 2 - v2 error format | 
|  | 245 |  | 
|  | 246 | Returns: | 
|  | 247 | An object of the form: | 
|  | 248 |  | 
|  | 249 | { # A generic empty message that you can re-use to avoid defining duplicated | 
|  | 250 | # empty messages in your APIs. A typical example is to use it as the request | 
|  | 251 | # or the response type of an API method. For instance: | 
|  | 252 | # | 
|  | 253 | #     service Foo { | 
|  | 254 | #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 
|  | 255 | #     } | 
|  | 256 | # | 
|  | 257 | # The JSON representation for `Empty` is empty JSON object `{}`. | 
|  | 258 | }</pre> | 
|  | 259 | </div> | 
|  | 260 |  | 
|  | 261 | <div class="method"> | 
|  | 262 | <code class="details" id="get">get(name, x__xgafv=None)</code> | 
|  | 263 | <pre>Gets metadata on a pending or completed Backup. | 
|  | 264 |  | 
|  | 265 | Args: | 
|  | 266 | name: string, Required. Name of the backup. | 
|  | 267 | Values are of the form | 
|  | 268 | `projects/<project>/instances/<instance>/backups/<backup>`. (required) | 
|  | 269 | x__xgafv: string, V1 error format. | 
|  | 270 | Allowed values | 
|  | 271 | 1 - v1 error format | 
|  | 272 | 2 - v2 error format | 
|  | 273 |  | 
|  | 274 | Returns: | 
|  | 275 | An object of the form: | 
|  | 276 |  | 
|  | 277 | { # A backup of a Cloud Spanner database. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 278 | "createTime": "A String", # Output only. The backup will contain an externally consistent | 
|  | 279 | # copy of the database at the timestamp specified by | 
|  | 280 | # `create_time`. `create_time` is approximately the time the | 
|  | 281 | # CreateBackup request is received. | 
|  | 282 | "state": "A String", # Output only. The current state of the backup. | 
|  | 283 | "database": "A String", # Required for the CreateBackup operation. | 
|  | 284 | # Name of the database from which this backup was | 
|  | 285 | # created. This needs to be in the same instance as the backup. | 
|  | 286 | # Values are of the form | 
|  | 287 | # `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 288 | "expireTime": "A String", # Required for the CreateBackup | 
|  | 289 | # operation. The expiration time of the backup, with microseconds | 
|  | 290 | # granularity that must be at least 6 hours and at most 366 days | 
|  | 291 | # from the time the CreateBackup request is processed. Once the `expire_time` | 
|  | 292 | # has passed, the backup is eligible to be automatically deleted by Cloud | 
|  | 293 | # Spanner to free the resources used by the backup. | 
|  | 294 | "referencingDatabases": [ # Output only. The names of the restored databases that reference the backup. | 
|  | 295 | # The database names are of | 
|  | 296 | # the form `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 297 | # Referencing databases may exist in different instances. The existence of | 
|  | 298 | # any referencing database prevents the backup from being deleted. When a | 
|  | 299 | # restored database from the backup enters the `READY` state, the reference | 
|  | 300 | # to the backup is removed. | 
|  | 301 | "A String", | 
|  | 302 | ], | 
|  | 303 | "sizeBytes": "A String", # Output only. Size of the backup in bytes. | 
|  | 304 | "name": "A String", # Output only for the CreateBackup operation. | 
|  | 305 | # Required for the UpdateBackup operation. | 
|  | 306 | # | 
|  | 307 | # A globally unique identifier for the backup which cannot be | 
|  | 308 | # changed. Values are of the form | 
|  | 309 | # `projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]` | 
|  | 310 | # The final segment of the name must be between 2 and 60 characters | 
|  | 311 | # in length. | 
|  | 312 | # | 
|  | 313 | # The backup is stored in the location(s) specified in the instance | 
|  | 314 | # configuration of the instance containing the backup, identified | 
|  | 315 | # by the prefix of the backup name of the form | 
|  | 316 | # `projects/<project>/instances/<instance>`. | 
|  | 317 | }</pre> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 318 | </div> | 
|  | 319 |  | 
|  | 320 | <div class="method"> | 
|  | 321 | <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code> | 
|  | 322 | <pre>Gets the access control policy for a database or backup resource. | 
|  | 323 | Returns an empty policy if a database or backup exists but does not have a | 
|  | 324 | policy set. | 
|  | 325 |  | 
|  | 326 | Authorization requires `spanner.databases.getIamPolicy` permission on | 
|  | 327 | resource. | 
|  | 328 | For backups, authorization requires `spanner.backups.getIamPolicy` | 
|  | 329 | permission on resource. | 
|  | 330 |  | 
|  | 331 | Args: | 
|  | 332 | resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for database resources. (required) | 
|  | 333 | body: object, The request body. | 
|  | 334 | The object takes the form of: | 
|  | 335 |  | 
|  | 336 | { # Request message for `GetIamPolicy` method. | 
|  | 337 | "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to | 
|  | 338 | # `GetIamPolicy`. | 
|  | 339 | "requestedPolicyVersion": 42, # Optional. The policy format version to be returned. | 
|  | 340 | # | 
|  | 341 | # Valid values are 0, 1, and 3. Requests specifying an invalid value will be | 
|  | 342 | # rejected. | 
|  | 343 | # | 
|  | 344 | # Requests for policies with any conditional bindings must specify version 3. | 
|  | 345 | # Policies without any conditional bindings may specify any valid value or | 
|  | 346 | # leave the field unset. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 347 | # | 
|  | 348 | # To learn which resources support conditions in their IAM policies, see the | 
|  | 349 | # [IAM | 
|  | 350 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 351 | }, | 
|  | 352 | } | 
|  | 353 |  | 
|  | 354 | x__xgafv: string, V1 error format. | 
|  | 355 | Allowed values | 
|  | 356 | 1 - v1 error format | 
|  | 357 | 2 - v2 error format | 
|  | 358 |  | 
|  | 359 | Returns: | 
|  | 360 | An object of the form: | 
|  | 361 |  | 
|  | 362 | { # An Identity and Access Management (IAM) policy, which specifies access | 
|  | 363 | # controls for Google Cloud resources. | 
|  | 364 | # | 
|  | 365 | # | 
|  | 366 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more | 
|  | 367 | # `members` to a single `role`. Members can be user accounts, service accounts, | 
|  | 368 | # Google groups, and domains (such as G Suite). A `role` is a named list of | 
|  | 369 | # permissions; each `role` can be an IAM predefined role or a user-created | 
|  | 370 | # custom role. | 
|  | 371 | # | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 372 | # For some types of Google Cloud resources, a `binding` can also specify a | 
|  | 373 | # `condition`, which is a logical expression that allows access to a resource | 
|  | 374 | # only if the expression evaluates to `true`. A condition can add constraints | 
|  | 375 | # based on attributes of the request, the resource, or both. To learn which | 
|  | 376 | # resources support conditions in their IAM policies, see the | 
|  | 377 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 378 | # | 
|  | 379 | # **JSON example:** | 
|  | 380 | # | 
|  | 381 | #     { | 
|  | 382 | #       "bindings": [ | 
|  | 383 | #         { | 
|  | 384 | #           "role": "roles/resourcemanager.organizationAdmin", | 
|  | 385 | #           "members": [ | 
|  | 386 | #             "user:mike@example.com", | 
|  | 387 | #             "group:admins@example.com", | 
|  | 388 | #             "domain:google.com", | 
|  | 389 | #             "serviceAccount:my-project-id@appspot.gserviceaccount.com" | 
|  | 390 | #           ] | 
|  | 391 | #         }, | 
|  | 392 | #         { | 
|  | 393 | #           "role": "roles/resourcemanager.organizationViewer", | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 394 | #           "members": [ | 
|  | 395 | #             "user:eve@example.com" | 
|  | 396 | #           ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 397 | #           "condition": { | 
|  | 398 | #             "title": "expirable access", | 
|  | 399 | #             "description": "Does not grant access after Sep 2020", | 
|  | 400 | #             "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", | 
|  | 401 | #           } | 
|  | 402 | #         } | 
|  | 403 | #       ], | 
|  | 404 | #       "etag": "BwWWja0YfJA=", | 
|  | 405 | #       "version": 3 | 
|  | 406 | #     } | 
|  | 407 | # | 
|  | 408 | # **YAML example:** | 
|  | 409 | # | 
|  | 410 | #     bindings: | 
|  | 411 | #     - members: | 
|  | 412 | #       - user:mike@example.com | 
|  | 413 | #       - group:admins@example.com | 
|  | 414 | #       - domain:google.com | 
|  | 415 | #       - serviceAccount:my-project-id@appspot.gserviceaccount.com | 
|  | 416 | #       role: roles/resourcemanager.organizationAdmin | 
|  | 417 | #     - members: | 
|  | 418 | #       - user:eve@example.com | 
|  | 419 | #       role: roles/resourcemanager.organizationViewer | 
|  | 420 | #       condition: | 
|  | 421 | #         title: expirable access | 
|  | 422 | #         description: Does not grant access after Sep 2020 | 
|  | 423 | #         expression: request.time < timestamp('2020-10-01T00:00:00.000Z') | 
|  | 424 | #     - etag: BwWWja0YfJA= | 
|  | 425 | #     - version: 3 | 
|  | 426 | # | 
|  | 427 | # For a description of IAM and its features, see the | 
|  | 428 | # [IAM documentation](https://cloud.google.com/iam/docs/). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 429 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a | 
|  | 430 | # `condition` that determines how and when the `bindings` are applied. Each | 
|  | 431 | # of the `bindings` must contain at least one member. | 
|  | 432 | { # Associates `members` with a `role`. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 433 | "role": "A String", # Role that is assigned to `members`. | 
|  | 434 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 435 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 436 | # | 
|  | 437 | # If the condition evaluates to `true`, then this binding applies to the | 
|  | 438 | # current request. | 
|  | 439 | # | 
|  | 440 | # If the condition evaluates to `false`, then this binding does not apply to | 
|  | 441 | # the current request. However, a different role binding might grant the same | 
|  | 442 | # role to one or more of the members in this binding. | 
|  | 443 | # | 
|  | 444 | # To learn which resources support conditions in their IAM policies, see the | 
|  | 445 | # [IAM | 
|  | 446 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 447 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL | 
|  | 448 | # are documented at https://github.com/google/cel-spec. | 
|  | 449 | # | 
|  | 450 | # Example (Comparison): | 
|  | 451 | # | 
|  | 452 | #     title: "Summary size limit" | 
|  | 453 | #     description: "Determines if a summary is less than 100 chars" | 
|  | 454 | #     expression: "document.summary.size() < 100" | 
|  | 455 | # | 
|  | 456 | # Example (Equality): | 
|  | 457 | # | 
|  | 458 | #     title: "Requestor is owner" | 
|  | 459 | #     description: "Determines if requestor is the document owner" | 
|  | 460 | #     expression: "document.owner == request.auth.claims.email" | 
|  | 461 | # | 
|  | 462 | # Example (Logic): | 
|  | 463 | # | 
|  | 464 | #     title: "Public documents" | 
|  | 465 | #     description: "Determine whether the document should be publicly visible" | 
|  | 466 | #     expression: "document.type != 'private' && document.type != 'internal'" | 
|  | 467 | # | 
|  | 468 | # Example (Data Manipulation): | 
|  | 469 | # | 
|  | 470 | #     title: "Notification string" | 
|  | 471 | #     description: "Create a notification string with a timestamp." | 
|  | 472 | #     expression: "'New message received at ' + string(document.create_time)" | 
|  | 473 | # | 
|  | 474 | # The exact variables and functions that may be referenced within an expression | 
|  | 475 | # are determined by the service that evaluates it. See the service | 
|  | 476 | # documentation for additional information. | 
|  | 477 | "location": "A String", # Optional. String indicating the location of the expression for error | 
|  | 478 | # reporting, e.g. a file name and a position in the file. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 479 | "expression": "A String", # Textual representation of an expression in Common Expression Language | 
|  | 480 | # syntax. | 
|  | 481 | "description": "A String", # Optional. Description of the expression. This is a longer text which | 
|  | 482 | # describes the expression, e.g. when hovered over it in a UI. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 483 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing | 
|  | 484 | # its purpose. This can be used e.g. in UIs which allow to enter the | 
|  | 485 | # expression. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 486 | }, | 
|  | 487 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. | 
|  | 488 | # `members` can have the following values: | 
|  | 489 | # | 
|  | 490 | # * `allUsers`: A special identifier that represents anyone who is | 
|  | 491 | #    on the internet; with or without a Google account. | 
|  | 492 | # | 
|  | 493 | # * `allAuthenticatedUsers`: A special identifier that represents anyone | 
|  | 494 | #    who is authenticated with a Google account or a service account. | 
|  | 495 | # | 
|  | 496 | # * `user:{emailid}`: An email address that represents a specific Google | 
|  | 497 | #    account. For example, `alice@example.com` . | 
|  | 498 | # | 
|  | 499 | # | 
|  | 500 | # * `serviceAccount:{emailid}`: An email address that represents a service | 
|  | 501 | #    account. For example, `my-other-app@appspot.gserviceaccount.com`. | 
|  | 502 | # | 
|  | 503 | # * `group:{emailid}`: An email address that represents a Google group. | 
|  | 504 | #    For example, `admins@example.com`. | 
|  | 505 | # | 
|  | 506 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique | 
|  | 507 | #    identifier) representing a user that has been recently deleted. For | 
|  | 508 | #    example, `alice@example.com?uid=123456789012345678901`. If the user is | 
|  | 509 | #    recovered, this value reverts to `user:{emailid}` and the recovered user | 
|  | 510 | #    retains the role in the binding. | 
|  | 511 | # | 
|  | 512 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus | 
|  | 513 | #    unique identifier) representing a service account that has been recently | 
|  | 514 | #    deleted. For example, | 
|  | 515 | #    `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. | 
|  | 516 | #    If the service account is undeleted, this value reverts to | 
|  | 517 | #    `serviceAccount:{emailid}` and the undeleted service account retains the | 
|  | 518 | #    role in the binding. | 
|  | 519 | # | 
|  | 520 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique | 
|  | 521 | #    identifier) representing a Google group that has been recently | 
|  | 522 | #    deleted. For example, `admins@example.com?uid=123456789012345678901`. If | 
|  | 523 | #    the group is recovered, this value reverts to `group:{emailid}` and the | 
|  | 524 | #    recovered group retains the role in the binding. | 
|  | 525 | # | 
|  | 526 | # | 
|  | 527 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the | 
|  | 528 | #    users of that domain. For example, `google.com` or `example.com`. | 
|  | 529 | # | 
|  | 530 | "A String", | 
|  | 531 | ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 532 | }, | 
|  | 533 | ], | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 534 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help | 
|  | 535 | # prevent simultaneous updates of a policy from overwriting each other. | 
|  | 536 | # It is strongly suggested that systems make use of the `etag` in the | 
|  | 537 | # read-modify-write cycle to perform policy updates in order to avoid race | 
|  | 538 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and | 
|  | 539 | # systems are expected to put that etag in the request to `setIamPolicy` to | 
|  | 540 | # ensure that their change will be applied to the same version of the policy. | 
|  | 541 | # | 
|  | 542 | # **Important:** If you use IAM Conditions, you must include the `etag` field | 
|  | 543 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows | 
|  | 544 | # you to overwrite a version `3` policy with a version `1` policy, and all of | 
|  | 545 | # the conditions in the version `3` policy are lost. | 
|  | 546 | "version": 42, # Specifies the format of the policy. | 
|  | 547 | # | 
|  | 548 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value | 
|  | 549 | # are rejected. | 
|  | 550 | # | 
|  | 551 | # Any operation that affects conditional role bindings must specify version | 
|  | 552 | # `3`. This requirement applies to the following operations: | 
|  | 553 | # | 
|  | 554 | # * Getting a policy that includes a conditional role binding | 
|  | 555 | # * Adding a conditional role binding to a policy | 
|  | 556 | # * Changing a conditional role binding in a policy | 
|  | 557 | # * Removing any role binding, with or without a condition, from a policy | 
|  | 558 | #   that includes conditions | 
|  | 559 | # | 
|  | 560 | # **Important:** If you use IAM Conditions, you must include the `etag` field | 
|  | 561 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows | 
|  | 562 | # you to overwrite a version `3` policy with a version `1` policy, and all of | 
|  | 563 | # the conditions in the version `3` policy are lost. | 
|  | 564 | # | 
|  | 565 | # If a policy does not include any conditions, operations on that policy may | 
|  | 566 | # specify any valid version or leave the field unset. | 
|  | 567 | # | 
|  | 568 | # To learn which resources support conditions in their IAM policies, see the | 
|  | 569 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 570 | }</pre> | 
|  | 571 | </div> | 
|  | 572 |  | 
|  | 573 | <div class="method"> | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 574 | <code class="details" id="list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</code> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 575 | <pre>Lists completed and pending backups. | 
|  | 576 | Backups returned are ordered by `create_time` in descending order, | 
|  | 577 | starting from the most recent `create_time`. | 
|  | 578 |  | 
|  | 579 | Args: | 
|  | 580 | parent: string, Required. The instance to list backups from.  Values are of the | 
|  | 581 | form `projects/<project>/instances/<instance>`. (required) | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 582 | pageSize: integer, Number of backups to be returned in the response. If 0 or | 
|  | 583 | less, defaults to the server's maximum allowed page size. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 584 | pageToken: string, If non-empty, `page_token` should contain a | 
|  | 585 | next_page_token from a | 
|  | 586 | previous ListBackupsResponse to the same `parent` and with the same | 
|  | 587 | `filter`. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 588 | filter: string, An expression that filters the list of returned backups. | 
|  | 589 |  | 
|  | 590 | A filter expression consists of a field name, a comparison operator, and a | 
|  | 591 | value for filtering. | 
|  | 592 | The value must be a string, a number, or a boolean. The comparison operator | 
|  | 593 | must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. | 
|  | 594 | Colon `:` is the contains operator. Filter rules are not case sensitive. | 
|  | 595 |  | 
|  | 596 | The following fields in the Backup are eligible for filtering: | 
|  | 597 |  | 
|  | 598 | * `name` | 
|  | 599 | * `database` | 
|  | 600 | * `state` | 
|  | 601 | * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | 
|  | 602 | * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) | 
|  | 603 | * `size_bytes` | 
|  | 604 |  | 
|  | 605 | You can combine multiple expressions by enclosing each expression in | 
|  | 606 | parentheses. By default, expressions are combined with AND logic, but | 
|  | 607 | you can specify AND, OR, and NOT logic explicitly. | 
|  | 608 |  | 
|  | 609 | Here are a few examples: | 
|  | 610 |  | 
|  | 611 | * `name:Howl` - The backup's name contains the string "howl". | 
|  | 612 | * `database:prod` | 
|  | 613 | - The database's name contains the string "prod". | 
|  | 614 | * `state:CREATING` - The backup is pending creation. | 
|  | 615 | * `state:READY` - The backup is fully created and ready for use. | 
|  | 616 | * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` | 
|  | 617 | - The backup name contains the string "howl" and `create_time` | 
|  | 618 | of the backup is before 2018-03-28T14:50:00Z. | 
|  | 619 | * `expire_time < \"2018-03-28T14:50:00Z\"` | 
|  | 620 | - The backup `expire_time` is before 2018-03-28T14:50:00Z. | 
|  | 621 | * `size_bytes > 10000000000` - The backup's size is greater than 10GB | 
|  | 622 | x__xgafv: string, V1 error format. | 
|  | 623 | Allowed values | 
|  | 624 | 1 - v1 error format | 
|  | 625 | 2 - v2 error format | 
|  | 626 |  | 
|  | 627 | Returns: | 
|  | 628 | An object of the form: | 
|  | 629 |  | 
|  | 630 | { # The response for ListBackups. | 
|  | 631 | "backups": [ # The list of matching backups. Backups returned are ordered by `create_time` | 
|  | 632 | # in descending order, starting from the most recent `create_time`. | 
|  | 633 | { # A backup of a Cloud Spanner database. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 634 | "createTime": "A String", # Output only. The backup will contain an externally consistent | 
|  | 635 | # copy of the database at the timestamp specified by | 
|  | 636 | # `create_time`. `create_time` is approximately the time the | 
|  | 637 | # CreateBackup request is received. | 
|  | 638 | "state": "A String", # Output only. The current state of the backup. | 
|  | 639 | "database": "A String", # Required for the CreateBackup operation. | 
|  | 640 | # Name of the database from which this backup was | 
|  | 641 | # created. This needs to be in the same instance as the backup. | 
|  | 642 | # Values are of the form | 
|  | 643 | # `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 644 | "expireTime": "A String", # Required for the CreateBackup | 
|  | 645 | # operation. The expiration time of the backup, with microseconds | 
|  | 646 | # granularity that must be at least 6 hours and at most 366 days | 
|  | 647 | # from the time the CreateBackup request is processed. Once the `expire_time` | 
|  | 648 | # has passed, the backup is eligible to be automatically deleted by Cloud | 
|  | 649 | # Spanner to free the resources used by the backup. | 
|  | 650 | "referencingDatabases": [ # Output only. The names of the restored databases that reference the backup. | 
|  | 651 | # The database names are of | 
|  | 652 | # the form `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 653 | # Referencing databases may exist in different instances. The existence of | 
|  | 654 | # any referencing database prevents the backup from being deleted. When a | 
|  | 655 | # restored database from the backup enters the `READY` state, the reference | 
|  | 656 | # to the backup is removed. | 
|  | 657 | "A String", | 
|  | 658 | ], | 
|  | 659 | "sizeBytes": "A String", # Output only. Size of the backup in bytes. | 
|  | 660 | "name": "A String", # Output only for the CreateBackup operation. | 
|  | 661 | # Required for the UpdateBackup operation. | 
|  | 662 | # | 
|  | 663 | # A globally unique identifier for the backup which cannot be | 
|  | 664 | # changed. Values are of the form | 
|  | 665 | # `projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]` | 
|  | 666 | # The final segment of the name must be between 2 and 60 characters | 
|  | 667 | # in length. | 
|  | 668 | # | 
|  | 669 | # The backup is stored in the location(s) specified in the instance | 
|  | 670 | # configuration of the instance containing the backup, identified | 
|  | 671 | # by the prefix of the backup name of the form | 
|  | 672 | # `projects/<project>/instances/<instance>`. | 
|  | 673 | }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 674 | ], | 
|  | 675 | "nextPageToken": "A String", # `next_page_token` can be sent in a subsequent | 
|  | 676 | # ListBackups call to fetch more | 
|  | 677 | # of the matching backups. | 
|  | 678 | }</pre> | 
|  | 679 | </div> | 
|  | 680 |  | 
|  | 681 | <div class="method"> | 
|  | 682 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> | 
|  | 683 | <pre>Retrieves the next page of results. | 
|  | 684 |  | 
|  | 685 | Args: | 
|  | 686 | previous_request: The request for the previous page. (required) | 
|  | 687 | previous_response: The response from the request for the previous page. (required) | 
|  | 688 |  | 
|  | 689 | Returns: | 
|  | 690 | A request object that you can call 'execute()' on to request the next | 
|  | 691 | page. Returns None if there are no more items in the collection. | 
|  | 692 | </pre> | 
|  | 693 | </div> | 
|  | 694 |  | 
|  | 695 | <div class="method"> | 
|  | 696 | <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> | 
|  | 697 | <pre>Updates a pending or completed Backup. | 
|  | 698 |  | 
|  | 699 | Args: | 
|  | 700 | name: string, Output only for the CreateBackup operation. | 
|  | 701 | Required for the UpdateBackup operation. | 
|  | 702 |  | 
|  | 703 | A globally unique identifier for the backup which cannot be | 
|  | 704 | changed. Values are of the form | 
|  | 705 | `projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]` | 
|  | 706 | The final segment of the name must be between 2 and 60 characters | 
|  | 707 | in length. | 
|  | 708 |  | 
|  | 709 | The backup is stored in the location(s) specified in the instance | 
|  | 710 | configuration of the instance containing the backup, identified | 
|  | 711 | by the prefix of the backup name of the form | 
|  | 712 | `projects/<project>/instances/<instance>`. (required) | 
|  | 713 | body: object, The request body. | 
|  | 714 | The object takes the form of: | 
|  | 715 |  | 
|  | 716 | { # A backup of a Cloud Spanner database. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 717 | "createTime": "A String", # Output only. The backup will contain an externally consistent | 
|  | 718 | # copy of the database at the timestamp specified by | 
|  | 719 | # `create_time`. `create_time` is approximately the time the | 
|  | 720 | # CreateBackup request is received. | 
|  | 721 | "state": "A String", # Output only. The current state of the backup. | 
|  | 722 | "database": "A String", # Required for the CreateBackup operation. | 
|  | 723 | # Name of the database from which this backup was | 
|  | 724 | # created. This needs to be in the same instance as the backup. | 
|  | 725 | # Values are of the form | 
|  | 726 | # `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 727 | "expireTime": "A String", # Required for the CreateBackup | 
|  | 728 | # operation. The expiration time of the backup, with microseconds | 
|  | 729 | # granularity that must be at least 6 hours and at most 366 days | 
|  | 730 | # from the time the CreateBackup request is processed. Once the `expire_time` | 
|  | 731 | # has passed, the backup is eligible to be automatically deleted by Cloud | 
|  | 732 | # Spanner to free the resources used by the backup. | 
|  | 733 | "referencingDatabases": [ # Output only. The names of the restored databases that reference the backup. | 
|  | 734 | # The database names are of | 
|  | 735 | # the form `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 736 | # Referencing databases may exist in different instances. The existence of | 
|  | 737 | # any referencing database prevents the backup from being deleted. When a | 
|  | 738 | # restored database from the backup enters the `READY` state, the reference | 
|  | 739 | # to the backup is removed. | 
|  | 740 | "A String", | 
|  | 741 | ], | 
|  | 742 | "sizeBytes": "A String", # Output only. Size of the backup in bytes. | 
|  | 743 | "name": "A String", # Output only for the CreateBackup operation. | 
|  | 744 | # Required for the UpdateBackup operation. | 
|  | 745 | # | 
|  | 746 | # A globally unique identifier for the backup which cannot be | 
|  | 747 | # changed. Values are of the form | 
|  | 748 | # `projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]` | 
|  | 749 | # The final segment of the name must be between 2 and 60 characters | 
|  | 750 | # in length. | 
|  | 751 | # | 
|  | 752 | # The backup is stored in the location(s) specified in the instance | 
|  | 753 | # configuration of the instance containing the backup, identified | 
|  | 754 | # by the prefix of the backup name of the form | 
|  | 755 | # `projects/<project>/instances/<instance>`. | 
|  | 756 | } | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 757 |  | 
|  | 758 | updateMask: string, Required. A mask specifying which fields (e.g. `expire_time`) in the | 
|  | 759 | Backup resource should be updated. This mask is relative to the Backup | 
|  | 760 | resource, not to the request message. The field mask must always be | 
|  | 761 | specified; this prevents any future fields from being erased accidentally | 
|  | 762 | by clients that do not know about them. | 
|  | 763 | x__xgafv: string, V1 error format. | 
|  | 764 | Allowed values | 
|  | 765 | 1 - v1 error format | 
|  | 766 | 2 - v2 error format | 
|  | 767 |  | 
|  | 768 | Returns: | 
|  | 769 | An object of the form: | 
|  | 770 |  | 
|  | 771 | { # A backup of a Cloud Spanner database. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 772 | "createTime": "A String", # Output only. The backup will contain an externally consistent | 
|  | 773 | # copy of the database at the timestamp specified by | 
|  | 774 | # `create_time`. `create_time` is approximately the time the | 
|  | 775 | # CreateBackup request is received. | 
|  | 776 | "state": "A String", # Output only. The current state of the backup. | 
|  | 777 | "database": "A String", # Required for the CreateBackup operation. | 
|  | 778 | # Name of the database from which this backup was | 
|  | 779 | # created. This needs to be in the same instance as the backup. | 
|  | 780 | # Values are of the form | 
|  | 781 | # `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 782 | "expireTime": "A String", # Required for the CreateBackup | 
|  | 783 | # operation. The expiration time of the backup, with microseconds | 
|  | 784 | # granularity that must be at least 6 hours and at most 366 days | 
|  | 785 | # from the time the CreateBackup request is processed. Once the `expire_time` | 
|  | 786 | # has passed, the backup is eligible to be automatically deleted by Cloud | 
|  | 787 | # Spanner to free the resources used by the backup. | 
|  | 788 | "referencingDatabases": [ # Output only. The names of the restored databases that reference the backup. | 
|  | 789 | # The database names are of | 
|  | 790 | # the form `projects/<project>/instances/<instance>/databases/<database>`. | 
|  | 791 | # Referencing databases may exist in different instances. The existence of | 
|  | 792 | # any referencing database prevents the backup from being deleted. When a | 
|  | 793 | # restored database from the backup enters the `READY` state, the reference | 
|  | 794 | # to the backup is removed. | 
|  | 795 | "A String", | 
|  | 796 | ], | 
|  | 797 | "sizeBytes": "A String", # Output only. Size of the backup in bytes. | 
|  | 798 | "name": "A String", # Output only for the CreateBackup operation. | 
|  | 799 | # Required for the UpdateBackup operation. | 
|  | 800 | # | 
|  | 801 | # A globally unique identifier for the backup which cannot be | 
|  | 802 | # changed. Values are of the form | 
|  | 803 | # `projects/<project>/instances/<instance>/backups/a-z*[a-z0-9]` | 
|  | 804 | # The final segment of the name must be between 2 and 60 characters | 
|  | 805 | # in length. | 
|  | 806 | # | 
|  | 807 | # The backup is stored in the location(s) specified in the instance | 
|  | 808 | # configuration of the instance containing the backup, identified | 
|  | 809 | # by the prefix of the backup name of the form | 
|  | 810 | # `projects/<project>/instances/<instance>`. | 
|  | 811 | }</pre> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 812 | </div> | 
|  | 813 |  | 
|  | 814 | <div class="method"> | 
|  | 815 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> | 
|  | 816 | <pre>Sets the access control policy on a database or backup resource. | 
|  | 817 | Replaces any existing policy. | 
|  | 818 |  | 
|  | 819 | Authorization requires `spanner.databases.setIamPolicy` | 
|  | 820 | permission on resource. | 
|  | 821 | For backups, authorization requires `spanner.backups.setIamPolicy` | 
|  | 822 | permission on resource. | 
|  | 823 |  | 
|  | 824 | Args: | 
|  | 825 | resource: string, REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for databases resources. (required) | 
|  | 826 | body: object, The request body. | 
|  | 827 | The object takes the form of: | 
|  | 828 |  | 
|  | 829 | { # Request message for `SetIamPolicy` method. | 
|  | 830 | "policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of | 
|  | 831 | # the policy is limited to a few 10s of KB. An empty policy is a | 
|  | 832 | # valid policy but certain Cloud Platform services (such as Projects) | 
|  | 833 | # might reject them. | 
|  | 834 | # controls for Google Cloud resources. | 
|  | 835 | # | 
|  | 836 | # | 
|  | 837 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more | 
|  | 838 | # `members` to a single `role`. Members can be user accounts, service accounts, | 
|  | 839 | # Google groups, and domains (such as G Suite). A `role` is a named list of | 
|  | 840 | # permissions; each `role` can be an IAM predefined role or a user-created | 
|  | 841 | # custom role. | 
|  | 842 | # | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 843 | # For some types of Google Cloud resources, a `binding` can also specify a | 
|  | 844 | # `condition`, which is a logical expression that allows access to a resource | 
|  | 845 | # only if the expression evaluates to `true`. A condition can add constraints | 
|  | 846 | # based on attributes of the request, the resource, or both. To learn which | 
|  | 847 | # resources support conditions in their IAM policies, see the | 
|  | 848 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 849 | # | 
|  | 850 | # **JSON example:** | 
|  | 851 | # | 
|  | 852 | #     { | 
|  | 853 | #       "bindings": [ | 
|  | 854 | #         { | 
|  | 855 | #           "role": "roles/resourcemanager.organizationAdmin", | 
|  | 856 | #           "members": [ | 
|  | 857 | #             "user:mike@example.com", | 
|  | 858 | #             "group:admins@example.com", | 
|  | 859 | #             "domain:google.com", | 
|  | 860 | #             "serviceAccount:my-project-id@appspot.gserviceaccount.com" | 
|  | 861 | #           ] | 
|  | 862 | #         }, | 
|  | 863 | #         { | 
|  | 864 | #           "role": "roles/resourcemanager.organizationViewer", | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 865 | #           "members": [ | 
|  | 866 | #             "user:eve@example.com" | 
|  | 867 | #           ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 868 | #           "condition": { | 
|  | 869 | #             "title": "expirable access", | 
|  | 870 | #             "description": "Does not grant access after Sep 2020", | 
|  | 871 | #             "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", | 
|  | 872 | #           } | 
|  | 873 | #         } | 
|  | 874 | #       ], | 
|  | 875 | #       "etag": "BwWWja0YfJA=", | 
|  | 876 | #       "version": 3 | 
|  | 877 | #     } | 
|  | 878 | # | 
|  | 879 | # **YAML example:** | 
|  | 880 | # | 
|  | 881 | #     bindings: | 
|  | 882 | #     - members: | 
|  | 883 | #       - user:mike@example.com | 
|  | 884 | #       - group:admins@example.com | 
|  | 885 | #       - domain:google.com | 
|  | 886 | #       - serviceAccount:my-project-id@appspot.gserviceaccount.com | 
|  | 887 | #       role: roles/resourcemanager.organizationAdmin | 
|  | 888 | #     - members: | 
|  | 889 | #       - user:eve@example.com | 
|  | 890 | #       role: roles/resourcemanager.organizationViewer | 
|  | 891 | #       condition: | 
|  | 892 | #         title: expirable access | 
|  | 893 | #         description: Does not grant access after Sep 2020 | 
|  | 894 | #         expression: request.time < timestamp('2020-10-01T00:00:00.000Z') | 
|  | 895 | #     - etag: BwWWja0YfJA= | 
|  | 896 | #     - version: 3 | 
|  | 897 | # | 
|  | 898 | # For a description of IAM and its features, see the | 
|  | 899 | # [IAM documentation](https://cloud.google.com/iam/docs/). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 900 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a | 
|  | 901 | # `condition` that determines how and when the `bindings` are applied. Each | 
|  | 902 | # of the `bindings` must contain at least one member. | 
|  | 903 | { # Associates `members` with a `role`. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 904 | "role": "A String", # Role that is assigned to `members`. | 
|  | 905 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 906 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 907 | # | 
|  | 908 | # If the condition evaluates to `true`, then this binding applies to the | 
|  | 909 | # current request. | 
|  | 910 | # | 
|  | 911 | # If the condition evaluates to `false`, then this binding does not apply to | 
|  | 912 | # the current request. However, a different role binding might grant the same | 
|  | 913 | # role to one or more of the members in this binding. | 
|  | 914 | # | 
|  | 915 | # To learn which resources support conditions in their IAM policies, see the | 
|  | 916 | # [IAM | 
|  | 917 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 918 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL | 
|  | 919 | # are documented at https://github.com/google/cel-spec. | 
|  | 920 | # | 
|  | 921 | # Example (Comparison): | 
|  | 922 | # | 
|  | 923 | #     title: "Summary size limit" | 
|  | 924 | #     description: "Determines if a summary is less than 100 chars" | 
|  | 925 | #     expression: "document.summary.size() < 100" | 
|  | 926 | # | 
|  | 927 | # Example (Equality): | 
|  | 928 | # | 
|  | 929 | #     title: "Requestor is owner" | 
|  | 930 | #     description: "Determines if requestor is the document owner" | 
|  | 931 | #     expression: "document.owner == request.auth.claims.email" | 
|  | 932 | # | 
|  | 933 | # Example (Logic): | 
|  | 934 | # | 
|  | 935 | #     title: "Public documents" | 
|  | 936 | #     description: "Determine whether the document should be publicly visible" | 
|  | 937 | #     expression: "document.type != 'private' && document.type != 'internal'" | 
|  | 938 | # | 
|  | 939 | # Example (Data Manipulation): | 
|  | 940 | # | 
|  | 941 | #     title: "Notification string" | 
|  | 942 | #     description: "Create a notification string with a timestamp." | 
|  | 943 | #     expression: "'New message received at ' + string(document.create_time)" | 
|  | 944 | # | 
|  | 945 | # The exact variables and functions that may be referenced within an expression | 
|  | 946 | # are determined by the service that evaluates it. See the service | 
|  | 947 | # documentation for additional information. | 
|  | 948 | "location": "A String", # Optional. String indicating the location of the expression for error | 
|  | 949 | # reporting, e.g. a file name and a position in the file. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 950 | "expression": "A String", # Textual representation of an expression in Common Expression Language | 
|  | 951 | # syntax. | 
|  | 952 | "description": "A String", # Optional. Description of the expression. This is a longer text which | 
|  | 953 | # describes the expression, e.g. when hovered over it in a UI. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 954 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing | 
|  | 955 | # its purpose. This can be used e.g. in UIs which allow to enter the | 
|  | 956 | # expression. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 957 | }, | 
|  | 958 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. | 
|  | 959 | # `members` can have the following values: | 
|  | 960 | # | 
|  | 961 | # * `allUsers`: A special identifier that represents anyone who is | 
|  | 962 | #    on the internet; with or without a Google account. | 
|  | 963 | # | 
|  | 964 | # * `allAuthenticatedUsers`: A special identifier that represents anyone | 
|  | 965 | #    who is authenticated with a Google account or a service account. | 
|  | 966 | # | 
|  | 967 | # * `user:{emailid}`: An email address that represents a specific Google | 
|  | 968 | #    account. For example, `alice@example.com` . | 
|  | 969 | # | 
|  | 970 | # | 
|  | 971 | # * `serviceAccount:{emailid}`: An email address that represents a service | 
|  | 972 | #    account. For example, `my-other-app@appspot.gserviceaccount.com`. | 
|  | 973 | # | 
|  | 974 | # * `group:{emailid}`: An email address that represents a Google group. | 
|  | 975 | #    For example, `admins@example.com`. | 
|  | 976 | # | 
|  | 977 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique | 
|  | 978 | #    identifier) representing a user that has been recently deleted. For | 
|  | 979 | #    example, `alice@example.com?uid=123456789012345678901`. If the user is | 
|  | 980 | #    recovered, this value reverts to `user:{emailid}` and the recovered user | 
|  | 981 | #    retains the role in the binding. | 
|  | 982 | # | 
|  | 983 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus | 
|  | 984 | #    unique identifier) representing a service account that has been recently | 
|  | 985 | #    deleted. For example, | 
|  | 986 | #    `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. | 
|  | 987 | #    If the service account is undeleted, this value reverts to | 
|  | 988 | #    `serviceAccount:{emailid}` and the undeleted service account retains the | 
|  | 989 | #    role in the binding. | 
|  | 990 | # | 
|  | 991 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique | 
|  | 992 | #    identifier) representing a Google group that has been recently | 
|  | 993 | #    deleted. For example, `admins@example.com?uid=123456789012345678901`. If | 
|  | 994 | #    the group is recovered, this value reverts to `group:{emailid}` and the | 
|  | 995 | #    recovered group retains the role in the binding. | 
|  | 996 | # | 
|  | 997 | # | 
|  | 998 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the | 
|  | 999 | #    users of that domain. For example, `google.com` or `example.com`. | 
|  | 1000 | # | 
|  | 1001 | "A String", | 
|  | 1002 | ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1003 | }, | 
|  | 1004 | ], | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1005 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help | 
|  | 1006 | # prevent simultaneous updates of a policy from overwriting each other. | 
|  | 1007 | # It is strongly suggested that systems make use of the `etag` in the | 
|  | 1008 | # read-modify-write cycle to perform policy updates in order to avoid race | 
|  | 1009 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and | 
|  | 1010 | # systems are expected to put that etag in the request to `setIamPolicy` to | 
|  | 1011 | # ensure that their change will be applied to the same version of the policy. | 
|  | 1012 | # | 
|  | 1013 | # **Important:** If you use IAM Conditions, you must include the `etag` field | 
|  | 1014 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows | 
|  | 1015 | # you to overwrite a version `3` policy with a version `1` policy, and all of | 
|  | 1016 | # the conditions in the version `3` policy are lost. | 
|  | 1017 | "version": 42, # Specifies the format of the policy. | 
|  | 1018 | # | 
|  | 1019 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value | 
|  | 1020 | # are rejected. | 
|  | 1021 | # | 
|  | 1022 | # Any operation that affects conditional role bindings must specify version | 
|  | 1023 | # `3`. This requirement applies to the following operations: | 
|  | 1024 | # | 
|  | 1025 | # * Getting a policy that includes a conditional role binding | 
|  | 1026 | # * Adding a conditional role binding to a policy | 
|  | 1027 | # * Changing a conditional role binding in a policy | 
|  | 1028 | # * Removing any role binding, with or without a condition, from a policy | 
|  | 1029 | #   that includes conditions | 
|  | 1030 | # | 
|  | 1031 | # **Important:** If you use IAM Conditions, you must include the `etag` field | 
|  | 1032 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows | 
|  | 1033 | # you to overwrite a version `3` policy with a version `1` policy, and all of | 
|  | 1034 | # the conditions in the version `3` policy are lost. | 
|  | 1035 | # | 
|  | 1036 | # If a policy does not include any conditions, operations on that policy may | 
|  | 1037 | # specify any valid version or leave the field unset. | 
|  | 1038 | # | 
|  | 1039 | # To learn which resources support conditions in their IAM policies, see the | 
|  | 1040 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1041 | }, | 
|  | 1042 | } | 
|  | 1043 |  | 
|  | 1044 | x__xgafv: string, V1 error format. | 
|  | 1045 | Allowed values | 
|  | 1046 | 1 - v1 error format | 
|  | 1047 | 2 - v2 error format | 
|  | 1048 |  | 
|  | 1049 | Returns: | 
|  | 1050 | An object of the form: | 
|  | 1051 |  | 
|  | 1052 | { # An Identity and Access Management (IAM) policy, which specifies access | 
|  | 1053 | # controls for Google Cloud resources. | 
|  | 1054 | # | 
|  | 1055 | # | 
|  | 1056 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more | 
|  | 1057 | # `members` to a single `role`. Members can be user accounts, service accounts, | 
|  | 1058 | # Google groups, and domains (such as G Suite). A `role` is a named list of | 
|  | 1059 | # permissions; each `role` can be an IAM predefined role or a user-created | 
|  | 1060 | # custom role. | 
|  | 1061 | # | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1062 | # For some types of Google Cloud resources, a `binding` can also specify a | 
|  | 1063 | # `condition`, which is a logical expression that allows access to a resource | 
|  | 1064 | # only if the expression evaluates to `true`. A condition can add constraints | 
|  | 1065 | # based on attributes of the request, the resource, or both. To learn which | 
|  | 1066 | # resources support conditions in their IAM policies, see the | 
|  | 1067 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1068 | # | 
|  | 1069 | # **JSON example:** | 
|  | 1070 | # | 
|  | 1071 | #     { | 
|  | 1072 | #       "bindings": [ | 
|  | 1073 | #         { | 
|  | 1074 | #           "role": "roles/resourcemanager.organizationAdmin", | 
|  | 1075 | #           "members": [ | 
|  | 1076 | #             "user:mike@example.com", | 
|  | 1077 | #             "group:admins@example.com", | 
|  | 1078 | #             "domain:google.com", | 
|  | 1079 | #             "serviceAccount:my-project-id@appspot.gserviceaccount.com" | 
|  | 1080 | #           ] | 
|  | 1081 | #         }, | 
|  | 1082 | #         { | 
|  | 1083 | #           "role": "roles/resourcemanager.organizationViewer", | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1084 | #           "members": [ | 
|  | 1085 | #             "user:eve@example.com" | 
|  | 1086 | #           ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1087 | #           "condition": { | 
|  | 1088 | #             "title": "expirable access", | 
|  | 1089 | #             "description": "Does not grant access after Sep 2020", | 
|  | 1090 | #             "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", | 
|  | 1091 | #           } | 
|  | 1092 | #         } | 
|  | 1093 | #       ], | 
|  | 1094 | #       "etag": "BwWWja0YfJA=", | 
|  | 1095 | #       "version": 3 | 
|  | 1096 | #     } | 
|  | 1097 | # | 
|  | 1098 | # **YAML example:** | 
|  | 1099 | # | 
|  | 1100 | #     bindings: | 
|  | 1101 | #     - members: | 
|  | 1102 | #       - user:mike@example.com | 
|  | 1103 | #       - group:admins@example.com | 
|  | 1104 | #       - domain:google.com | 
|  | 1105 | #       - serviceAccount:my-project-id@appspot.gserviceaccount.com | 
|  | 1106 | #       role: roles/resourcemanager.organizationAdmin | 
|  | 1107 | #     - members: | 
|  | 1108 | #       - user:eve@example.com | 
|  | 1109 | #       role: roles/resourcemanager.organizationViewer | 
|  | 1110 | #       condition: | 
|  | 1111 | #         title: expirable access | 
|  | 1112 | #         description: Does not grant access after Sep 2020 | 
|  | 1113 | #         expression: request.time < timestamp('2020-10-01T00:00:00.000Z') | 
|  | 1114 | #     - etag: BwWWja0YfJA= | 
|  | 1115 | #     - version: 3 | 
|  | 1116 | # | 
|  | 1117 | # For a description of IAM and its features, see the | 
|  | 1118 | # [IAM documentation](https://cloud.google.com/iam/docs/). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1119 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a | 
|  | 1120 | # `condition` that determines how and when the `bindings` are applied. Each | 
|  | 1121 | # of the `bindings` must contain at least one member. | 
|  | 1122 | { # Associates `members` with a `role`. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1123 | "role": "A String", # Role that is assigned to `members`. | 
|  | 1124 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1125 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1126 | # | 
|  | 1127 | # If the condition evaluates to `true`, then this binding applies to the | 
|  | 1128 | # current request. | 
|  | 1129 | # | 
|  | 1130 | # If the condition evaluates to `false`, then this binding does not apply to | 
|  | 1131 | # the current request. However, a different role binding might grant the same | 
|  | 1132 | # role to one or more of the members in this binding. | 
|  | 1133 | # | 
|  | 1134 | # To learn which resources support conditions in their IAM policies, see the | 
|  | 1135 | # [IAM | 
|  | 1136 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1137 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL | 
|  | 1138 | # are documented at https://github.com/google/cel-spec. | 
|  | 1139 | # | 
|  | 1140 | # Example (Comparison): | 
|  | 1141 | # | 
|  | 1142 | #     title: "Summary size limit" | 
|  | 1143 | #     description: "Determines if a summary is less than 100 chars" | 
|  | 1144 | #     expression: "document.summary.size() < 100" | 
|  | 1145 | # | 
|  | 1146 | # Example (Equality): | 
|  | 1147 | # | 
|  | 1148 | #     title: "Requestor is owner" | 
|  | 1149 | #     description: "Determines if requestor is the document owner" | 
|  | 1150 | #     expression: "document.owner == request.auth.claims.email" | 
|  | 1151 | # | 
|  | 1152 | # Example (Logic): | 
|  | 1153 | # | 
|  | 1154 | #     title: "Public documents" | 
|  | 1155 | #     description: "Determine whether the document should be publicly visible" | 
|  | 1156 | #     expression: "document.type != 'private' && document.type != 'internal'" | 
|  | 1157 | # | 
|  | 1158 | # Example (Data Manipulation): | 
|  | 1159 | # | 
|  | 1160 | #     title: "Notification string" | 
|  | 1161 | #     description: "Create a notification string with a timestamp." | 
|  | 1162 | #     expression: "'New message received at ' + string(document.create_time)" | 
|  | 1163 | # | 
|  | 1164 | # The exact variables and functions that may be referenced within an expression | 
|  | 1165 | # are determined by the service that evaluates it. See the service | 
|  | 1166 | # documentation for additional information. | 
|  | 1167 | "location": "A String", # Optional. String indicating the location of the expression for error | 
|  | 1168 | # reporting, e.g. a file name and a position in the file. | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1169 | "expression": "A String", # Textual representation of an expression in Common Expression Language | 
|  | 1170 | # syntax. | 
|  | 1171 | "description": "A String", # Optional. Description of the expression. This is a longer text which | 
|  | 1172 | # describes the expression, e.g. when hovered over it in a UI. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1173 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing | 
|  | 1174 | # its purpose. This can be used e.g. in UIs which allow to enter the | 
|  | 1175 | # expression. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1176 | }, | 
|  | 1177 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. | 
|  | 1178 | # `members` can have the following values: | 
|  | 1179 | # | 
|  | 1180 | # * `allUsers`: A special identifier that represents anyone who is | 
|  | 1181 | #    on the internet; with or without a Google account. | 
|  | 1182 | # | 
|  | 1183 | # * `allAuthenticatedUsers`: A special identifier that represents anyone | 
|  | 1184 | #    who is authenticated with a Google account or a service account. | 
|  | 1185 | # | 
|  | 1186 | # * `user:{emailid}`: An email address that represents a specific Google | 
|  | 1187 | #    account. For example, `alice@example.com` . | 
|  | 1188 | # | 
|  | 1189 | # | 
|  | 1190 | # * `serviceAccount:{emailid}`: An email address that represents a service | 
|  | 1191 | #    account. For example, `my-other-app@appspot.gserviceaccount.com`. | 
|  | 1192 | # | 
|  | 1193 | # * `group:{emailid}`: An email address that represents a Google group. | 
|  | 1194 | #    For example, `admins@example.com`. | 
|  | 1195 | # | 
|  | 1196 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique | 
|  | 1197 | #    identifier) representing a user that has been recently deleted. For | 
|  | 1198 | #    example, `alice@example.com?uid=123456789012345678901`. If the user is | 
|  | 1199 | #    recovered, this value reverts to `user:{emailid}` and the recovered user | 
|  | 1200 | #    retains the role in the binding. | 
|  | 1201 | # | 
|  | 1202 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus | 
|  | 1203 | #    unique identifier) representing a service account that has been recently | 
|  | 1204 | #    deleted. For example, | 
|  | 1205 | #    `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. | 
|  | 1206 | #    If the service account is undeleted, this value reverts to | 
|  | 1207 | #    `serviceAccount:{emailid}` and the undeleted service account retains the | 
|  | 1208 | #    role in the binding. | 
|  | 1209 | # | 
|  | 1210 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique | 
|  | 1211 | #    identifier) representing a Google group that has been recently | 
|  | 1212 | #    deleted. For example, `admins@example.com?uid=123456789012345678901`. If | 
|  | 1213 | #    the group is recovered, this value reverts to `group:{emailid}` and the | 
|  | 1214 | #    recovered group retains the role in the binding. | 
|  | 1215 | # | 
|  | 1216 | # | 
|  | 1217 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the | 
|  | 1218 | #    users of that domain. For example, `google.com` or `example.com`. | 
|  | 1219 | # | 
|  | 1220 | "A String", | 
|  | 1221 | ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1222 | }, | 
|  | 1223 | ], | 
| Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1224 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help | 
|  | 1225 | # prevent simultaneous updates of a policy from overwriting each other. | 
|  | 1226 | # It is strongly suggested that systems make use of the `etag` in the | 
|  | 1227 | # read-modify-write cycle to perform policy updates in order to avoid race | 
|  | 1228 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and | 
|  | 1229 | # systems are expected to put that etag in the request to `setIamPolicy` to | 
|  | 1230 | # ensure that their change will be applied to the same version of the policy. | 
|  | 1231 | # | 
|  | 1232 | # **Important:** If you use IAM Conditions, you must include the `etag` field | 
|  | 1233 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows | 
|  | 1234 | # you to overwrite a version `3` policy with a version `1` policy, and all of | 
|  | 1235 | # the conditions in the version `3` policy are lost. | 
|  | 1236 | "version": 42, # Specifies the format of the policy. | 
|  | 1237 | # | 
|  | 1238 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value | 
|  | 1239 | # are rejected. | 
|  | 1240 | # | 
|  | 1241 | # Any operation that affects conditional role bindings must specify version | 
|  | 1242 | # `3`. This requirement applies to the following operations: | 
|  | 1243 | # | 
|  | 1244 | # * Getting a policy that includes a conditional role binding | 
|  | 1245 | # * Adding a conditional role binding to a policy | 
|  | 1246 | # * Changing a conditional role binding in a policy | 
|  | 1247 | # * Removing any role binding, with or without a condition, from a policy | 
|  | 1248 | #   that includes conditions | 
|  | 1249 | # | 
|  | 1250 | # **Important:** If you use IAM Conditions, you must include the `etag` field | 
|  | 1251 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows | 
|  | 1252 | # you to overwrite a version `3` policy with a version `1` policy, and all of | 
|  | 1253 | # the conditions in the version `3` policy are lost. | 
|  | 1254 | # | 
|  | 1255 | # If a policy does not include any conditions, operations on that policy may | 
|  | 1256 | # specify any valid version or leave the field unset. | 
|  | 1257 | # | 
|  | 1258 | # To learn which resources support conditions in their IAM policies, see the | 
|  | 1259 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1260 | }</pre> | 
|  | 1261 | </div> | 
|  | 1262 |  | 
|  | 1263 | <div class="method"> | 
|  | 1264 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> | 
|  | 1265 | <pre>Returns permissions that the caller has on the specified database or backup | 
|  | 1266 | resource. | 
|  | 1267 |  | 
|  | 1268 | Attempting this RPC on a non-existent Cloud Spanner database will | 
|  | 1269 | result in a NOT_FOUND error if the user has | 
|  | 1270 | `spanner.databases.list` permission on the containing Cloud | 
|  | 1271 | Spanner instance. Otherwise returns an empty set of permissions. | 
|  | 1272 | Calling this method on a backup that does not exist will | 
|  | 1273 | result in a NOT_FOUND error if the user has | 
|  | 1274 | `spanner.backups.list` permission on the containing instance. | 
|  | 1275 |  | 
|  | 1276 | Args: | 
|  | 1277 | resource: string, REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/<project ID>/instances/<instance ID>` for instance resources and `projects/<project ID>/instances/<instance ID>/databases/<database ID>` for database resources. (required) | 
|  | 1278 | body: object, The request body. | 
|  | 1279 | The object takes the form of: | 
|  | 1280 |  | 
|  | 1281 | { # Request message for `TestIamPermissions` method. | 
|  | 1282 | "permissions": [ # REQUIRED: The set of permissions to check for 'resource'. | 
|  | 1283 | # Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') are not allowed. | 
|  | 1284 | "A String", | 
|  | 1285 | ], | 
|  | 1286 | } | 
|  | 1287 |  | 
|  | 1288 | x__xgafv: string, V1 error format. | 
|  | 1289 | Allowed values | 
|  | 1290 | 1 - v1 error format | 
|  | 1291 | 2 - v2 error format | 
|  | 1292 |  | 
|  | 1293 | Returns: | 
|  | 1294 | An object of the form: | 
|  | 1295 |  | 
|  | 1296 | { # Response message for `TestIamPermissions` method. | 
|  | 1297 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is | 
|  | 1298 | # allowed. | 
|  | 1299 | "A String", | 
|  | 1300 | ], | 
|  | 1301 | }</pre> | 
|  | 1302 | </div> | 
|  | 1303 |  | 
|  | 1304 | </body></html> |