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