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