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