1<html><body> 2<style> 3 4body, 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 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, 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="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> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p> 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"> 87 <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p> 88<p class="firstline">Gets the access control policy for a resource.</p> 89<p class="toc_element"> 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"> 96 <code><a href="#patch">patch(name, body, x__xgafv=None)</a></code></p> 97<p class="firstline">Updates an existing snapshot. Snapshots are used in</p> 98<p class="toc_element"> 99 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p> 100<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p> 101<p class="toc_element"> 102 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p> 103<p class="firstline">Returns permissions that a caller has on the specified resource.</p> 104<h3>Method Details</h3> 105<div class="method"> 106 <code class="details" id="create">create(name, body, x__xgafv=None)</code> 107 <pre>Creates a snapshot from the requested subscription. Snapshots are used in 108<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 109operations, which allow 110you to manage message acknowledgments in bulk. That is, you can set the 111acknowledgment state of messages in an existing subscription to the state 112captured by a snapshot. 113<br><br>If the snapshot already exists, returns `ALREADY_EXISTS`. 114If the requested subscription doesn't exist, returns `NOT_FOUND`. 115If the backlog in the subscription is too old -- and the resulting snapshot 116would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. 117See also the `Snapshot.expire_time` field. If the name is not provided in 118the request, the server will assign a random 119name for this snapshot on the same project as the subscription, conforming 120to the 121[resource name 122format](https://cloud.google.com/pubsub/docs/admin#resource_names). The 123generated name is populated in the returned Snapshot object. Note that for 124REST API requests, you must specify a name in the request. 125 126Args: 127 name: string, Optional user-provided name for this snapshot. 128If the name is not provided in the request, the server will assign a random 129name for this snapshot on the same project as the subscription. 130Note that for REST API requests, you must specify a name. See the 131<a href="https://cloud.google.com/pubsub/docs/admin#resource_names"> 132resource name rules</a>. 133Format is `projects/{project}/snapshots/{snap}`. (required) 134 body: object, The request body. (required) 135 The object takes the form of: 136 137{ # Request for the `CreateSnapshot` method. 138 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and 139 # managing labels</a>. 140 "a_key": "A String", 141 }, 142 "subscription": "A String", # The subscription whose backlog the snapshot retains. 143 # Specifically, the created snapshot is guaranteed to retain: 144 # (a) The existing backlog on the subscription. More precisely, this is 145 # defined as the messages in the subscription's backlog that are 146 # unacknowledged upon the successful completion of the 147 # `CreateSnapshot` request; as well as: 148 # (b) Any messages published to the subscription's topic following the 149 # successful completion of the CreateSnapshot request. 150 # Format is `projects/{project}/subscriptions/{sub}`. 151 } 152 153 x__xgafv: string, V1 error format. 154 Allowed values 155 1 - v1 error format 156 2 - v2 error format 157 158Returns: 159 An object of the form: 160 161 { # A snapshot resource. Snapshots are used in 162 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 163 # operations, which allow 164 # you to manage message acknowledgments in bulk. That is, you can set the 165 # acknowledgment state of messages in an existing subscription to the state 166 # captured by a snapshot. 167 "topic": "A String", # The name of the topic from which this snapshot is retaining messages. 168 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. 169 # A newly-created snapshot expires no later than 7 days from the time of its 170 # creation. Its exact lifetime is determined at creation by the existing 171 # backlog in the source subscription. Specifically, the lifetime of the 172 # snapshot is `7 days - (age of oldest unacked message in the subscription)`. 173 # For example, consider a subscription whose oldest unacked message is 3 days 174 # old. If a snapshot is created from this subscription, the snapshot -- which 175 # will always capture this 3-day-old backlog as long as the snapshot 176 # exists -- will expire in 4 days. The service will refuse to create a 177 # snapshot that would expire in less than 1 hour after creation. 178 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and 179 # managing labels</a>. 180 "a_key": "A String", 181 }, 182 "name": "A String", # The name of the snapshot. 183 }</pre> 184</div> 185 186<div class="method"> 187 <code class="details" id="delete">delete(snapshot, x__xgafv=None)</code> 188 <pre>Removes an existing snapshot. Snapshots are used in 189<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 190operations, which allow 191you to manage message acknowledgments in bulk. That is, you can set the 192acknowledgment state of messages in an existing subscription to the state 193captured by a snapshot.<br><br> 194When the snapshot is deleted, all messages retained in the snapshot 195are immediately dropped. After a snapshot is deleted, a new one may be 196created with the same name, but the new one has no association with the old 197snapshot or its subscription, unless the same subscription is specified. 198 199Args: 200 snapshot: string, The name of the snapshot to delete. 201Format is `projects/{project}/snapshots/{snap}`. (required) 202 x__xgafv: string, V1 error format. 203 Allowed values 204 1 - v1 error format 205 2 - v2 error format 206 207Returns: 208 An object of the form: 209 210 { # A generic empty message that you can re-use to avoid defining duplicated 211 # empty messages in your APIs. A typical example is to use it as the request 212 # or the response type of an API method. For instance: 213 # 214 # service Foo { 215 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 216 # } 217 # 218 # The JSON representation for `Empty` is empty JSON object `{}`. 219 }</pre> 220</div> 221 222<div class="method"> 223 <code class="details" id="get">get(snapshot, x__xgafv=None)</code> 224 <pre>Gets the configuration details of a snapshot. Snapshots are used in 225<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 226operations, which allow you to manage message acknowledgments in bulk. That 227is, you can set the acknowledgment state of messages in an existing 228subscription to the state captured by a snapshot. 229 230Args: 231 snapshot: string, The name of the snapshot to get. 232Format is `projects/{project}/snapshots/{snap}`. (required) 233 x__xgafv: string, V1 error format. 234 Allowed values 235 1 - v1 error format 236 2 - v2 error format 237 238Returns: 239 An object of the form: 240 241 { # A snapshot resource. Snapshots are used in 242 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 243 # operations, which allow 244 # you to manage message acknowledgments in bulk. That is, you can set the 245 # acknowledgment state of messages in an existing subscription to the state 246 # captured by a snapshot. 247 "topic": "A String", # The name of the topic from which this snapshot is retaining messages. 248 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. 249 # A newly-created snapshot expires no later than 7 days from the time of its 250 # creation. Its exact lifetime is determined at creation by the existing 251 # backlog in the source subscription. Specifically, the lifetime of the 252 # snapshot is `7 days - (age of oldest unacked message in the subscription)`. 253 # For example, consider a subscription whose oldest unacked message is 3 days 254 # old. If a snapshot is created from this subscription, the snapshot -- which 255 # will always capture this 3-day-old backlog as long as the snapshot 256 # exists -- will expire in 4 days. The service will refuse to create a 257 # snapshot that would expire in less than 1 hour after creation. 258 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and 259 # managing labels</a>. 260 "a_key": "A String", 261 }, 262 "name": "A String", # The name of the snapshot. 263 }</pre> 264</div> 265 266<div class="method"> 267 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code> 268 <pre>Gets the access control policy for a resource. 269Returns an empty policy if the resource exists and does not have a policy 270set. 271 272Args: 273 resource: string, REQUIRED: The resource for which the policy is being requested. 274See the operation documentation for the appropriate value for this field. (required) 275 x__xgafv: string, V1 error format. 276 Allowed values 277 1 - v1 error format 278 2 - v2 error format 279 280Returns: 281 An object of the form: 282 283 { # Defines an Identity and Access Management (IAM) policy. It is used to 284 # specify access control policies for Cloud Platform resources. 285 # 286 # 287 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of 288 # `members` to a `role`, where the members can be user accounts, Google groups, 289 # Google domains, and service accounts. A `role` is a named list of permissions 290 # defined by IAM. 291 # 292 # **JSON Example** 293 # 294 # { 295 # "bindings": [ 296 # { 297 # "role": "roles/owner", 298 # "members": [ 299 # "user:mike@example.com", 300 # "group:admins@example.com", 301 # "domain:google.com", 302 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 303 # ] 304 # }, 305 # { 306 # "role": "roles/viewer", 307 # "members": ["user:sean@example.com"] 308 # } 309 # ] 310 # } 311 # 312 # **YAML Example** 313 # 314 # bindings: 315 # - members: 316 # - user:mike@example.com 317 # - group:admins@example.com 318 # - domain:google.com 319 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 320 # role: roles/owner 321 # - members: 322 # - user:sean@example.com 323 # role: roles/viewer 324 # 325 # 326 # For a description of IAM and its features, see the 327 # [IAM developer's guide](https://cloud.google.com/iam/docs). 328 "bindings": [ # Associates a list of `members` to a `role`. 329 # `bindings` with no members will result in an error. 330 { # Associates `members` with a `role`. 331 "role": "A String", # Role that is assigned to `members`. 332 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 333 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. 334 # `members` can have the following values: 335 # 336 # * `allUsers`: A special identifier that represents anyone who is 337 # on the internet; with or without a Google account. 338 # 339 # * `allAuthenticatedUsers`: A special identifier that represents anyone 340 # who is authenticated with a Google account or a service account. 341 # 342 # * `user:{emailid}`: An email address that represents a specific Google 343 # account. For example, `alice@gmail.com` . 344 # 345 # 346 # * `serviceAccount:{emailid}`: An email address that represents a service 347 # account. For example, `my-other-app@appspot.gserviceaccount.com`. 348 # 349 # * `group:{emailid}`: An email address that represents a Google group. 350 # For example, `admins@example.com`. 351 # 352 # 353 # * `domain:{domain}`: The G Suite domain (primary) that represents all the 354 # users of that domain. For example, `google.com` or `example.com`. 355 # 356 "A String", 357 ], 358 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. 359 # NOTE: An unsatisfied condition will not allow user access via current 360 # binding. Different bindings, including their conditions, are examined 361 # independently. 362 # 363 # title: "User account presence" 364 # description: "Determines whether the request has a user account" 365 # expression: "size(request.user) > 0" 366 "location": "A String", # An optional string indicating the location of the expression for error 367 # reporting, e.g. a file name and a position in the file. 368 "expression": "A String", # Textual representation of an expression in 369 # Common Expression Language syntax. 370 # 371 # The application context of the containing message determines which 372 # well-known feature set of CEL is supported. 373 "description": "A String", # An optional description of the expression. This is a longer text which 374 # describes the expression, e.g. when hovered over it in a UI. 375 "title": "A String", # An optional title for the expression, i.e. a short string describing 376 # its purpose. This can be used e.g. in UIs which allow to enter the 377 # expression. 378 }, 379 }, 380 ], 381 "version": 42, # Deprecated. 382 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help 383 # prevent simultaneous updates of a policy from overwriting each other. 384 # It is strongly suggested that systems make use of the `etag` in the 385 # read-modify-write cycle to perform policy updates in order to avoid race 386 # conditions: An `etag` is returned in the response to `getIamPolicy`, and 387 # systems are expected to put that etag in the request to `setIamPolicy` to 388 # ensure that their change will be applied to the same version of the policy. 389 # 390 # If no `etag` is provided in the call to `setIamPolicy`, then the existing 391 # policy is overwritten blindly. 392 }</pre> 393</div> 394 395<div class="method"> 396 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code> 397 <pre>Lists the existing snapshots. Snapshots are used in 398<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 399operations, which allow 400you to manage message acknowledgments in bulk. That is, you can set the 401acknowledgment state of messages in an existing subscription to the state 402captured by a snapshot. 403 404Args: 405 project: string, The name of the project in which to list snapshots. 406Format is `projects/{project-id}`. (required) 407 pageSize: integer, Maximum number of snapshots to return. 408 pageToken: string, The value returned by the last `ListSnapshotsResponse`; indicates that this 409is a continuation of a prior `ListSnapshots` call, and that the system 410should return the next page of data. 411 x__xgafv: string, V1 error format. 412 Allowed values 413 1 - v1 error format 414 2 - v2 error format 415 416Returns: 417 An object of the form: 418 419 { # Response for the `ListSnapshots` method. 420 "nextPageToken": "A String", # If not empty, indicates that there may be more snapshot that match the 421 # request; this value should be passed in a new `ListSnapshotsRequest`. 422 "snapshots": [ # The resulting snapshots. 423 { # A snapshot resource. Snapshots are used in 424 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 425 # operations, which allow 426 # you to manage message acknowledgments in bulk. That is, you can set the 427 # acknowledgment state of messages in an existing subscription to the state 428 # captured by a snapshot. 429 "topic": "A String", # The name of the topic from which this snapshot is retaining messages. 430 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. 431 # A newly-created snapshot expires no later than 7 days from the time of its 432 # creation. Its exact lifetime is determined at creation by the existing 433 # backlog in the source subscription. Specifically, the lifetime of the 434 # snapshot is `7 days - (age of oldest unacked message in the subscription)`. 435 # For example, consider a subscription whose oldest unacked message is 3 days 436 # old. If a snapshot is created from this subscription, the snapshot -- which 437 # will always capture this 3-day-old backlog as long as the snapshot 438 # exists -- will expire in 4 days. The service will refuse to create a 439 # snapshot that would expire in less than 1 hour after creation. 440 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and 441 # managing labels</a>. 442 "a_key": "A String", 443 }, 444 "name": "A String", # The name of the snapshot. 445 }, 446 ], 447 }</pre> 448</div> 449 450<div class="method"> 451 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 452 <pre>Retrieves the next page of results. 453 454Args: 455 previous_request: The request for the previous page. (required) 456 previous_response: The response from the request for the previous page. (required) 457 458Returns: 459 A request object that you can call 'execute()' on to request the next 460 page. Returns None if there are no more items in the collection. 461 </pre> 462</div> 463 464<div class="method"> 465 <code class="details" id="patch">patch(name, body, x__xgafv=None)</code> 466 <pre>Updates an existing snapshot. Snapshots are used in 467<a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 468operations, which allow 469you to manage message acknowledgments in bulk. That is, you can set the 470acknowledgment state of messages in an existing subscription to the state 471captured by a snapshot. 472 473Args: 474 name: string, The name of the snapshot. (required) 475 body: object, The request body. (required) 476 The object takes the form of: 477 478{ # Request for the UpdateSnapshot method. 479 "snapshot": { # A snapshot resource. Snapshots are used in # The updated snapshot object. 480 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 481 # operations, which allow 482 # you to manage message acknowledgments in bulk. That is, you can set the 483 # acknowledgment state of messages in an existing subscription to the state 484 # captured by a snapshot. 485 "topic": "A String", # The name of the topic from which this snapshot is retaining messages. 486 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. 487 # A newly-created snapshot expires no later than 7 days from the time of its 488 # creation. Its exact lifetime is determined at creation by the existing 489 # backlog in the source subscription. Specifically, the lifetime of the 490 # snapshot is `7 days - (age of oldest unacked message in the subscription)`. 491 # For example, consider a subscription whose oldest unacked message is 3 days 492 # old. If a snapshot is created from this subscription, the snapshot -- which 493 # will always capture this 3-day-old backlog as long as the snapshot 494 # exists -- will expire in 4 days. The service will refuse to create a 495 # snapshot that would expire in less than 1 hour after creation. 496 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and 497 # managing labels</a>. 498 "a_key": "A String", 499 }, 500 "name": "A String", # The name of the snapshot. 501 }, 502 "updateMask": "A String", # Indicates which fields in the provided snapshot to update. 503 # Must be specified and non-empty. 504 } 505 506 x__xgafv: string, V1 error format. 507 Allowed values 508 1 - v1 error format 509 2 - v2 error format 510 511Returns: 512 An object of the form: 513 514 { # A snapshot resource. Snapshots are used in 515 # <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a> 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. 520 "topic": "A String", # The name of the topic from which this snapshot is retaining messages. 521 "expireTime": "A String", # The snapshot is guaranteed to exist up until this time. 522 # A newly-created snapshot expires no later than 7 days from the time of its 523 # creation. Its exact lifetime is determined at creation by the existing 524 # backlog in the source subscription. Specifically, the lifetime of the 525 # snapshot is `7 days - (age of oldest unacked message in the subscription)`. 526 # For example, consider a subscription whose oldest unacked message is 3 days 527 # old. If a snapshot is created from this subscription, the snapshot -- which 528 # will always capture this 3-day-old backlog as long as the snapshot 529 # exists -- will expire in 4 days. The service will refuse to create a 530 # snapshot that would expire in less than 1 hour after creation. 531 "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and 532 # managing labels</a>. 533 "a_key": "A String", 534 }, 535 "name": "A String", # The name of the snapshot. 536 }</pre> 537</div> 538 539<div class="method"> 540 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code> 541 <pre>Sets the access control policy on the specified resource. Replaces any 542existing policy. 543 544Args: 545 resource: string, REQUIRED: The resource for which the policy is being specified. 546See the operation documentation for the appropriate value for this field. (required) 547 body: object, The request body. (required) 548 The object takes the form of: 549 550{ # Request message for `SetIamPolicy` method. 551 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to # REQUIRED: The complete policy to be applied to the `resource`. The size of 552 # the policy is limited to a few 10s of KB. An empty policy is a 553 # valid policy but certain Cloud Platform services (such as Projects) 554 # might reject them. 555 # specify access control policies for Cloud Platform resources. 556 # 557 # 558 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of 559 # `members` to a `role`, where the members can be user accounts, Google groups, 560 # Google domains, and service accounts. A `role` is a named list of permissions 561 # defined by IAM. 562 # 563 # **JSON Example** 564 # 565 # { 566 # "bindings": [ 567 # { 568 # "role": "roles/owner", 569 # "members": [ 570 # "user:mike@example.com", 571 # "group:admins@example.com", 572 # "domain:google.com", 573 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 574 # ] 575 # }, 576 # { 577 # "role": "roles/viewer", 578 # "members": ["user:sean@example.com"] 579 # } 580 # ] 581 # } 582 # 583 # **YAML Example** 584 # 585 # bindings: 586 # - members: 587 # - user:mike@example.com 588 # - group:admins@example.com 589 # - domain:google.com 590 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 591 # role: roles/owner 592 # - members: 593 # - user:sean@example.com 594 # role: roles/viewer 595 # 596 # 597 # For a description of IAM and its features, see the 598 # [IAM developer's guide](https://cloud.google.com/iam/docs). 599 "bindings": [ # Associates a list of `members` to a `role`. 600 # `bindings` with no members will result in an error. 601 { # Associates `members` with a `role`. 602 "role": "A String", # Role that is assigned to `members`. 603 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 604 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. 605 # `members` can have the following values: 606 # 607 # * `allUsers`: A special identifier that represents anyone who is 608 # on the internet; with or without a Google account. 609 # 610 # * `allAuthenticatedUsers`: A special identifier that represents anyone 611 # who is authenticated with a Google account or a service account. 612 # 613 # * `user:{emailid}`: An email address that represents a specific Google 614 # account. For example, `alice@gmail.com` . 615 # 616 # 617 # * `serviceAccount:{emailid}`: An email address that represents a service 618 # account. For example, `my-other-app@appspot.gserviceaccount.com`. 619 # 620 # * `group:{emailid}`: An email address that represents a Google group. 621 # For example, `admins@example.com`. 622 # 623 # 624 # * `domain:{domain}`: The G Suite domain (primary) that represents all the 625 # users of that domain. For example, `google.com` or `example.com`. 626 # 627 "A String", 628 ], 629 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. 630 # NOTE: An unsatisfied condition will not allow user access via current 631 # binding. Different bindings, including their conditions, are examined 632 # independently. 633 # 634 # title: "User account presence" 635 # description: "Determines whether the request has a user account" 636 # expression: "size(request.user) > 0" 637 "location": "A String", # An optional string indicating the location of the expression for error 638 # reporting, e.g. a file name and a position in the file. 639 "expression": "A String", # Textual representation of an expression in 640 # Common Expression Language syntax. 641 # 642 # The application context of the containing message determines which 643 # well-known feature set of CEL is supported. 644 "description": "A String", # An optional description of the expression. This is a longer text which 645 # describes the expression, e.g. when hovered over it in a UI. 646 "title": "A String", # An optional title for the expression, i.e. a short string describing 647 # its purpose. This can be used e.g. in UIs which allow to enter the 648 # expression. 649 }, 650 }, 651 ], 652 "version": 42, # Deprecated. 653 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help 654 # prevent simultaneous updates of a policy from overwriting each other. 655 # It is strongly suggested that systems make use of the `etag` in the 656 # read-modify-write cycle to perform policy updates in order to avoid race 657 # conditions: An `etag` is returned in the response to `getIamPolicy`, and 658 # systems are expected to put that etag in the request to `setIamPolicy` to 659 # ensure that their change will be applied to the same version of the policy. 660 # 661 # If no `etag` is provided in the call to `setIamPolicy`, then the existing 662 # policy is overwritten blindly. 663 }, 664 } 665 666 x__xgafv: string, V1 error format. 667 Allowed values 668 1 - v1 error format 669 2 - v2 error format 670 671Returns: 672 An object of the form: 673 674 { # Defines an Identity and Access Management (IAM) policy. It is used to 675 # specify access control policies for Cloud Platform resources. 676 # 677 # 678 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of 679 # `members` to a `role`, where the members can be user accounts, Google groups, 680 # Google domains, and service accounts. A `role` is a named list of permissions 681 # defined by IAM. 682 # 683 # **JSON Example** 684 # 685 # { 686 # "bindings": [ 687 # { 688 # "role": "roles/owner", 689 # "members": [ 690 # "user:mike@example.com", 691 # "group:admins@example.com", 692 # "domain:google.com", 693 # "serviceAccount:my-other-app@appspot.gserviceaccount.com" 694 # ] 695 # }, 696 # { 697 # "role": "roles/viewer", 698 # "members": ["user:sean@example.com"] 699 # } 700 # ] 701 # } 702 # 703 # **YAML Example** 704 # 705 # bindings: 706 # - members: 707 # - user:mike@example.com 708 # - group:admins@example.com 709 # - domain:google.com 710 # - serviceAccount:my-other-app@appspot.gserviceaccount.com 711 # role: roles/owner 712 # - members: 713 # - user:sean@example.com 714 # role: roles/viewer 715 # 716 # 717 # For a description of IAM and its features, see the 718 # [IAM developer's guide](https://cloud.google.com/iam/docs). 719 "bindings": [ # Associates a list of `members` to a `role`. 720 # `bindings` with no members will result in an error. 721 { # Associates `members` with a `role`. 722 "role": "A String", # Role that is assigned to `members`. 723 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 724 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. 725 # `members` can have the following values: 726 # 727 # * `allUsers`: A special identifier that represents anyone who is 728 # on the internet; with or without a Google account. 729 # 730 # * `allAuthenticatedUsers`: A special identifier that represents anyone 731 # who is authenticated with a Google account or a service account. 732 # 733 # * `user:{emailid}`: An email address that represents a specific Google 734 # account. For example, `alice@gmail.com` . 735 # 736 # 737 # * `serviceAccount:{emailid}`: An email address that represents a service 738 # account. For example, `my-other-app@appspot.gserviceaccount.com`. 739 # 740 # * `group:{emailid}`: An email address that represents a Google group. 741 # For example, `admins@example.com`. 742 # 743 # 744 # * `domain:{domain}`: The G Suite domain (primary) that represents all the 745 # users of that domain. For example, `google.com` or `example.com`. 746 # 747 "A String", 748 ], 749 "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. 750 # NOTE: An unsatisfied condition will not allow user access via current 751 # binding. Different bindings, including their conditions, are examined 752 # independently. 753 # 754 # title: "User account presence" 755 # description: "Determines whether the request has a user account" 756 # expression: "size(request.user) > 0" 757 "location": "A String", # An optional string indicating the location of the expression for error 758 # reporting, e.g. a file name and a position in the file. 759 "expression": "A String", # Textual representation of an expression in 760 # Common Expression Language syntax. 761 # 762 # The application context of the containing message determines which 763 # well-known feature set of CEL is supported. 764 "description": "A String", # An optional description of the expression. This is a longer text which 765 # describes the expression, e.g. when hovered over it in a UI. 766 "title": "A String", # An optional title for the expression, i.e. a short string describing 767 # its purpose. This can be used e.g. in UIs which allow to enter the 768 # expression. 769 }, 770 }, 771 ], 772 "version": 42, # Deprecated. 773 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help 774 # prevent simultaneous updates of a policy from overwriting each other. 775 # It is strongly suggested that systems make use of the `etag` in the 776 # read-modify-write cycle to perform policy updates in order to avoid race 777 # conditions: An `etag` is returned in the response to `getIamPolicy`, and 778 # systems are expected to put that etag in the request to `setIamPolicy` to 779 # ensure that their change will be applied to the same version of the policy. 780 # 781 # If no `etag` is provided in the call to `setIamPolicy`, then the existing 782 # policy is overwritten blindly. 783 }</pre> 784</div> 785 786<div class="method"> 787 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code> 788 <pre>Returns permissions that a caller has on the specified resource. 789If the resource does not exist, this will return an empty set of 790permissions, not a NOT_FOUND error. 791 792Note: This operation is designed to be used for building permission-aware 793UIs and command-line tools, not for authorization checking. This operation 794may "fail open" without warning. 795 796Args: 797 resource: string, REQUIRED: The resource for which the policy detail is being requested. 798See the operation documentation for the appropriate value for this field. (required) 799 body: object, The request body. (required) 800 The object takes the form of: 801 802{ # Request message for `TestIamPermissions` method. 803 "permissions": [ # The set of permissions to check for the `resource`. Permissions with 804 # wildcards (such as '*' or 'storage.*') are not allowed. For more 805 # information see 806 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). 807 "A String", 808 ], 809 } 810 811 x__xgafv: string, V1 error format. 812 Allowed values 813 1 - v1 error format 814 2 - v2 error format 815 816Returns: 817 An object of the form: 818 819 { # Response message for `TestIamPermissions` method. 820 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is 821 # allowed. 822 "A String", 823 ], 824 }</pre> 825</div> 826 827</body></html>