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