Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="pubsub_v1.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1.projects.html">projects</a> . <a href="pubsub_v1.projects.snapshots.html">snapshots</a></h1> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 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="#create">create(name, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 79 | <p class="firstline">Creates a snapshot from the requested subscription. Snapshots are used in</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#delete">delete(snapshot, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Removes an existing snapshot. Snapshots are used in</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(snapshot, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Gets the configuration details of a snapshot. Snapshots are used in</p> |
| 86 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 87 | <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 88 | <p class="firstline">Gets the access control policy for a resource.</p> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 89 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 90 | <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Lists the existing snapshots. Snapshots are used in</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 94 | <p class="firstline">Retrieves the next page of results.</p> |
| 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 96 | <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Updates an existing snapshot. Snapshots are used in</p> |
| 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 99 | <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 100 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any</p> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 101 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 102 | <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 103 | <p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
| 104 | <h3>Method Details</h3> |
| 105 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 106 | <code class="details" id="create">create(name, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 107 | <pre>Creates a snapshot from the requested subscription. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 108 | <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 109 | operations, which allow |
| 110 | you to manage message acknowledgments in bulk. That is, you can set the |
| 111 | acknowledgment state of messages in an existing subscription to the state |
| 112 | captured by a snapshot. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 113 | <br><br>If the snapshot already exists, returns `ALREADY_EXISTS`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 114 | If the requested subscription doesn't exist, returns `NOT_FOUND`. |
| 115 | If the backlog in the subscription is too old -- and the resulting snapshot |
| 116 | would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. |
| 117 | See also the `Snapshot.expire_time` field. If the name is not provided in |
| 118 | the request, the server will assign a random |
| 119 | name for this snapshot on the same project as the subscription, conforming |
| 120 | to the |
| 121 | [resource name |
| 122 | format](https://cloud.google.com/pubsub/docs/admin#resource_names). The |
| 123 | generated name is populated in the returned Snapshot object. Note that for |
| 124 | REST API requests, you must specify a name in the request. |
| 125 | |
| 126 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 127 | name: string, Required. User-provided name for this snapshot. If the name is not provided in the |
| 128 | request, the server will assign a random name for this snapshot on the same |
| 129 | project as the subscription. Note that for REST API requests, you must |
| 130 | specify a name. See the <a |
| 131 | href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource |
| 132 | name rules</a>. Format is `projects/{project}/snapshots/{snap}`. (required) |
| 133 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 134 | The object takes the form of: |
| 135 | |
| 136 | { # Request for the `CreateSnapshot` method. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 137 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 138 | # managing labels</a>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 139 | "a_key": "A String", |
| 140 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 141 | "subscription": "A String", # Required. The subscription whose backlog the snapshot retains. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 142 | # Specifically, the created snapshot is guaranteed to retain: |
| 143 | # (a) The existing backlog on the subscription. More precisely, this is |
| 144 | # defined as the messages in the subscription's backlog that are |
| 145 | # unacknowledged upon the successful completion of the |
| 146 | # `CreateSnapshot` request; as well as: |
| 147 | # (b) Any messages published to the subscription's topic following the |
| 148 | # successful completion of the CreateSnapshot request. |
| 149 | # Format is `projects/{project}/subscriptions/{sub}`. |
| 150 | } |
| 151 | |
| 152 | x__xgafv: string, V1 error format. |
| 153 | Allowed values |
| 154 | 1 - v1 error format |
| 155 | 2 - v2 error format |
| 156 | |
| 157 | Returns: |
| 158 | An object of the form: |
| 159 | |
| 160 | { # A snapshot resource. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 161 | # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 162 | # operations, which allow |
| 163 | # you to manage message acknowledgments in bulk. That is, you can set the |
| 164 | # acknowledgment state of messages in an existing subscription to the state |
| 165 | # captured by a snapshot. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 166 | "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. |
| 167 | # A newly-created snapshot expires no later than 7 days from the time of its |
| 168 | # creation. Its exact lifetime is determined at creation by the existing |
| 169 | # backlog in the source subscription. Specifically, the lifetime of the |
| 170 | # snapshot is `7 days - (age of oldest unacked message in the subscription)`. |
| 171 | # For example, consider a subscription whose oldest unacked message is 3 days |
| 172 | # old. If a snapshot is created from this subscription, the snapshot -- which |
| 173 | # will always capture this 3-day-old backlog as long as the snapshot |
| 174 | # exists -- will expire in 4 days. The service will refuse to create a |
| 175 | # snapshot that would expire in less than 1 hour after creation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 176 | "topic": "A String", # The name of the topic from which this snapshot is retaining messages. |
| 177 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 178 | # managing labels</a>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 179 | "a_key": "A String", |
| 180 | }, |
| 181 | "name": "A String", # The name of the snapshot. |
| 182 | }</pre> |
| 183 | </div> |
| 184 | |
| 185 | <div class="method"> |
| 186 | <code class="details" id="delete">delete(snapshot, x__xgafv=None)</code> |
| 187 | <pre>Removes an existing snapshot. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 188 | <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 189 | operations, which allow |
| 190 | you to manage message acknowledgments in bulk. That is, you can set the |
| 191 | acknowledgment state of messages in an existing subscription to the state |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 192 | captured by a snapshot.<br><br> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 193 | When the snapshot is deleted, all messages retained in the snapshot |
| 194 | are immediately dropped. After a snapshot is deleted, a new one may be |
| 195 | created with the same name, but the new one has no association with the old |
| 196 | snapshot or its subscription, unless the same subscription is specified. |
| 197 | |
| 198 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 199 | snapshot: string, Required. The name of the snapshot to delete. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 200 | Format is `projects/{project}/snapshots/{snap}`. (required) |
| 201 | x__xgafv: string, V1 error format. |
| 202 | Allowed values |
| 203 | 1 - v1 error format |
| 204 | 2 - v2 error format |
| 205 | |
| 206 | Returns: |
| 207 | An object of the form: |
| 208 | |
| 209 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 210 | # empty messages in your APIs. A typical example is to use it as the request |
| 211 | # or the response type of an API method. For instance: |
| 212 | # |
| 213 | # service Foo { |
| 214 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 215 | # } |
| 216 | # |
| 217 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 218 | }</pre> |
| 219 | </div> |
| 220 | |
| 221 | <div class="method"> |
| 222 | <code class="details" id="get">get(snapshot, x__xgafv=None)</code> |
| 223 | <pre>Gets the configuration details of a snapshot. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 224 | <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 225 | operations, which allow you to manage message acknowledgments in bulk. That |
| 226 | is, you can set the acknowledgment state of messages in an existing |
| 227 | subscription to the state captured by a snapshot. |
| 228 | |
| 229 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 230 | snapshot: string, Required. The name of the snapshot to get. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 231 | Format is `projects/{project}/snapshots/{snap}`. (required) |
| 232 | x__xgafv: string, V1 error format. |
| 233 | Allowed values |
| 234 | 1 - v1 error format |
| 235 | 2 - v2 error format |
| 236 | |
| 237 | Returns: |
| 238 | An object of the form: |
| 239 | |
| 240 | { # A snapshot resource. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 241 | # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 242 | # operations, which allow |
| 243 | # you to manage message acknowledgments in bulk. That is, you can set the |
| 244 | # acknowledgment state of messages in an existing subscription to the state |
| 245 | # captured by a snapshot. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 246 | "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. |
| 247 | # A newly-created snapshot expires no later than 7 days from the time of its |
| 248 | # creation. Its exact lifetime is determined at creation by the existing |
| 249 | # backlog in the source subscription. Specifically, the lifetime of the |
| 250 | # snapshot is `7 days - (age of oldest unacked message in the subscription)`. |
| 251 | # For example, consider a subscription whose oldest unacked message is 3 days |
| 252 | # old. If a snapshot is created from this subscription, the snapshot -- which |
| 253 | # will always capture this 3-day-old backlog as long as the snapshot |
| 254 | # exists -- will expire in 4 days. The service will refuse to create a |
| 255 | # snapshot that would expire in less than 1 hour after creation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 256 | "topic": "A String", # The name of the topic from which this snapshot is retaining messages. |
| 257 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 258 | # managing labels</a>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 259 | "a_key": "A String", |
| 260 | }, |
| 261 | "name": "A String", # The name of the snapshot. |
| 262 | }</pre> |
| 263 | </div> |
| 264 | |
| 265 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 266 | <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 267 | <pre>Gets the access control policy for a resource. |
| 268 | Returns an empty policy if the resource exists and does not have a policy |
| 269 | set. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 270 | |
| 271 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 272 | resource: string, REQUIRED: The resource for which the policy is being requested. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 273 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 274 | options_requestedPolicyVersion: integer, Optional. The policy format version to be returned. |
| 275 | |
| 276 | Valid values are 0, 1, and 3. Requests specifying an invalid value will be |
| 277 | rejected. |
| 278 | |
| 279 | Requests for policies with any conditional bindings must specify version 3. |
| 280 | Policies without any conditional bindings may specify any valid value or |
| 281 | leave the field unset. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 282 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 283 | Allowed values |
| 284 | 1 - v1 error format |
| 285 | 2 - v2 error format |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 286 | |
| 287 | Returns: |
| 288 | An object of the form: |
| 289 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 290 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 291 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 292 | # |
| 293 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 294 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 295 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 296 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 297 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 298 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 299 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 300 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 301 | # expression that allows access to a resource only if the expression evaluates |
| 302 | # to `true`. A condition can add constraints based on attributes of the |
| 303 | # request, the resource, or both. |
| 304 | # |
| 305 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 306 | # |
| 307 | # { |
| 308 | # "bindings": [ |
| 309 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 310 | # "role": "roles/resourcemanager.organizationAdmin", |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 311 | # "members": [ |
| 312 | # "user:mike@example.com", |
| 313 | # "group:admins@example.com", |
| 314 | # "domain:google.com", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 315 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 316 | # ] |
| 317 | # }, |
| 318 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 319 | # "role": "roles/resourcemanager.organizationViewer", |
| 320 | # "members": ["user:eve@example.com"], |
| 321 | # "condition": { |
| 322 | # "title": "expirable access", |
| 323 | # "description": "Does not grant access after Sep 2020", |
| 324 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 325 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 326 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 327 | # ], |
| 328 | # "etag": "BwWWja0YfJA=", |
| 329 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 330 | # } |
| 331 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 332 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 333 | # |
| 334 | # bindings: |
| 335 | # - members: |
| 336 | # - user:mike@example.com |
| 337 | # - group:admins@example.com |
| 338 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 339 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 340 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 341 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 342 | # - user:eve@example.com |
| 343 | # role: roles/resourcemanager.organizationViewer |
| 344 | # condition: |
| 345 | # title: expirable access |
| 346 | # description: Does not grant access after Sep 2020 |
| 347 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
| 348 | # - etag: BwWWja0YfJA= |
| 349 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 350 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 351 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 352 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
| 353 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 354 | # `condition` that determines how and when the `bindings` are applied. Each |
| 355 | # of the `bindings` must contain at least one member. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 356 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 357 | "role": "A String", # Role that is assigned to `members`. |
| 358 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 359 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 360 | # `members` can have the following values: |
| 361 | # |
| 362 | # * `allUsers`: A special identifier that represents anyone who is |
| 363 | # on the internet; with or without a Google account. |
| 364 | # |
| 365 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 366 | # who is authenticated with a Google account or a service account. |
| 367 | # |
| 368 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 369 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 370 | # |
| 371 | # |
| 372 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 373 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 374 | # |
| 375 | # * `group:{emailid}`: An email address that represents a Google group. |
| 376 | # For example, `admins@example.com`. |
| 377 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 378 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 379 | # identifier) representing a user that has been recently deleted. For |
| 380 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 381 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 382 | # retains the role in the binding. |
| 383 | # |
| 384 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 385 | # unique identifier) representing a service account that has been recently |
| 386 | # deleted. For example, |
| 387 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 388 | # If the service account is undeleted, this value reverts to |
| 389 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 390 | # role in the binding. |
| 391 | # |
| 392 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 393 | # identifier) representing a Google group that has been recently |
| 394 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 395 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 396 | # recovered group retains the role in the binding. |
| 397 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 398 | # |
| 399 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 400 | # users of that domain. For example, `google.com` or `example.com`. |
| 401 | # |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 402 | "A String", |
| 403 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 404 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 405 | # NOTE: An unsatisfied condition will not allow user access via current |
| 406 | # binding. Different bindings, including their conditions, are examined |
| 407 | # independently. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 408 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 409 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 410 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 411 | # Example (Comparison): |
| 412 | # |
| 413 | # title: "Summary size limit" |
| 414 | # description: "Determines if a summary is less than 100 chars" |
| 415 | # expression: "document.summary.size() < 100" |
| 416 | # |
| 417 | # Example (Equality): |
| 418 | # |
| 419 | # title: "Requestor is owner" |
| 420 | # description: "Determines if requestor is the document owner" |
| 421 | # expression: "document.owner == request.auth.claims.email" |
| 422 | # |
| 423 | # Example (Logic): |
| 424 | # |
| 425 | # title: "Public documents" |
| 426 | # description: "Determine whether the document should be publicly visible" |
| 427 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 428 | # |
| 429 | # Example (Data Manipulation): |
| 430 | # |
| 431 | # title: "Notification string" |
| 432 | # description: "Create a notification string with a timestamp." |
| 433 | # expression: "'New message received at ' + string(document.create_time)" |
| 434 | # |
| 435 | # The exact variables and functions that may be referenced within an expression |
| 436 | # are determined by the service that evaluates it. See the service |
| 437 | # documentation for additional information. |
| 438 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 439 | # describes the expression, e.g. when hovered over it in a UI. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 440 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 441 | # syntax. |
| 442 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 443 | # reporting, e.g. a file name and a position in the file. |
| 444 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 445 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 446 | # expression. |
| 447 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 448 | }, |
| 449 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 450 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 451 | # prevent simultaneous updates of a policy from overwriting each other. |
| 452 | # It is strongly suggested that systems make use of the `etag` in the |
| 453 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 454 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 455 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 456 | # ensure that their change will be applied to the same version of the policy. |
| 457 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 458 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 459 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 460 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 461 | # the conditions in the version `3` policy are lost. |
| 462 | "version": 42, # Specifies the format of the policy. |
| 463 | # |
| 464 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 465 | # are rejected. |
| 466 | # |
| 467 | # Any operation that affects conditional role bindings must specify version |
| 468 | # `3`. This requirement applies to the following operations: |
| 469 | # |
| 470 | # * Getting a policy that includes a conditional role binding |
| 471 | # * Adding a conditional role binding to a policy |
| 472 | # * Changing a conditional role binding in a policy |
| 473 | # * Removing any role binding, with or without a condition, from a policy |
| 474 | # that includes conditions |
| 475 | # |
| 476 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 477 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 478 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 479 | # the conditions in the version `3` policy are lost. |
| 480 | # |
| 481 | # If a policy does not include any conditions, operations on that policy may |
| 482 | # specify any valid version or leave the field unset. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 483 | }</pre> |
| 484 | </div> |
| 485 | |
| 486 | <div class="method"> |
| 487 | <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code> |
| 488 | <pre>Lists the existing snapshots. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 489 | <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 490 | operations, which allow |
| 491 | you to manage message acknowledgments in bulk. That is, you can set the |
| 492 | acknowledgment state of messages in an existing subscription to the state |
| 493 | captured by a snapshot. |
| 494 | |
| 495 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 496 | project: string, Required. The name of the project in which to list snapshots. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 497 | Format is `projects/{project-id}`. (required) |
| 498 | pageSize: integer, Maximum number of snapshots to return. |
| 499 | pageToken: string, The value returned by the last `ListSnapshotsResponse`; indicates that this |
| 500 | is a continuation of a prior `ListSnapshots` call, and that the system |
| 501 | should return the next page of data. |
| 502 | x__xgafv: string, V1 error format. |
| 503 | Allowed values |
| 504 | 1 - v1 error format |
| 505 | 2 - v2 error format |
| 506 | |
| 507 | Returns: |
| 508 | An object of the form: |
| 509 | |
| 510 | { # Response for the `ListSnapshots` method. |
| 511 | "nextPageToken": "A String", # If not empty, indicates that there may be more snapshot that match the |
| 512 | # request; this value should be passed in a new `ListSnapshotsRequest`. |
| 513 | "snapshots": [ # The resulting snapshots. |
| 514 | { # A snapshot resource. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 515 | # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 516 | # operations, which allow |
| 517 | # you to manage message acknowledgments in bulk. That is, you can set the |
| 518 | # acknowledgment state of messages in an existing subscription to the state |
| 519 | # captured by a snapshot. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 520 | "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. |
| 521 | # A newly-created snapshot expires no later than 7 days from the time of its |
| 522 | # creation. Its exact lifetime is determined at creation by the existing |
| 523 | # backlog in the source subscription. Specifically, the lifetime of the |
| 524 | # snapshot is `7 days - (age of oldest unacked message in the subscription)`. |
| 525 | # For example, consider a subscription whose oldest unacked message is 3 days |
| 526 | # old. If a snapshot is created from this subscription, the snapshot -- which |
| 527 | # will always capture this 3-day-old backlog as long as the snapshot |
| 528 | # exists -- will expire in 4 days. The service will refuse to create a |
| 529 | # snapshot that would expire in less than 1 hour after creation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 530 | "topic": "A String", # The name of the topic from which this snapshot is retaining messages. |
| 531 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 532 | # managing labels</a>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 533 | "a_key": "A String", |
| 534 | }, |
| 535 | "name": "A String", # The name of the snapshot. |
| 536 | }, |
| 537 | ], |
| 538 | }</pre> |
| 539 | </div> |
| 540 | |
| 541 | <div class="method"> |
| 542 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 543 | <pre>Retrieves the next page of results. |
| 544 | |
| 545 | Args: |
| 546 | previous_request: The request for the previous page. (required) |
| 547 | previous_response: The response from the request for the previous page. (required) |
| 548 | |
| 549 | Returns: |
| 550 | A request object that you can call 'execute()' on to request the next |
| 551 | page. Returns None if there are no more items in the collection. |
| 552 | </pre> |
| 553 | </div> |
| 554 | |
| 555 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 556 | <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 557 | <pre>Updates an existing snapshot. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 558 | <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 559 | operations, which allow |
| 560 | you to manage message acknowledgments in bulk. That is, you can set the |
| 561 | acknowledgment state of messages in an existing subscription to the state |
| 562 | captured by a snapshot. |
| 563 | |
| 564 | Args: |
| 565 | name: string, The name of the snapshot. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 566 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 567 | The object takes the form of: |
| 568 | |
| 569 | { # Request for the UpdateSnapshot method. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 570 | "snapshot": { # A snapshot resource. Snapshots are used in # Required. The updated snapshot object. |
| 571 | # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 572 | # operations, which allow |
| 573 | # you to manage message acknowledgments in bulk. That is, you can set the |
| 574 | # acknowledgment state of messages in an existing subscription to the state |
| 575 | # captured by a snapshot. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 576 | "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. |
| 577 | # A newly-created snapshot expires no later than 7 days from the time of its |
| 578 | # creation. Its exact lifetime is determined at creation by the existing |
| 579 | # backlog in the source subscription. Specifically, the lifetime of the |
| 580 | # snapshot is `7 days - (age of oldest unacked message in the subscription)`. |
| 581 | # For example, consider a subscription whose oldest unacked message is 3 days |
| 582 | # old. If a snapshot is created from this subscription, the snapshot -- which |
| 583 | # will always capture this 3-day-old backlog as long as the snapshot |
| 584 | # exists -- will expire in 4 days. The service will refuse to create a |
| 585 | # snapshot that would expire in less than 1 hour after creation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 586 | "topic": "A String", # The name of the topic from which this snapshot is retaining messages. |
| 587 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 588 | # managing labels</a>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 589 | "a_key": "A String", |
| 590 | }, |
| 591 | "name": "A String", # The name of the snapshot. |
| 592 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 593 | "updateMask": "A String", # Required. Indicates which fields in the provided snapshot to update. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 594 | # Must be specified and non-empty. |
| 595 | } |
| 596 | |
| 597 | x__xgafv: string, V1 error format. |
| 598 | Allowed values |
| 599 | 1 - v1 error format |
| 600 | 2 - v2 error format |
| 601 | |
| 602 | Returns: |
| 603 | An object of the form: |
| 604 | |
| 605 | { # A snapshot resource. Snapshots are used in |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 606 | # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 607 | # operations, which allow |
| 608 | # you to manage message acknowledgments in bulk. That is, you can set the |
| 609 | # acknowledgment state of messages in an existing subscription to the state |
| 610 | # captured by a snapshot. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 611 | "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. |
| 612 | # A newly-created snapshot expires no later than 7 days from the time of its |
| 613 | # creation. Its exact lifetime is determined at creation by the existing |
| 614 | # backlog in the source subscription. Specifically, the lifetime of the |
| 615 | # snapshot is `7 days - (age of oldest unacked message in the subscription)`. |
| 616 | # For example, consider a subscription whose oldest unacked message is 3 days |
| 617 | # old. If a snapshot is created from this subscription, the snapshot -- which |
| 618 | # will always capture this 3-day-old backlog as long as the snapshot |
| 619 | # exists -- will expire in 4 days. The service will refuse to create a |
| 620 | # snapshot that would expire in less than 1 hour after creation. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 621 | "topic": "A String", # The name of the topic from which this snapshot is retaining messages. |
| 622 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 623 | # managing labels</a>. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 624 | "a_key": "A String", |
| 625 | }, |
| 626 | "name": "A String", # The name of the snapshot. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 627 | }</pre> |
| 628 | </div> |
| 629 | |
| 630 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 631 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 632 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 633 | existing policy. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 634 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 635 | Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED |
| 636 | |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 637 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 638 | resource: string, REQUIRED: The resource for which the policy is being specified. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 639 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 640 | body: object, The request body. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 641 | The object takes the form of: |
| 642 | |
| 643 | { # Request message for `SetIamPolicy` method. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 644 | "policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 645 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 646 | # valid policy but certain Cloud Platform services (such as Projects) |
| 647 | # might reject them. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 648 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 649 | # |
| 650 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 651 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 652 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 653 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 654 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 655 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 656 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 657 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 658 | # expression that allows access to a resource only if the expression evaluates |
| 659 | # to `true`. A condition can add constraints based on attributes of the |
| 660 | # request, the resource, or both. |
| 661 | # |
| 662 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 663 | # |
| 664 | # { |
| 665 | # "bindings": [ |
| 666 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 667 | # "role": "roles/resourcemanager.organizationAdmin", |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 668 | # "members": [ |
| 669 | # "user:mike@example.com", |
| 670 | # "group:admins@example.com", |
| 671 | # "domain:google.com", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 672 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 673 | # ] |
| 674 | # }, |
| 675 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 676 | # "role": "roles/resourcemanager.organizationViewer", |
| 677 | # "members": ["user:eve@example.com"], |
| 678 | # "condition": { |
| 679 | # "title": "expirable access", |
| 680 | # "description": "Does not grant access after Sep 2020", |
| 681 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 682 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 683 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 684 | # ], |
| 685 | # "etag": "BwWWja0YfJA=", |
| 686 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 687 | # } |
| 688 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 689 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 690 | # |
| 691 | # bindings: |
| 692 | # - members: |
| 693 | # - user:mike@example.com |
| 694 | # - group:admins@example.com |
| 695 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 696 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 697 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 698 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 699 | # - user:eve@example.com |
| 700 | # role: roles/resourcemanager.organizationViewer |
| 701 | # condition: |
| 702 | # title: expirable access |
| 703 | # description: Does not grant access after Sep 2020 |
| 704 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
| 705 | # - etag: BwWWja0YfJA= |
| 706 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 707 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 708 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 709 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
| 710 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 711 | # `condition` that determines how and when the `bindings` are applied. Each |
| 712 | # of the `bindings` must contain at least one member. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 713 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 714 | "role": "A String", # Role that is assigned to `members`. |
| 715 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 716 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 717 | # `members` can have the following values: |
| 718 | # |
| 719 | # * `allUsers`: A special identifier that represents anyone who is |
| 720 | # on the internet; with or without a Google account. |
| 721 | # |
| 722 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 723 | # who is authenticated with a Google account or a service account. |
| 724 | # |
| 725 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 726 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 727 | # |
| 728 | # |
| 729 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 730 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 731 | # |
| 732 | # * `group:{emailid}`: An email address that represents a Google group. |
| 733 | # For example, `admins@example.com`. |
| 734 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 735 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 736 | # identifier) representing a user that has been recently deleted. For |
| 737 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 738 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 739 | # retains the role in the binding. |
| 740 | # |
| 741 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 742 | # unique identifier) representing a service account that has been recently |
| 743 | # deleted. For example, |
| 744 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 745 | # If the service account is undeleted, this value reverts to |
| 746 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 747 | # role in the binding. |
| 748 | # |
| 749 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 750 | # identifier) representing a Google group that has been recently |
| 751 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 752 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 753 | # recovered group retains the role in the binding. |
| 754 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 755 | # |
| 756 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 757 | # users of that domain. For example, `google.com` or `example.com`. |
| 758 | # |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 759 | "A String", |
| 760 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 761 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 762 | # NOTE: An unsatisfied condition will not allow user access via current |
| 763 | # binding. Different bindings, including their conditions, are examined |
| 764 | # independently. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 765 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 766 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 767 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 768 | # Example (Comparison): |
| 769 | # |
| 770 | # title: "Summary size limit" |
| 771 | # description: "Determines if a summary is less than 100 chars" |
| 772 | # expression: "document.summary.size() < 100" |
| 773 | # |
| 774 | # Example (Equality): |
| 775 | # |
| 776 | # title: "Requestor is owner" |
| 777 | # description: "Determines if requestor is the document owner" |
| 778 | # expression: "document.owner == request.auth.claims.email" |
| 779 | # |
| 780 | # Example (Logic): |
| 781 | # |
| 782 | # title: "Public documents" |
| 783 | # description: "Determine whether the document should be publicly visible" |
| 784 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 785 | # |
| 786 | # Example (Data Manipulation): |
| 787 | # |
| 788 | # title: "Notification string" |
| 789 | # description: "Create a notification string with a timestamp." |
| 790 | # expression: "'New message received at ' + string(document.create_time)" |
| 791 | # |
| 792 | # The exact variables and functions that may be referenced within an expression |
| 793 | # are determined by the service that evaluates it. See the service |
| 794 | # documentation for additional information. |
| 795 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 796 | # describes the expression, e.g. when hovered over it in a UI. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 797 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 798 | # syntax. |
| 799 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 800 | # reporting, e.g. a file name and a position in the file. |
| 801 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 802 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 803 | # expression. |
| 804 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 805 | }, |
| 806 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 807 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 808 | # prevent simultaneous updates of a policy from overwriting each other. |
| 809 | # It is strongly suggested that systems make use of the `etag` in the |
| 810 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 811 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 812 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 813 | # ensure that their change will be applied to the same version of the policy. |
| 814 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 815 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 816 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 817 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 818 | # the conditions in the version `3` policy are lost. |
| 819 | "version": 42, # Specifies the format of the policy. |
| 820 | # |
| 821 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 822 | # are rejected. |
| 823 | # |
| 824 | # Any operation that affects conditional role bindings must specify version |
| 825 | # `3`. This requirement applies to the following operations: |
| 826 | # |
| 827 | # * Getting a policy that includes a conditional role binding |
| 828 | # * Adding a conditional role binding to a policy |
| 829 | # * Changing a conditional role binding in a policy |
| 830 | # * Removing any role binding, with or without a condition, from a policy |
| 831 | # that includes conditions |
| 832 | # |
| 833 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 834 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 835 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 836 | # the conditions in the version `3` policy are lost. |
| 837 | # |
| 838 | # If a policy does not include any conditions, operations on that policy may |
| 839 | # specify any valid version or leave the field unset. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 840 | }, |
| 841 | } |
| 842 | |
| 843 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 844 | Allowed values |
| 845 | 1 - v1 error format |
| 846 | 2 - v2 error format |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 847 | |
| 848 | Returns: |
| 849 | An object of the form: |
| 850 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 851 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 852 | # controls for Google Cloud resources. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 853 | # |
| 854 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 855 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 856 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 857 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 858 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 859 | # custom role. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 860 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 861 | # Optionally, a `binding` can specify a `condition`, which is a logical |
| 862 | # expression that allows access to a resource only if the expression evaluates |
| 863 | # to `true`. A condition can add constraints based on attributes of the |
| 864 | # request, the resource, or both. |
| 865 | # |
| 866 | # **JSON example:** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 867 | # |
| 868 | # { |
| 869 | # "bindings": [ |
| 870 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 871 | # "role": "roles/resourcemanager.organizationAdmin", |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 872 | # "members": [ |
| 873 | # "user:mike@example.com", |
| 874 | # "group:admins@example.com", |
| 875 | # "domain:google.com", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 876 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 877 | # ] |
| 878 | # }, |
| 879 | # { |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 880 | # "role": "roles/resourcemanager.organizationViewer", |
| 881 | # "members": ["user:eve@example.com"], |
| 882 | # "condition": { |
| 883 | # "title": "expirable access", |
| 884 | # "description": "Does not grant access after Sep 2020", |
| 885 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 886 | # } |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 887 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 888 | # ], |
| 889 | # "etag": "BwWWja0YfJA=", |
| 890 | # "version": 3 |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 891 | # } |
| 892 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 893 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 894 | # |
| 895 | # bindings: |
| 896 | # - members: |
| 897 | # - user:mike@example.com |
| 898 | # - group:admins@example.com |
| 899 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 900 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 901 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 902 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 903 | # - user:eve@example.com |
| 904 | # role: roles/resourcemanager.organizationViewer |
| 905 | # condition: |
| 906 | # title: expirable access |
| 907 | # description: Does not grant access after Sep 2020 |
| 908 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
| 909 | # - etag: BwWWja0YfJA= |
| 910 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 911 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 912 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 913 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
| 914 | "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a |
| 915 | # `condition` that determines how and when the `bindings` are applied. Each |
| 916 | # of the `bindings` must contain at least one member. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 917 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 918 | "role": "A String", # Role that is assigned to `members`. |
| 919 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 920 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 921 | # `members` can have the following values: |
| 922 | # |
| 923 | # * `allUsers`: A special identifier that represents anyone who is |
| 924 | # on the internet; with or without a Google account. |
| 925 | # |
| 926 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 927 | # who is authenticated with a Google account or a service account. |
| 928 | # |
| 929 | # * `user:{emailid}`: An email address that represents a specific Google |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 930 | # account. For example, `alice@example.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 931 | # |
| 932 | # |
| 933 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 934 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 935 | # |
| 936 | # * `group:{emailid}`: An email address that represents a Google group. |
| 937 | # For example, `admins@example.com`. |
| 938 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 939 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 940 | # identifier) representing a user that has been recently deleted. For |
| 941 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 942 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 943 | # retains the role in the binding. |
| 944 | # |
| 945 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 946 | # unique identifier) representing a service account that has been recently |
| 947 | # deleted. For example, |
| 948 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 949 | # If the service account is undeleted, this value reverts to |
| 950 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 951 | # role in the binding. |
| 952 | # |
| 953 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 954 | # identifier) representing a Google group that has been recently |
| 955 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 956 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 957 | # recovered group retains the role in the binding. |
| 958 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 959 | # |
| 960 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 961 | # users of that domain. For example, `google.com` or `example.com`. |
| 962 | # |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 963 | "A String", |
| 964 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 965 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 966 | # NOTE: An unsatisfied condition will not allow user access via current |
| 967 | # binding. Different bindings, including their conditions, are examined |
| 968 | # independently. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 969 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 970 | # are documented at https://github.com/google/cel-spec. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 971 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 972 | # Example (Comparison): |
| 973 | # |
| 974 | # title: "Summary size limit" |
| 975 | # description: "Determines if a summary is less than 100 chars" |
| 976 | # expression: "document.summary.size() < 100" |
| 977 | # |
| 978 | # Example (Equality): |
| 979 | # |
| 980 | # title: "Requestor is owner" |
| 981 | # description: "Determines if requestor is the document owner" |
| 982 | # expression: "document.owner == request.auth.claims.email" |
| 983 | # |
| 984 | # Example (Logic): |
| 985 | # |
| 986 | # title: "Public documents" |
| 987 | # description: "Determine whether the document should be publicly visible" |
| 988 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 989 | # |
| 990 | # Example (Data Manipulation): |
| 991 | # |
| 992 | # title: "Notification string" |
| 993 | # description: "Create a notification string with a timestamp." |
| 994 | # expression: "'New message received at ' + string(document.create_time)" |
| 995 | # |
| 996 | # The exact variables and functions that may be referenced within an expression |
| 997 | # are determined by the service that evaluates it. See the service |
| 998 | # documentation for additional information. |
| 999 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1000 | # describes the expression, e.g. when hovered over it in a UI. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1001 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1002 | # syntax. |
| 1003 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1004 | # reporting, e.g. a file name and a position in the file. |
| 1005 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1006 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1007 | # expression. |
| 1008 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1009 | }, |
| 1010 | ], |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1011 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 1012 | # prevent simultaneous updates of a policy from overwriting each other. |
| 1013 | # It is strongly suggested that systems make use of the `etag` in the |
| 1014 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 1015 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1016 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 1017 | # ensure that their change will be applied to the same version of the policy. |
| 1018 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1019 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1020 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1021 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1022 | # the conditions in the version `3` policy are lost. |
| 1023 | "version": 42, # Specifies the format of the policy. |
| 1024 | # |
| 1025 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 1026 | # are rejected. |
| 1027 | # |
| 1028 | # Any operation that affects conditional role bindings must specify version |
| 1029 | # `3`. This requirement applies to the following operations: |
| 1030 | # |
| 1031 | # * Getting a policy that includes a conditional role binding |
| 1032 | # * Adding a conditional role binding to a policy |
| 1033 | # * Changing a conditional role binding in a policy |
| 1034 | # * Removing any role binding, with or without a condition, from a policy |
| 1035 | # that includes conditions |
| 1036 | # |
| 1037 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 1038 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 1039 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 1040 | # the conditions in the version `3` policy are lost. |
| 1041 | # |
| 1042 | # If a policy does not include any conditions, operations on that policy may |
| 1043 | # specify any valid version or leave the field unset. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1044 | }</pre> |
| 1045 | </div> |
| 1046 | |
| 1047 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1048 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1049 | <pre>Returns permissions that a caller has on the specified resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1050 | If the resource does not exist, this will return an empty set of |
| 1051 | permissions, not a NOT_FOUND error. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1052 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1053 | Note: This operation is designed to be used for building permission-aware |
| 1054 | UIs and command-line tools, not for authorization checking. This operation |
| 1055 | may "fail open" without warning. |
| 1056 | |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1057 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1058 | resource: string, REQUIRED: The resource for which the policy detail is being requested. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 1059 | See the operation documentation for the appropriate value for this field. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 1060 | body: object, The request body. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1061 | The object takes the form of: |
| 1062 | |
| 1063 | { # Request message for `TestIamPermissions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1064 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 1065 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 1066 | # information see |
| 1067 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1068 | "A String", |
| 1069 | ], |
| 1070 | } |
| 1071 | |
| 1072 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1073 | Allowed values |
| 1074 | 1 - v1 error format |
| 1075 | 2 - v2 error format |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1076 | |
| 1077 | Returns: |
| 1078 | An object of the form: |
| 1079 | |
| 1080 | { # Response message for `TestIamPermissions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 1081 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
| 1082 | # allowed. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 1083 | "A String", |
| 1084 | ], |
| 1085 | }</pre> |
| 1086 | </div> |
| 1087 | |
| 1088 | </body></html> |