Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 75 | <h1><a href="pubsub_v1.html">Cloud Pub/Sub API</a> . <a href="pubsub_v1.projects.html">projects</a> . <a href="pubsub_v1.projects.topics.html">topics</a></h1> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 78 | <code><a href="pubsub_v1.projects.topics.snapshots.html">snapshots()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the snapshots Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 83 | <code><a href="pubsub_v1.projects.topics.subscriptions.html">subscriptions()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the subscriptions Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 88 | <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 89 | <p class="firstline">Creates the given topic with the given name. See the</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 90 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 91 | <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] | 92 | <p class="firstline">Deletes the topic with the given name. Returns `NOT_FOUND` if the topic</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 93 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 94 | <code><a href="#get">get(topic, x__xgafv=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 95 | <p class="firstline">Gets the configuration of a topic.</p> |
| 96 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 97 | <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 98 | <p class="firstline">Gets the access control policy for a resource.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 99 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 100 | <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 101 | <p class="firstline">Lists matching topics.</p> |
| 102 | <p class="toc_element"> |
| 103 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 104 | <p class="firstline">Retrieves the next page of results.</p> |
| 105 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 106 | <code><a href="#patch">patch(name, body, x__xgafv=None)</a></code></p> |
| 107 | <p class="firstline">Updates an existing topic. Note that certain properties of a</p> |
| 108 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 109 | <code><a href="#publish">publish(topic, body, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 110 | <p class="firstline">Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 111 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 112 | <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 113 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 114 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 115 | <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 116 | <p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
| 117 | <h3>Method Details</h3> |
| 118 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 119 | <code class="details" id="create">create(name, body, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 120 | <pre>Creates the given topic with the given name. See the |
| 121 | <a href="https://cloud.google.com/pubsub/docs/admin#resource_names"> |
| 122 | resource name rules</a>. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 123 | |
| 124 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 125 | name: 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"`. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 131 | body: object, The request body. (required) |
| 132 | The object takes the form of: |
| 133 | |
| 134 | { # A topic resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 135 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 136 | # managing labels</a>. |
| 137 | "a_key": "A String", |
| 138 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 139 | "name": "A String", # The name of the topic. It must have the format |
| 140 | # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 141 | # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 142 | # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent |
| 143 | # signs (`%`). It must be between 3 and 255 characters in length, and it |
| 144 | # must not start with `"goog"`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 145 | "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It |
| 146 | # is determined when the topic is created based on the policy configured at |
| 147 | # the project level. It must not be set by the caller in the request to |
| 148 | # CreateTopic or to UpdateTopic. This field will be populated in the |
| 149 | # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the |
| 150 | # response, then no constraints are in effect. |
| 151 | "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic |
| 152 | # may be persisted in storage. Messages published by publishers running in |
| 153 | # non-allowed GCP regions (or running outside of GCP altogether) will be |
| 154 | # routed for storage in one of the allowed regions. An empty list indicates a |
| 155 | # misconfiguration at the project or organization level, which will result in |
| 156 | # all Publish operations failing. |
| 157 | "A String", |
| 158 | ], |
| 159 | }, |
| 160 | "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access |
| 161 | # to messages published on this topic. |
| 162 | # |
| 163 | # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 167 | Allowed values |
| 168 | 1 - v1 error format |
| 169 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 170 | |
| 171 | Returns: |
| 172 | An object of the form: |
| 173 | |
| 174 | { # A topic resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 175 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 176 | # managing labels</a>. |
| 177 | "a_key": "A String", |
| 178 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 179 | "name": "A String", # The name of the topic. It must have the format |
| 180 | # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 181 | # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 182 | # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent |
| 183 | # signs (`%`). It must be between 3 and 255 characters in length, and it |
| 184 | # must not start with `"goog"`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 185 | "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It |
| 186 | # is determined when the topic is created based on the policy configured at |
| 187 | # the project level. It must not be set by the caller in the request to |
| 188 | # CreateTopic or to UpdateTopic. This field will be populated in the |
| 189 | # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the |
| 190 | # response, then no constraints are in effect. |
| 191 | "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic |
| 192 | # may be persisted in storage. Messages published by publishers running in |
| 193 | # non-allowed GCP regions (or running outside of GCP altogether) will be |
| 194 | # routed for storage in one of the allowed regions. An empty list indicates a |
| 195 | # misconfiguration at the project or organization level, which will result in |
| 196 | # all Publish operations failing. |
| 197 | "A String", |
| 198 | ], |
| 199 | }, |
| 200 | "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access |
| 201 | # to messages published on this topic. |
| 202 | # |
| 203 | # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 204 | }</pre> |
| 205 | </div> |
| 206 | |
| 207 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 208 | <code class="details" id="delete">delete(topic, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 209 | <pre>Deletes the topic with the given name. Returns `NOT_FOUND` if the topic |
| 210 | does not exist. After a topic is deleted, a new topic may be created with |
| 211 | the same name; this is an entirely new topic with none of the old |
| 212 | configuration or subscriptions. Existing subscriptions to this topic are |
| 213 | not deleted, but their `topic` field is set to `_deleted-topic_`. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 214 | |
| 215 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 216 | topic: string, Name of the topic to delete. |
| 217 | Format is `projects/{project}/topics/{topic}`. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 218 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 219 | Allowed values |
| 220 | 1 - v1 error format |
| 221 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 222 | |
| 223 | Returns: |
| 224 | An object of the form: |
| 225 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 226 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 227 | # empty messages in your APIs. A typical example is to use it as the request |
| 228 | # or the response type of an API method. For instance: |
| 229 | # |
| 230 | # service Foo { |
| 231 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 232 | # } |
| 233 | # |
| 234 | # The JSON representation for `Empty` is empty JSON object `{}`. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 235 | }</pre> |
| 236 | </div> |
| 237 | |
| 238 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 239 | <code class="details" id="get">get(topic, x__xgafv=None)</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 240 | <pre>Gets the configuration of a topic. |
| 241 | |
| 242 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 243 | topic: string, The name of the topic to get. |
| 244 | Format is `projects/{project}/topics/{topic}`. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 245 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 246 | Allowed values |
| 247 | 1 - v1 error format |
| 248 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 249 | |
| 250 | Returns: |
| 251 | An object of the form: |
| 252 | |
| 253 | { # A topic resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 254 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 255 | # managing labels</a>. |
| 256 | "a_key": "A String", |
| 257 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 258 | "name": "A String", # The name of the topic. It must have the format |
| 259 | # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 260 | # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 261 | # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent |
| 262 | # signs (`%`). It must be between 3 and 255 characters in length, and it |
| 263 | # must not start with `"goog"`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 264 | "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It |
| 265 | # is determined when the topic is created based on the policy configured at |
| 266 | # the project level. It must not be set by the caller in the request to |
| 267 | # CreateTopic or to UpdateTopic. This field will be populated in the |
| 268 | # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the |
| 269 | # response, then no constraints are in effect. |
| 270 | "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic |
| 271 | # may be persisted in storage. Messages published by publishers running in |
| 272 | # non-allowed GCP regions (or running outside of GCP altogether) will be |
| 273 | # routed for storage in one of the allowed regions. An empty list indicates a |
| 274 | # misconfiguration at the project or organization level, which will result in |
| 275 | # all Publish operations failing. |
| 276 | "A String", |
| 277 | ], |
| 278 | }, |
| 279 | "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access |
| 280 | # to messages published on this topic. |
| 281 | # |
| 282 | # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 283 | }</pre> |
| 284 | </div> |
| 285 | |
| 286 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 287 | <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 288 | <pre>Gets the access control policy for a resource. |
| 289 | Returns an empty policy if the resource exists and does not have a policy |
| 290 | set. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 291 | |
| 292 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 293 | resource: string, REQUIRED: The resource for which the policy is being requested. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 294 | See the operation documentation for the appropriate value for this field. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 295 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 296 | Allowed values |
| 297 | 1 - v1 error format |
| 298 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 299 | |
| 300 | Returns: |
| 301 | An object of the form: |
| 302 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 303 | { # Defines an Identity and Access Management (IAM) policy. It is used to |
| 304 | # specify access control policies for Cloud Platform resources. |
| 305 | # |
| 306 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 307 | # A `Policy` consists of a list of `bindings`. A `binding` binds a list of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 308 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 309 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 310 | # defined by IAM. |
| 311 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 312 | # **JSON Example** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 313 | # |
| 314 | # { |
| 315 | # "bindings": [ |
| 316 | # { |
| 317 | # "role": "roles/owner", |
| 318 | # "members": [ |
| 319 | # "user:mike@example.com", |
| 320 | # "group:admins@example.com", |
| 321 | # "domain:google.com", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 322 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 323 | # ] |
| 324 | # }, |
| 325 | # { |
| 326 | # "role": "roles/viewer", |
| 327 | # "members": ["user:sean@example.com"] |
| 328 | # } |
| 329 | # ] |
| 330 | # } |
| 331 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 332 | # **YAML Example** |
| 333 | # |
| 334 | # bindings: |
| 335 | # - members: |
| 336 | # - user:mike@example.com |
| 337 | # - group:admins@example.com |
| 338 | # - domain:google.com |
| 339 | # - serviceAccount:my-other-app@appspot.gserviceaccount.com |
| 340 | # role: roles/owner |
| 341 | # - members: |
| 342 | # - user:sean@example.com |
| 343 | # role: roles/viewer |
| 344 | # |
| 345 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 346 | # For a description of IAM and its features, see the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 347 | # [IAM developer's guide](https://cloud.google.com/iam/docs). |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 348 | "bindings": [ # Associates a list of `members` to a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 349 | # `bindings` with no members will result in an error. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 350 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 351 | "role": "A String", # Role that is assigned to `members`. |
| 352 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 353 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 354 | # `members` can have the following values: |
| 355 | # |
| 356 | # * `allUsers`: A special identifier that represents anyone who is |
| 357 | # on the internet; with or without a Google account. |
| 358 | # |
| 359 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 360 | # who is authenticated with a Google account or a service account. |
| 361 | # |
| 362 | # * `user:{emailid}`: An email address that represents a specific Google |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 363 | # account. For example, `alice@gmail.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 364 | # |
| 365 | # |
| 366 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 367 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 368 | # |
| 369 | # * `group:{emailid}`: An email address that represents a Google group. |
| 370 | # For example, `admins@example.com`. |
| 371 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 372 | # |
| 373 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 374 | # users of that domain. For example, `google.com` or `example.com`. |
| 375 | # |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 376 | "A String", |
| 377 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 378 | "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. |
| 379 | # NOTE: An unsatisfied condition will not allow user access via current |
| 380 | # binding. Different bindings, including their conditions, are examined |
| 381 | # independently. |
| 382 | # |
| 383 | # title: "User account presence" |
| 384 | # description: "Determines whether the request has a user account" |
| 385 | # expression: "size(request.user) > 0" |
| 386 | "location": "A String", # An optional string indicating the location of the expression for error |
| 387 | # reporting, e.g. a file name and a position in the file. |
| 388 | "expression": "A String", # Textual representation of an expression in |
| 389 | # Common Expression Language syntax. |
| 390 | # |
| 391 | # The application context of the containing message determines which |
| 392 | # well-known feature set of CEL is supported. |
| 393 | "description": "A String", # An optional description of the expression. This is a longer text which |
| 394 | # describes the expression, e.g. when hovered over it in a UI. |
| 395 | "title": "A String", # An optional title for the expression, i.e. a short string describing |
| 396 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 397 | # expression. |
| 398 | }, |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 399 | }, |
| 400 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 401 | "version": 42, # Deprecated. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 402 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 403 | # prevent simultaneous updates of a policy from overwriting each other. |
| 404 | # It is strongly suggested that systems make use of the `etag` in the |
| 405 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 406 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 407 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 408 | # ensure that their change will be applied to the same version of the policy. |
| 409 | # |
| 410 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 411 | # policy is overwritten blindly. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 412 | }</pre> |
| 413 | </div> |
| 414 | |
| 415 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 416 | <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 417 | <pre>Lists matching topics. |
| 418 | |
| 419 | Args: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 420 | project: string, The name of the project in which to list topics. |
| 421 | Format is `projects/{project-id}`. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 422 | pageSize: integer, Maximum number of topics to return. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 423 | pageToken: string, The value returned by the last `ListTopicsResponse`; indicates that this is |
| 424 | a continuation of a prior `ListTopics` call, and that the system should |
| 425 | return the next page of data. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 426 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 427 | Allowed values |
| 428 | 1 - v1 error format |
| 429 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 430 | |
| 431 | Returns: |
| 432 | An object of the form: |
| 433 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 434 | { # Response for the `ListTopics` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 435 | "nextPageToken": "A String", # If not empty, indicates that there may be more topics that match the |
| 436 | # request; this value should be passed in a new `ListTopicsRequest`. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 437 | "topics": [ # The resulting topics. |
| 438 | { # A topic resource. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 439 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 440 | # managing labels</a>. |
| 441 | "a_key": "A String", |
| 442 | }, |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 443 | "name": "A String", # The name of the topic. It must have the format |
| 444 | # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 445 | # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 446 | # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent |
| 447 | # signs (`%`). It must be between 3 and 255 characters in length, and it |
| 448 | # must not start with `"goog"`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 449 | "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It |
| 450 | # is determined when the topic is created based on the policy configured at |
| 451 | # the project level. It must not be set by the caller in the request to |
| 452 | # CreateTopic or to UpdateTopic. This field will be populated in the |
| 453 | # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the |
| 454 | # response, then no constraints are in effect. |
| 455 | "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic |
| 456 | # may be persisted in storage. Messages published by publishers running in |
| 457 | # non-allowed GCP regions (or running outside of GCP altogether) will be |
| 458 | # routed for storage in one of the allowed regions. An empty list indicates a |
| 459 | # misconfiguration at the project or organization level, which will result in |
| 460 | # all Publish operations failing. |
| 461 | "A String", |
| 462 | ], |
| 463 | }, |
| 464 | "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access |
| 465 | # to messages published on this topic. |
| 466 | # |
| 467 | # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 468 | }, |
| 469 | ], |
| 470 | }</pre> |
| 471 | </div> |
| 472 | |
| 473 | <div class="method"> |
| 474 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 475 | <pre>Retrieves the next page of results. |
| 476 | |
| 477 | Args: |
| 478 | previous_request: The request for the previous page. (required) |
| 479 | previous_response: The response from the request for the previous page. (required) |
| 480 | |
| 481 | Returns: |
| 482 | A request object that you can call 'execute()' on to request the next |
| 483 | page. Returns None if there are no more items in the collection. |
| 484 | </pre> |
| 485 | </div> |
| 486 | |
| 487 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 488 | <code class="details" id="patch">patch(name, body, x__xgafv=None)</code> |
| 489 | <pre>Updates an existing topic. Note that certain properties of a |
| 490 | topic are not modifiable. |
| 491 | |
| 492 | Args: |
| 493 | name: string, The name of the topic. It must have the format |
| 494 | `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 495 | and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 496 | underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent |
| 497 | signs (`%`). It must be between 3 and 255 characters in length, and it |
| 498 | must not start with `"goog"`. (required) |
| 499 | body: object, The request body. (required) |
| 500 | The object takes the form of: |
| 501 | |
| 502 | { # Request for the UpdateTopic method. |
| 503 | "topic": { # A topic resource. # The updated topic object. |
| 504 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 505 | # managing labels</a>. |
| 506 | "a_key": "A String", |
| 507 | }, |
| 508 | "name": "A String", # The name of the topic. It must have the format |
| 509 | # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 510 | # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 511 | # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent |
| 512 | # signs (`%`). It must be between 3 and 255 characters in length, and it |
| 513 | # must not start with `"goog"`. |
| 514 | "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It |
| 515 | # is determined when the topic is created based on the policy configured at |
| 516 | # the project level. It must not be set by the caller in the request to |
| 517 | # CreateTopic or to UpdateTopic. This field will be populated in the |
| 518 | # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the |
| 519 | # response, then no constraints are in effect. |
| 520 | "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic |
| 521 | # may be persisted in storage. Messages published by publishers running in |
| 522 | # non-allowed GCP regions (or running outside of GCP altogether) will be |
| 523 | # routed for storage in one of the allowed regions. An empty list indicates a |
| 524 | # misconfiguration at the project or organization level, which will result in |
| 525 | # all Publish operations failing. |
| 526 | "A String", |
| 527 | ], |
| 528 | }, |
| 529 | "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access |
| 530 | # to messages published on this topic. |
| 531 | # |
| 532 | # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
| 533 | }, |
| 534 | "updateMask": "A String", # Indicates which fields in the provided topic to update. Must be specified |
| 535 | # and non-empty. Note that if `update_mask` contains |
| 536 | # "message_storage_policy" then the new value will be determined based on the |
| 537 | # policy configured at the project or organization level. The |
| 538 | # `message_storage_policy` must not be set in the `topic` provided above. |
| 539 | } |
| 540 | |
| 541 | x__xgafv: string, V1 error format. |
| 542 | Allowed values |
| 543 | 1 - v1 error format |
| 544 | 2 - v2 error format |
| 545 | |
| 546 | Returns: |
| 547 | An object of the form: |
| 548 | |
| 549 | { # A topic resource. |
| 550 | "labels": { # See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and |
| 551 | # managing labels</a>. |
| 552 | "a_key": "A String", |
| 553 | }, |
| 554 | "name": "A String", # The name of the topic. It must have the format |
| 555 | # `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 556 | # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 557 | # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent |
| 558 | # signs (`%`). It must be between 3 and 255 characters in length, and it |
| 559 | # must not start with `"goog"`. |
| 560 | "messageStoragePolicy": { # Policy constraining how messages published to the topic may be stored. It |
| 561 | # is determined when the topic is created based on the policy configured at |
| 562 | # the project level. It must not be set by the caller in the request to |
| 563 | # CreateTopic or to UpdateTopic. This field will be populated in the |
| 564 | # responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the |
| 565 | # response, then no constraints are in effect. |
| 566 | "allowedPersistenceRegions": [ # The list of GCP region IDs where messages that are published to the topic |
| 567 | # may be persisted in storage. Messages published by publishers running in |
| 568 | # non-allowed GCP regions (or running outside of GCP altogether) will be |
| 569 | # routed for storage in one of the allowed regions. An empty list indicates a |
| 570 | # misconfiguration at the project or organization level, which will result in |
| 571 | # all Publish operations failing. |
| 572 | "A String", |
| 573 | ], |
| 574 | }, |
| 575 | "kmsKeyName": "A String", # The resource name of the Cloud KMS CryptoKey to be used to protect access |
| 576 | # to messages published on this topic. |
| 577 | # |
| 578 | # The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. |
| 579 | }</pre> |
| 580 | </div> |
| 581 | |
| 582 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 583 | <code class="details" id="publish">publish(topic, body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 584 | <pre>Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 585 | does not exist. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 586 | |
| 587 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 588 | topic: string, The messages in the request will be published on this topic. |
| 589 | Format is `projects/{project}/topics/{topic}`. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 590 | body: object, The request body. (required) |
| 591 | The object takes the form of: |
| 592 | |
| 593 | { # Request for the Publish method. |
| 594 | "messages": [ # The messages to publish. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 595 | { # A message that is published by publishers and consumed by subscribers. The |
| 596 | # message must contain either a non-empty data field or at least one attribute. |
| 597 | # Note that client libraries represent this object differently |
| 598 | # depending on the language. See the corresponding |
| 599 | # <a href="https://cloud.google.com/pubsub/docs/reference/libraries">client |
| 600 | # library documentation</a> for more information. See |
| 601 | # <a href="https://cloud.google.com/pubsub/quotas">Quotas and limits</a> |
| 602 | # for more information about message limits. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 603 | "attributes": { # Optional attributes for this message. |
| 604 | "a_key": "A String", |
| 605 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 606 | "data": "A String", # The message data field. If this field is empty, the message must contain |
| 607 | # at least one attribute. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 608 | "publishTime": "A String", # The time at which the message was published, populated by the server when |
| 609 | # it receives the `Publish` call. It must not be populated by the |
| 610 | # publisher in a `Publish` call. |
| 611 | "messageId": "A String", # ID of this message, assigned by the server when the message is published. |
| 612 | # Guaranteed to be unique within the topic. This value may be read by a |
| 613 | # subscriber that receives a `PubsubMessage` via a `Pull` call or a push |
| 614 | # delivery. It must not be populated by the publisher in a `Publish` call. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 615 | }, |
| 616 | ], |
| 617 | } |
| 618 | |
| 619 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 620 | Allowed values |
| 621 | 1 - v1 error format |
| 622 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 623 | |
| 624 | Returns: |
| 625 | An object of the form: |
| 626 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 627 | { # Response for the `Publish` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 628 | "messageIds": [ # The server-assigned ID of each published message, in the same order as |
| 629 | # the messages in the request. IDs are guaranteed to be unique within |
| 630 | # the topic. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 631 | "A String", |
| 632 | ], |
| 633 | }</pre> |
| 634 | </div> |
| 635 | |
| 636 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 637 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code> |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 638 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 639 | existing policy. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 640 | |
| 641 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 642 | resource: string, REQUIRED: The resource for which the policy is being specified. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 643 | See the operation documentation for the appropriate value for this field. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 644 | body: object, The request body. (required) |
| 645 | The object takes the form of: |
| 646 | |
| 647 | { # Request message for `SetIamPolicy` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 648 | "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 |
| 649 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 650 | # valid policy but certain Cloud Platform services (such as Projects) |
| 651 | # might reject them. |
| 652 | # specify access control policies for Cloud Platform resources. |
| 653 | # |
| 654 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 655 | # A `Policy` consists of a list of `bindings`. A `binding` binds a list of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 656 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 657 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 658 | # defined by IAM. |
| 659 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 660 | # **JSON Example** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 661 | # |
| 662 | # { |
| 663 | # "bindings": [ |
| 664 | # { |
| 665 | # "role": "roles/owner", |
| 666 | # "members": [ |
| 667 | # "user:mike@example.com", |
| 668 | # "group:admins@example.com", |
| 669 | # "domain:google.com", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 670 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 671 | # ] |
| 672 | # }, |
| 673 | # { |
| 674 | # "role": "roles/viewer", |
| 675 | # "members": ["user:sean@example.com"] |
| 676 | # } |
| 677 | # ] |
| 678 | # } |
| 679 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 680 | # **YAML Example** |
| 681 | # |
| 682 | # bindings: |
| 683 | # - members: |
| 684 | # - user:mike@example.com |
| 685 | # - group:admins@example.com |
| 686 | # - domain:google.com |
| 687 | # - serviceAccount:my-other-app@appspot.gserviceaccount.com |
| 688 | # role: roles/owner |
| 689 | # - members: |
| 690 | # - user:sean@example.com |
| 691 | # role: roles/viewer |
| 692 | # |
| 693 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 694 | # For a description of IAM and its features, see the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 695 | # [IAM developer's guide](https://cloud.google.com/iam/docs). |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 696 | "bindings": [ # Associates a list of `members` to a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 697 | # `bindings` with no members will result in an error. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 698 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 699 | "role": "A String", # Role that is assigned to `members`. |
| 700 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 701 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 702 | # `members` can have the following values: |
| 703 | # |
| 704 | # * `allUsers`: A special identifier that represents anyone who is |
| 705 | # on the internet; with or without a Google account. |
| 706 | # |
| 707 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 708 | # who is authenticated with a Google account or a service account. |
| 709 | # |
| 710 | # * `user:{emailid}`: An email address that represents a specific Google |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 711 | # account. For example, `alice@gmail.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 712 | # |
| 713 | # |
| 714 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 715 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 716 | # |
| 717 | # * `group:{emailid}`: An email address that represents a Google group. |
| 718 | # For example, `admins@example.com`. |
| 719 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 720 | # |
| 721 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 722 | # users of that domain. For example, `google.com` or `example.com`. |
| 723 | # |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 724 | "A String", |
| 725 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 726 | "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. |
| 727 | # NOTE: An unsatisfied condition will not allow user access via current |
| 728 | # binding. Different bindings, including their conditions, are examined |
| 729 | # independently. |
| 730 | # |
| 731 | # title: "User account presence" |
| 732 | # description: "Determines whether the request has a user account" |
| 733 | # expression: "size(request.user) > 0" |
| 734 | "location": "A String", # An optional string indicating the location of the expression for error |
| 735 | # reporting, e.g. a file name and a position in the file. |
| 736 | "expression": "A String", # Textual representation of an expression in |
| 737 | # Common Expression Language syntax. |
| 738 | # |
| 739 | # The application context of the containing message determines which |
| 740 | # well-known feature set of CEL is supported. |
| 741 | "description": "A String", # An optional description of the expression. This is a longer text which |
| 742 | # describes the expression, e.g. when hovered over it in a UI. |
| 743 | "title": "A String", # An optional title for the expression, i.e. a short string describing |
| 744 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 745 | # expression. |
| 746 | }, |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 747 | }, |
| 748 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 749 | "version": 42, # Deprecated. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 750 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 751 | # prevent simultaneous updates of a policy from overwriting each other. |
| 752 | # It is strongly suggested that systems make use of the `etag` in the |
| 753 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 754 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 755 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 756 | # ensure that their change will be applied to the same version of the policy. |
| 757 | # |
| 758 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 759 | # policy is overwritten blindly. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 760 | }, |
| 761 | } |
| 762 | |
| 763 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 764 | Allowed values |
| 765 | 1 - v1 error format |
| 766 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 767 | |
| 768 | Returns: |
| 769 | An object of the form: |
| 770 | |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 771 | { # Defines an Identity and Access Management (IAM) policy. It is used to |
| 772 | # specify access control policies for Cloud Platform resources. |
| 773 | # |
| 774 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 775 | # A `Policy` consists of a list of `bindings`. A `binding` binds a list of |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 776 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 777 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 778 | # defined by IAM. |
| 779 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 780 | # **JSON Example** |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 781 | # |
| 782 | # { |
| 783 | # "bindings": [ |
| 784 | # { |
| 785 | # "role": "roles/owner", |
| 786 | # "members": [ |
| 787 | # "user:mike@example.com", |
| 788 | # "group:admins@example.com", |
| 789 | # "domain:google.com", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 790 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com" |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 791 | # ] |
| 792 | # }, |
| 793 | # { |
| 794 | # "role": "roles/viewer", |
| 795 | # "members": ["user:sean@example.com"] |
| 796 | # } |
| 797 | # ] |
| 798 | # } |
| 799 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 800 | # **YAML Example** |
| 801 | # |
| 802 | # bindings: |
| 803 | # - members: |
| 804 | # - user:mike@example.com |
| 805 | # - group:admins@example.com |
| 806 | # - domain:google.com |
| 807 | # - serviceAccount:my-other-app@appspot.gserviceaccount.com |
| 808 | # role: roles/owner |
| 809 | # - members: |
| 810 | # - user:sean@example.com |
| 811 | # role: roles/viewer |
| 812 | # |
| 813 | # |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 814 | # For a description of IAM and its features, see the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 815 | # [IAM developer's guide](https://cloud.google.com/iam/docs). |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 816 | "bindings": [ # Associates a list of `members` to a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 817 | # `bindings` with no members will result in an error. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame] | 818 | { # Associates `members` with a `role`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 819 | "role": "A String", # Role that is assigned to `members`. |
| 820 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 821 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 822 | # `members` can have the following values: |
| 823 | # |
| 824 | # * `allUsers`: A special identifier that represents anyone who is |
| 825 | # on the internet; with or without a Google account. |
| 826 | # |
| 827 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 828 | # who is authenticated with a Google account or a service account. |
| 829 | # |
| 830 | # * `user:{emailid}`: An email address that represents a specific Google |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 831 | # account. For example, `alice@gmail.com` . |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 832 | # |
| 833 | # |
| 834 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 835 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 836 | # |
| 837 | # * `group:{emailid}`: An email address that represents a Google group. |
| 838 | # For example, `admins@example.com`. |
| 839 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 840 | # |
| 841 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 842 | # users of that domain. For example, `google.com` or `example.com`. |
| 843 | # |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 844 | "A String", |
| 845 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 846 | "condition": { # Represents an expression text. Example: # The condition that is associated with this binding. |
| 847 | # NOTE: An unsatisfied condition will not allow user access via current |
| 848 | # binding. Different bindings, including their conditions, are examined |
| 849 | # independently. |
| 850 | # |
| 851 | # title: "User account presence" |
| 852 | # description: "Determines whether the request has a user account" |
| 853 | # expression: "size(request.user) > 0" |
| 854 | "location": "A String", # An optional string indicating the location of the expression for error |
| 855 | # reporting, e.g. a file name and a position in the file. |
| 856 | "expression": "A String", # Textual representation of an expression in |
| 857 | # Common Expression Language syntax. |
| 858 | # |
| 859 | # The application context of the containing message determines which |
| 860 | # well-known feature set of CEL is supported. |
| 861 | "description": "A String", # An optional description of the expression. This is a longer text which |
| 862 | # describes the expression, e.g. when hovered over it in a UI. |
| 863 | "title": "A String", # An optional title for the expression, i.e. a short string describing |
| 864 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 865 | # expression. |
| 866 | }, |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 867 | }, |
| 868 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame^] | 869 | "version": 42, # Deprecated. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 870 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 871 | # prevent simultaneous updates of a policy from overwriting each other. |
| 872 | # It is strongly suggested that systems make use of the `etag` in the |
| 873 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 874 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 875 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 876 | # ensure that their change will be applied to the same version of the policy. |
| 877 | # |
| 878 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 879 | # policy is overwritten blindly. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 880 | }</pre> |
| 881 | </div> |
| 882 | |
| 883 | <div class="method"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 884 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 885 | <pre>Returns permissions that a caller has on the specified resource. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 886 | If the resource does not exist, this will return an empty set of |
| 887 | permissions, not a NOT_FOUND error. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 888 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 889 | Note: This operation is designed to be used for building permission-aware |
| 890 | UIs and command-line tools, not for authorization checking. This operation |
| 891 | may "fail open" without warning. |
| 892 | |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 893 | Args: |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 894 | 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] | 895 | See the operation documentation for the appropriate value for this field. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 896 | body: object, The request body. (required) |
| 897 | The object takes the form of: |
| 898 | |
| 899 | { # Request message for `TestIamPermissions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 900 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 901 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 902 | # information see |
| 903 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 904 | "A String", |
| 905 | ], |
| 906 | } |
| 907 | |
| 908 | x__xgafv: string, V1 error format. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 909 | Allowed values |
| 910 | 1 - v1 error format |
| 911 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 912 | |
| 913 | Returns: |
| 914 | An object of the form: |
| 915 | |
| 916 | { # Response message for `TestIamPermissions` method. |
Jon Wayne Parrott | 692617a | 2017-01-06 09:58:29 -0800 | [diff] [blame] | 917 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
| 918 | # allowed. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 919 | "A String", |
| 920 | ], |
| 921 | }</pre> |
| 922 | </div> |
| 923 | |
| 924 | </body></html> |