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 | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 115 | <code><a href="#list">list(parent, pageSize=None, pageToken=None, filter=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 | "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] | 175 | # specified must be `<parent>/instances/<instance_id>`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 176 | "state": "A String", # Output only. The current instance state. For |
| 177 | # CreateInstance, the state must be |
| 178 | # either omitted or set to `CREATING`. For |
| 179 | # UpdateInstance, the state must be |
| 180 | # either omitted or set to `READY`. |
| 181 | "nodeCount": 42, # The number of nodes allocated to this instance. This |
| 182 | # may be zero in API responses for instances that are not yet in state |
| 183 | # `READY`. |
| 184 | # |
| 185 | # See [the |
| 186 | # documentation](https://cloud.google.com/spanner/docs/instances#node_count) |
| 187 | # for more information about nodes. |
| 188 | "displayName": "A String", # Required. The descriptive name for this instance as it appears in UIs. |
| 189 | # Must be unique per project and between 4 and 30 characters in length. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 190 | "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] | 191 | # after the instance is created. Values are of the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 192 | # `projects/<project>/instances/a-z*[a-z0-9]`. The final |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 193 | # 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] | 194 | "labels": { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud |
| 195 | # resources into groups that reflect a customer's organizational needs and |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 196 | # deployment strategies. Cloud Labels can be used to filter collections of |
| 197 | # resources. They can be used to control how resource metrics are aggregated. |
| 198 | # And they can be used as arguments to policy management rules (e.g. route, |
| 199 | # firewall, load balancing, etc.). |
| 200 | # |
| 201 | # * Label keys must be between 1 and 63 characters long and must conform to |
| 202 | # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. |
| 203 | # * Label values must be between 0 and 63 characters long and must conform |
| 204 | # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. |
| 205 | # * No more than 64 labels can be associated with a given resource. |
| 206 | # |
| 207 | # See https://goo.gl/xmQnxf for more information on and examples of labels. |
| 208 | # |
| 209 | # If you plan to use labels in your own code, please note that additional |
| 210 | # 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] | 211 | # internal label representation, such as JSON, which doesn't rely upon |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 212 | # specific characters being disallowed. For example, representing labels |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 213 | # as the string: name + "_" + value would prove problematic if we were to |
| 214 | # allow "_" in a future release. |
| 215 | "a_key": "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 216 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 217 | "endpointUris": [ # Deprecated. This field is not populated. |
| 218 | "A String", |
| 219 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 220 | "config": "A String", # Required. The name of the instance's configuration. Values are of the form |
| 221 | # `projects/<project>/instanceConfigs/<configuration>`. See |
| 222 | # also InstanceConfig and |
| 223 | # ListInstanceConfigs. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 224 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 225 | "instanceId": "A String", # Required. The ID of the instance to create. Valid identifiers are of the |
| 226 | # form `a-z*[a-z0-9]` and must be between 2 and 64 characters in |
| 227 | # length. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 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 | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 240 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 241 | # originally returns it. If you use the default HTTP mapping, the |
| 242 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 243 | "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. |
| 244 | # different programming environments, including REST APIs and RPC APIs. It is |
| 245 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 246 | # three pieces of data: error code, error message, and error details. |
| 247 | # |
| 248 | # You can find out more about this error model and how to work with it in the |
| 249 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 250 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 251 | # user-facing error message should be localized and sent in the |
| 252 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 253 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 254 | # message types for APIs to use. |
| 255 | { |
| 256 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 257 | }, |
| 258 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 259 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 260 | }, |
| 261 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 262 | # contains progress information and common metadata such as create time. |
| 263 | # Some services might not provide such metadata. Any method that returns a |
| 264 | # long-running operation should document the metadata type, if any. |
| 265 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 266 | }, |
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 | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 339 | "state": "A String", # Output only. The current instance state. For |
| 340 | # CreateInstance, the state must be |
| 341 | # either omitted or set to `CREATING`. For |
| 342 | # UpdateInstance, the state must be |
| 343 | # either omitted or set to `READY`. |
| 344 | "nodeCount": 42, # The number of nodes allocated to this instance. This |
| 345 | # may be zero in API responses for instances that are not yet in state |
| 346 | # `READY`. |
| 347 | # |
| 348 | # See [the |
| 349 | # documentation](https://cloud.google.com/spanner/docs/instances#node_count) |
| 350 | # for more information about nodes. |
| 351 | "displayName": "A String", # Required. The descriptive name for this instance as it appears in UIs. |
| 352 | # Must be unique per project and between 4 and 30 characters in length. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 353 | "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] | 354 | # after the instance is created. Values are of the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 355 | # `projects/<project>/instances/a-z*[a-z0-9]`. The final |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 356 | # 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] | 357 | "labels": { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud |
| 358 | # resources into groups that reflect a customer's organizational needs and |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 359 | # deployment strategies. Cloud Labels can be used to filter collections of |
| 360 | # resources. They can be used to control how resource metrics are aggregated. |
| 361 | # And they can be used as arguments to policy management rules (e.g. route, |
| 362 | # firewall, load balancing, etc.). |
| 363 | # |
| 364 | # * Label keys must be between 1 and 63 characters long and must conform to |
| 365 | # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. |
| 366 | # * Label values must be between 0 and 63 characters long and must conform |
| 367 | # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. |
| 368 | # * No more than 64 labels can be associated with a given resource. |
| 369 | # |
| 370 | # See https://goo.gl/xmQnxf for more information on and examples of labels. |
| 371 | # |
| 372 | # If you plan to use labels in your own code, please note that additional |
| 373 | # 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] | 374 | # internal label representation, such as JSON, which doesn't rely upon |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 375 | # specific characters being disallowed. For example, representing labels |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 376 | # as the string: name + "_" + value would prove problematic if we were to |
| 377 | # allow "_" in a future release. |
| 378 | "a_key": "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 379 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 380 | "endpointUris": [ # Deprecated. This field is not populated. |
| 381 | "A String", |
| 382 | ], |
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 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 503 | # `members` can have the following values: |
| 504 | # |
| 505 | # * `allUsers`: A special identifier that represents anyone who is |
| 506 | # on the internet; with or without a Google account. |
| 507 | # |
| 508 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 509 | # who is authenticated with a Google account or a service account. |
| 510 | # |
| 511 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 512 | # account. For example, `alice@example.com` . |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 513 | # |
| 514 | # |
| 515 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 516 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 517 | # |
| 518 | # * `group:{emailid}`: An email address that represents a Google group. |
| 519 | # For example, `admins@example.com`. |
| 520 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 521 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 522 | # identifier) representing a user that has been recently deleted. For |
| 523 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 524 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 525 | # retains the role in the binding. |
| 526 | # |
| 527 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 528 | # unique identifier) representing a service account that has been recently |
| 529 | # deleted. For example, |
| 530 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 531 | # If the service account is undeleted, this value reverts to |
| 532 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 533 | # role in the binding. |
| 534 | # |
| 535 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 536 | # identifier) representing a Google group that has been recently |
| 537 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 538 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 539 | # recovered group retains the role in the binding. |
| 540 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 541 | # |
| 542 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 543 | # users of that domain. For example, `google.com` or `example.com`. |
| 544 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 545 | "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 546 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 547 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 548 | # |
| 549 | # If the condition evaluates to `true`, then this binding applies to the |
| 550 | # current request. |
| 551 | # |
| 552 | # If the condition evaluates to `false`, then this binding does not apply to |
| 553 | # the current request. However, a different role binding might grant the same |
| 554 | # role to one or more of the members in this binding. |
| 555 | # |
| 556 | # To learn which resources support conditions in their IAM policies, see the |
| 557 | # [IAM |
| 558 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 559 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 560 | # are documented at https://github.com/google/cel-spec. |
| 561 | # |
| 562 | # Example (Comparison): |
| 563 | # |
| 564 | # title: "Summary size limit" |
| 565 | # description: "Determines if a summary is less than 100 chars" |
| 566 | # expression: "document.summary.size() < 100" |
| 567 | # |
| 568 | # Example (Equality): |
| 569 | # |
| 570 | # title: "Requestor is owner" |
| 571 | # description: "Determines if requestor is the document owner" |
| 572 | # expression: "document.owner == request.auth.claims.email" |
| 573 | # |
| 574 | # Example (Logic): |
| 575 | # |
| 576 | # title: "Public documents" |
| 577 | # description: "Determine whether the document should be publicly visible" |
| 578 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 579 | # |
| 580 | # Example (Data Manipulation): |
| 581 | # |
| 582 | # title: "Notification string" |
| 583 | # description: "Create a notification string with a timestamp." |
| 584 | # expression: "'New message received at ' + string(document.create_time)" |
| 585 | # |
| 586 | # The exact variables and functions that may be referenced within an expression |
| 587 | # are determined by the service that evaluates it. See the service |
| 588 | # documentation for additional information. |
| 589 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 590 | # syntax. |
| 591 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 592 | # describes the expression, e.g. when hovered over it in a UI. |
| 593 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 594 | # reporting, e.g. a file name and a position in the file. |
| 595 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 596 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 597 | # expression. |
| 598 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 599 | }, |
| 600 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 601 | "version": 42, # Specifies the format of the policy. |
| 602 | # |
| 603 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 604 | # are rejected. |
| 605 | # |
| 606 | # Any operation that affects conditional role bindings must specify version |
| 607 | # `3`. This requirement applies to the following operations: |
| 608 | # |
| 609 | # * Getting a policy that includes a conditional role binding |
| 610 | # * Adding a conditional role binding to a policy |
| 611 | # * Changing a conditional role binding in a policy |
| 612 | # * Removing any role binding, with or without a condition, from a policy |
| 613 | # that includes conditions |
| 614 | # |
| 615 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 616 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 617 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 618 | # the conditions in the version `3` policy are lost. |
| 619 | # |
| 620 | # If a policy does not include any conditions, operations on that policy may |
| 621 | # specify any valid version or leave the field unset. |
| 622 | # |
| 623 | # To learn which resources support conditions in their IAM policies, see the |
| 624 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 625 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 626 | # prevent simultaneous updates of a policy from overwriting each other. |
| 627 | # It is strongly suggested that systems make use of the `etag` in the |
| 628 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 629 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 630 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 631 | # ensure that their change will be applied to the same version of the policy. |
| 632 | # |
| 633 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 634 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 635 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 636 | # the conditions in the version `3` policy are lost. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 637 | }</pre> |
| 638 | </div> |
| 639 | |
| 640 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 641 | <code class="details" id="list">list(parent, pageSize=None, pageToken=None, filter=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 | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 647 | pageSize: integer, Number of instances to be returned in the response. If 0 or less, defaults |
| 648 | to the server's maximum allowed page size. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 649 | pageToken: string, If non-empty, `page_token` should contain a |
| 650 | next_page_token from a |
| 651 | previous ListInstancesResponse. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 652 | filter: string, An expression for filtering the results of the request. Filter rules are |
| 653 | case insensitive. The fields eligible for filtering are: |
| 654 | |
| 655 | * `name` |
| 656 | * `display_name` |
| 657 | * `labels.key` where key is the name of a label |
| 658 | |
| 659 | Some examples of using filters are: |
| 660 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 661 | * `name:*` --> The instance has a name. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 662 | * `name:Howl` --> The instance's name contains the string "howl". |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 663 | * `name:HOWL` --> Equivalent to above. |
| 664 | * `NAME:howl` --> Equivalent to above. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 665 | * `labels.env:*` --> The instance has the label "env". |
| 666 | * `labels.env:dev` --> The instance has the label "env" and the value of |
| 667 | the label contains the string "dev". |
| 668 | * `name:howl labels.env:dev` --> The instance's name contains "howl" and |
| 669 | it has the label "env" with its value |
| 670 | containing "dev". |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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 | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 680 | "nextPageToken": "A String", # `next_page_token` can be sent in a subsequent |
| 681 | # ListInstances call to fetch more |
| 682 | # of the matching instances. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 683 | "instances": [ # The list of requested instances. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 684 | { # An isolated set of Cloud Spanner resources on which databases can be hosted. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 685 | "state": "A String", # Output only. The current instance state. For |
| 686 | # CreateInstance, the state must be |
| 687 | # either omitted or set to `CREATING`. For |
| 688 | # UpdateInstance, the state must be |
| 689 | # either omitted or set to `READY`. |
| 690 | "nodeCount": 42, # The number of nodes allocated to this instance. This |
| 691 | # may be zero in API responses for instances that are not yet in state |
| 692 | # `READY`. |
| 693 | # |
| 694 | # See [the |
| 695 | # documentation](https://cloud.google.com/spanner/docs/instances#node_count) |
| 696 | # for more information about nodes. |
| 697 | "displayName": "A String", # Required. The descriptive name for this instance as it appears in UIs. |
| 698 | # Must be unique per project and between 4 and 30 characters in length. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 699 | "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] | 700 | # after the instance is created. Values are of the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 701 | # `projects/<project>/instances/a-z*[a-z0-9]`. The final |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 702 | # 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] | 703 | "labels": { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud |
| 704 | # resources into groups that reflect a customer's organizational needs and |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 705 | # deployment strategies. Cloud Labels can be used to filter collections of |
| 706 | # resources. They can be used to control how resource metrics are aggregated. |
| 707 | # And they can be used as arguments to policy management rules (e.g. route, |
| 708 | # firewall, load balancing, etc.). |
| 709 | # |
| 710 | # * Label keys must be between 1 and 63 characters long and must conform to |
| 711 | # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. |
| 712 | # * Label values must be between 0 and 63 characters long and must conform |
| 713 | # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. |
| 714 | # * No more than 64 labels can be associated with a given resource. |
| 715 | # |
| 716 | # See https://goo.gl/xmQnxf for more information on and examples of labels. |
| 717 | # |
| 718 | # If you plan to use labels in your own code, please note that additional |
| 719 | # 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] | 720 | # internal label representation, such as JSON, which doesn't rely upon |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 721 | # specific characters being disallowed. For example, representing labels |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 722 | # as the string: name + "_" + value would prove problematic if we were to |
| 723 | # allow "_" in a future release. |
| 724 | "a_key": "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 725 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 726 | "endpointUris": [ # Deprecated. This field is not populated. |
| 727 | "A String", |
| 728 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 729 | "config": "A String", # Required. The name of the instance's configuration. Values are of the form |
| 730 | # `projects/<project>/instanceConfigs/<configuration>`. See |
| 731 | # also InstanceConfig and |
| 732 | # ListInstanceConfigs. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 733 | }, |
| 734 | ], |
| 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 | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 804 | "fieldMask": "A String", # Required. A mask specifying which fields in Instance should be updated. |
| 805 | # The field mask must always be specified; this prevents any future fields in |
| 806 | # Instance from being erased accidentally by clients that do not know |
| 807 | # about them. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 808 | "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] | 809 | # name. Otherwise, only fields mentioned in field_mask need be included. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 810 | "state": "A String", # Output only. The current instance state. For |
| 811 | # CreateInstance, the state must be |
| 812 | # either omitted or set to `CREATING`. For |
| 813 | # UpdateInstance, the state must be |
| 814 | # either omitted or set to `READY`. |
| 815 | "nodeCount": 42, # The number of nodes allocated to this instance. This |
| 816 | # may be zero in API responses for instances that are not yet in state |
| 817 | # `READY`. |
| 818 | # |
| 819 | # See [the |
| 820 | # documentation](https://cloud.google.com/spanner/docs/instances#node_count) |
| 821 | # for more information about nodes. |
| 822 | "displayName": "A String", # Required. The descriptive name for this instance as it appears in UIs. |
| 823 | # Must be unique per project and between 4 and 30 characters in length. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 824 | "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] | 825 | # after the instance is created. Values are of the form |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 826 | # `projects/<project>/instances/a-z*[a-z0-9]`. The final |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 827 | # 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] | 828 | "labels": { # Cloud Labels are a flexible and lightweight mechanism for organizing cloud |
| 829 | # resources into groups that reflect a customer's organizational needs and |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 830 | # deployment strategies. Cloud Labels can be used to filter collections of |
| 831 | # resources. They can be used to control how resource metrics are aggregated. |
| 832 | # And they can be used as arguments to policy management rules (e.g. route, |
| 833 | # firewall, load balancing, etc.). |
| 834 | # |
| 835 | # * Label keys must be between 1 and 63 characters long and must conform to |
| 836 | # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. |
| 837 | # * Label values must be between 0 and 63 characters long and must conform |
| 838 | # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. |
| 839 | # * No more than 64 labels can be associated with a given resource. |
| 840 | # |
| 841 | # See https://goo.gl/xmQnxf for more information on and examples of labels. |
| 842 | # |
| 843 | # If you plan to use labels in your own code, please note that additional |
| 844 | # 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] | 845 | # internal label representation, such as JSON, which doesn't rely upon |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 846 | # specific characters being disallowed. For example, representing labels |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 847 | # as the string: name + "_" + value would prove problematic if we were to |
| 848 | # allow "_" in a future release. |
| 849 | "a_key": "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 850 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 851 | "endpointUris": [ # Deprecated. This field is not populated. |
| 852 | "A String", |
| 853 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 854 | "config": "A String", # Required. The name of the instance's configuration. Values are of the form |
| 855 | # `projects/<project>/instanceConfigs/<configuration>`. See |
| 856 | # also InstanceConfig and |
| 857 | # ListInstanceConfigs. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 858 | }, |
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 | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 871 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 872 | # originally returns it. If you use the default HTTP mapping, the |
| 873 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 874 | "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. |
| 875 | # different programming environments, including REST APIs and RPC APIs. It is |
| 876 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 877 | # three pieces of data: error code, error message, and error details. |
| 878 | # |
| 879 | # You can find out more about this error model and how to work with it in the |
| 880 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 881 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 882 | # user-facing error message should be localized and sent in the |
| 883 | # google.rpc.Status.details field, or localized by the client. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 884 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 885 | # message types for APIs to use. |
| 886 | { |
| 887 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 888 | }, |
| 889 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 890 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 891 | }, |
| 892 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 893 | # contains progress information and common metadata such as create time. |
| 894 | # Some services might not provide such metadata. Any method that returns a |
| 895 | # long-running operation should document the metadata type, if any. |
| 896 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 897 | }, |
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 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1005 | # `members` can have the following values: |
| 1006 | # |
| 1007 | # * `allUsers`: A special identifier that represents anyone who is |
| 1008 | # on the internet; with or without a Google account. |
| 1009 | # |
| 1010 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1011 | # who is authenticated with a Google account or a service account. |
| 1012 | # |
| 1013 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1014 | # account. For example, `alice@example.com` . |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1015 | # |
| 1016 | # |
| 1017 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1018 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1019 | # |
| 1020 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1021 | # For example, `admins@example.com`. |
| 1022 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1023 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1024 | # identifier) representing a user that has been recently deleted. For |
| 1025 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1026 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1027 | # retains the role in the binding. |
| 1028 | # |
| 1029 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1030 | # unique identifier) representing a service account that has been recently |
| 1031 | # deleted. For example, |
| 1032 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1033 | # If the service account is undeleted, this value reverts to |
| 1034 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1035 | # role in the binding. |
| 1036 | # |
| 1037 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1038 | # identifier) representing a Google group that has been recently |
| 1039 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1040 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1041 | # recovered group retains the role in the binding. |
| 1042 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1043 | # |
| 1044 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1045 | # users of that domain. For example, `google.com` or `example.com`. |
| 1046 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1047 | "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1048 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1049 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 1050 | # |
| 1051 | # If the condition evaluates to `true`, then this binding applies to the |
| 1052 | # current request. |
| 1053 | # |
| 1054 | # If the condition evaluates to `false`, then this binding does not apply to |
| 1055 | # the current request. However, a different role binding might grant the same |
| 1056 | # role to one or more of the members in this binding. |
| 1057 | # |
| 1058 | # To learn which resources support conditions in their IAM policies, see the |
| 1059 | # [IAM |
| 1060 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 1061 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1062 | # are documented at https://github.com/google/cel-spec. |
| 1063 | # |
| 1064 | # Example (Comparison): |
| 1065 | # |
| 1066 | # title: "Summary size limit" |
| 1067 | # description: "Determines if a summary is less than 100 chars" |
| 1068 | # expression: "document.summary.size() < 100" |
| 1069 | # |
| 1070 | # Example (Equality): |
| 1071 | # |
| 1072 | # title: "Requestor is owner" |
| 1073 | # description: "Determines if requestor is the document owner" |
| 1074 | # expression: "document.owner == request.auth.claims.email" |
| 1075 | # |
| 1076 | # Example (Logic): |
| 1077 | # |
| 1078 | # title: "Public documents" |
| 1079 | # description: "Determine whether the document should be publicly visible" |
| 1080 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 1081 | # |
| 1082 | # Example (Data Manipulation): |
| 1083 | # |
| 1084 | # title: "Notification string" |
| 1085 | # description: "Create a notification string with a timestamp." |
| 1086 | # expression: "'New message received at ' + string(document.create_time)" |
| 1087 | # |
| 1088 | # The exact variables and functions that may be referenced within an expression |
| 1089 | # are determined by the service that evaluates it. See the service |
| 1090 | # documentation for additional information. |
| 1091 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1092 | # syntax. |
| 1093 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1094 | # describes the expression, e.g. when hovered over it in a UI. |
| 1095 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1096 | # reporting, e.g. a file name and a position in the file. |
| 1097 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 1098 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1099 | # expression. |
| 1100 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1101 | }, |
| 1102 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1103 | "version": 42, # Specifies the format of the policy. |
| 1104 | # |
| 1105 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1106 | # are rejected. |
| 1107 | # |
| 1108 | # Any operation that affects conditional role bindings must specify version |
| 1109 | # `3`. This requirement applies to the following operations: |
| 1110 | # |
| 1111 | # * Getting a policy that includes a conditional role binding |
| 1112 | # * Adding a conditional role binding to a policy |
| 1113 | # * Changing a conditional role binding in a policy |
| 1114 | # * Removing any role binding, with or without a condition, from a policy |
| 1115 | # that includes conditions |
| 1116 | # |
| 1117 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1118 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1119 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1120 | # the conditions in the version `3` policy are lost. |
| 1121 | # |
| 1122 | # If a policy does not include any conditions, operations on that policy may |
| 1123 | # specify any valid version or leave the field unset. |
| 1124 | # |
| 1125 | # To learn which resources support conditions in their IAM policies, see the |
| 1126 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1127 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1128 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1129 | # It is strongly suggested that systems make use of the `etag` in the |
| 1130 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1131 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1132 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1133 | # ensure that their change will be applied to the same version of the policy. |
| 1134 | # |
| 1135 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1136 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1137 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1138 | # the conditions in the version `3` policy are lost. |
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 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1224 | # `members` can have the following values: |
| 1225 | # |
| 1226 | # * `allUsers`: A special identifier that represents anyone who is |
| 1227 | # on the internet; with or without a Google account. |
| 1228 | # |
| 1229 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1230 | # who is authenticated with a Google account or a service account. |
| 1231 | # |
| 1232 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1233 | # account. For example, `alice@example.com` . |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1234 | # |
| 1235 | # |
| 1236 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1237 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1238 | # |
| 1239 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1240 | # For example, `admins@example.com`. |
| 1241 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1242 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1243 | # identifier) representing a user that has been recently deleted. For |
| 1244 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1245 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1246 | # retains the role in the binding. |
| 1247 | # |
| 1248 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1249 | # unique identifier) representing a service account that has been recently |
| 1250 | # deleted. For example, |
| 1251 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1252 | # If the service account is undeleted, this value reverts to |
| 1253 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1254 | # role in the binding. |
| 1255 | # |
| 1256 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1257 | # identifier) representing a Google group that has been recently |
| 1258 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1259 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1260 | # recovered group retains the role in the binding. |
| 1261 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1262 | # |
| 1263 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1264 | # users of that domain. For example, `google.com` or `example.com`. |
| 1265 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1266 | "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1267 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1268 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 1269 | # |
| 1270 | # If the condition evaluates to `true`, then this binding applies to the |
| 1271 | # current request. |
| 1272 | # |
| 1273 | # If the condition evaluates to `false`, then this binding does not apply to |
| 1274 | # the current request. However, a different role binding might grant the same |
| 1275 | # role to one or more of the members in this binding. |
| 1276 | # |
| 1277 | # To learn which resources support conditions in their IAM policies, see the |
| 1278 | # [IAM |
| 1279 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 1280 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 1281 | # are documented at https://github.com/google/cel-spec. |
| 1282 | # |
| 1283 | # Example (Comparison): |
| 1284 | # |
| 1285 | # title: "Summary size limit" |
| 1286 | # description: "Determines if a summary is less than 100 chars" |
| 1287 | # expression: "document.summary.size() < 100" |
| 1288 | # |
| 1289 | # Example (Equality): |
| 1290 | # |
| 1291 | # title: "Requestor is owner" |
| 1292 | # description: "Determines if requestor is the document owner" |
| 1293 | # expression: "document.owner == request.auth.claims.email" |
| 1294 | # |
| 1295 | # Example (Logic): |
| 1296 | # |
| 1297 | # title: "Public documents" |
| 1298 | # description: "Determine whether the document should be publicly visible" |
| 1299 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 1300 | # |
| 1301 | # Example (Data Manipulation): |
| 1302 | # |
| 1303 | # title: "Notification string" |
| 1304 | # description: "Create a notification string with a timestamp." |
| 1305 | # expression: "'New message received at ' + string(document.create_time)" |
| 1306 | # |
| 1307 | # The exact variables and functions that may be referenced within an expression |
| 1308 | # are determined by the service that evaluates it. See the service |
| 1309 | # documentation for additional information. |
| 1310 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1311 | # syntax. |
| 1312 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1313 | # describes the expression, e.g. when hovered over it in a UI. |
| 1314 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1315 | # reporting, e.g. a file name and a position in the file. |
| 1316 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 1317 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1318 | # expression. |
| 1319 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1320 | }, |
| 1321 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1322 | "version": 42, # Specifies the format of the policy. |
| 1323 | # |
| 1324 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1325 | # are rejected. |
| 1326 | # |
| 1327 | # Any operation that affects conditional role bindings must specify version |
| 1328 | # `3`. This requirement applies to the following operations: |
| 1329 | # |
| 1330 | # * Getting a policy that includes a conditional role binding |
| 1331 | # * Adding a conditional role binding to a policy |
| 1332 | # * Changing a conditional role binding in a policy |
| 1333 | # * Removing any role binding, with or without a condition, from a policy |
| 1334 | # that includes conditions |
| 1335 | # |
| 1336 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1337 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1338 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1339 | # the conditions in the version `3` policy are lost. |
| 1340 | # |
| 1341 | # If a policy does not include any conditions, operations on that policy may |
| 1342 | # specify any valid version or leave the field unset. |
| 1343 | # |
| 1344 | # To learn which resources support conditions in their IAM policies, see the |
| 1345 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1346 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1347 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1348 | # It is strongly suggested that systems make use of the `etag` in the |
| 1349 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1350 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1351 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1352 | # ensure that their change will be applied to the same version of the policy. |
| 1353 | # |
| 1354 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1355 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1356 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1357 | # the conditions in the version `3` policy are lost. |
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> |