Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="cloudkms_v1.html">Cloud Key Management Service (KMS) API</a> . <a href="cloudkms_v1.projects.html">projects</a> . <a href="cloudkms_v1.projects.locations.html">locations</a> . <a href="cloudkms_v1.projects.locations.keyRings.html">keyRings</a></h1> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="cloudkms_v1.projects.locations.keyRings.cryptoKeys.html">cryptoKeys()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the cryptoKeys Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 83 | <code><a href="cloudkms_v1.projects.locations.keyRings.importJobs.html">importJobs()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the importJobs Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 88 | <code><a href="#create">create(parent, body=None, keyRingId=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 89 | <p class="firstline">Create a new KeyRing in a given Project and Location.</p> |
| 90 | <p class="toc_element"> |
| 91 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 92 | <p class="firstline">Returns metadata for a given KeyRing.</p> |
| 93 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 94 | <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 95 | <p class="firstline">Gets the access control policy for a resource.</p> |
| 96 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 97 | <code><a href="#list">list(parent, orderBy=None, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 98 | <p class="firstline">Lists KeyRings.</p> |
| 99 | <p class="toc_element"> |
| 100 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 101 | <p class="firstline">Retrieves the next page of results.</p> |
| 102 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 103 | <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 104 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any</p> |
| 105 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 106 | <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 107 | <p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
| 108 | <h3>Method Details</h3> |
| 109 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 110 | <code class="details" id="create">create(parent, body=None, keyRingId=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 111 | <pre>Create a new KeyRing in a given Project and Location. |
| 112 | |
| 113 | Args: |
| 114 | parent: string, Required. The resource name of the location associated with the |
| 115 | KeyRings, in the format `projects/*/locations/*`. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 116 | body: object, The request body. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 117 | The object takes the form of: |
| 118 | |
| 119 | { # A KeyRing is a toplevel logical grouping of CryptoKeys. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 120 | "name": "A String", # Output only. The resource name for the KeyRing in the format |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 121 | # `projects/*/locations/*/keyRings/*`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 122 | "createTime": "A String", # Output only. The time at which this KeyRing was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 123 | } |
| 124 | |
| 125 | keyRingId: string, Required. It must be unique within a location and match the regular |
| 126 | expression `[a-zA-Z0-9_-]{1,63}` |
| 127 | x__xgafv: string, V1 error format. |
| 128 | Allowed values |
| 129 | 1 - v1 error format |
| 130 | 2 - v2 error format |
| 131 | |
| 132 | Returns: |
| 133 | An object of the form: |
| 134 | |
| 135 | { # A KeyRing is a toplevel logical grouping of CryptoKeys. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 136 | "name": "A String", # Output only. The resource name for the KeyRing in the format |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 137 | # `projects/*/locations/*/keyRings/*`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 138 | "createTime": "A String", # Output only. The time at which this KeyRing was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 139 | }</pre> |
| 140 | </div> |
| 141 | |
| 142 | <div class="method"> |
| 143 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 144 | <pre>Returns metadata for a given KeyRing. |
| 145 | |
| 146 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 147 | name: string, Required. The name of the KeyRing to get. (required) |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 148 | x__xgafv: string, V1 error format. |
| 149 | Allowed values |
| 150 | 1 - v1 error format |
| 151 | 2 - v2 error format |
| 152 | |
| 153 | Returns: |
| 154 | An object of the form: |
| 155 | |
| 156 | { # A KeyRing is a toplevel logical grouping of CryptoKeys. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 157 | "name": "A String", # Output only. The resource name for the KeyRing in the format |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 158 | # `projects/*/locations/*/keyRings/*`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 159 | "createTime": "A String", # Output only. The time at which this KeyRing was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 160 | }</pre> |
| 161 | </div> |
| 162 | |
| 163 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 164 | <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 165 | <pre>Gets the access control policy for a resource. |
| 166 | Returns an empty policy if the resource exists and does not have a policy |
| 167 | set. |
| 168 | |
| 169 | Args: |
| 170 | resource: string, REQUIRED: The resource for which the policy is being requested. |
| 171 | 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] | 172 | options_requestedPolicyVersion: integer, Optional. The policy format version to be returned. |
| 173 | |
| 174 | Valid values are 0, 1, and 3. Requests specifying an invalid value will be |
| 175 | rejected. |
| 176 | |
| 177 | Requests for policies with any conditional bindings must specify version 3. |
| 178 | Policies without any conditional bindings may specify any valid value or |
| 179 | leave the field unset. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 180 | |
| 181 | To learn which resources support conditions in their IAM policies, see the |
| 182 | [IAM |
| 183 | documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 184 | x__xgafv: string, V1 error format. |
| 185 | Allowed values |
| 186 | 1 - v1 error format |
| 187 | 2 - v2 error format |
| 188 | |
| 189 | Returns: |
| 190 | An object of the form: |
| 191 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 192 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 193 | # controls for Google Cloud resources. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 194 | # |
| 195 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 196 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 197 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 198 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 199 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 200 | # custom role. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 201 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 202 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 203 | # `condition`, which is a logical expression that allows access to a resource |
| 204 | # only if the expression evaluates to `true`. A condition can add constraints |
| 205 | # based on attributes of the request, the resource, or both. To learn which |
| 206 | # resources support conditions in their IAM policies, see the |
| 207 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 208 | # |
| 209 | # **JSON example:** |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 210 | # |
| 211 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 212 | # "bindings": [ |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 213 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 214 | # "role": "roles/resourcemanager.organizationAdmin", |
| 215 | # "members": [ |
| 216 | # "user:mike@example.com", |
| 217 | # "group:admins@example.com", |
| 218 | # "domain:google.com", |
| 219 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 220 | # ] |
| 221 | # }, |
| 222 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 223 | # "role": "roles/resourcemanager.organizationViewer", |
| 224 | # "members": [ |
| 225 | # "user:eve@example.com" |
| 226 | # ], |
| 227 | # "condition": { |
| 228 | # "title": "expirable access", |
| 229 | # "description": "Does not grant access after Sep 2020", |
| 230 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 231 | # } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 232 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 233 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 234 | # "etag": "BwWWja0YfJA=", |
| 235 | # "version": 3 |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 236 | # } |
| 237 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 238 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 239 | # |
| 240 | # bindings: |
| 241 | # - members: |
| 242 | # - user:mike@example.com |
| 243 | # - group:admins@example.com |
| 244 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 245 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 246 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 247 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 248 | # - user:eve@example.com |
| 249 | # role: roles/resourcemanager.organizationViewer |
| 250 | # condition: |
| 251 | # title: expirable access |
| 252 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 253 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 254 | # - etag: BwWWja0YfJA= |
| 255 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 256 | # |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 257 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 258 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 259 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 260 | # prevent simultaneous updates of a policy from overwriting each other. |
| 261 | # It is strongly suggested that systems make use of the `etag` in the |
| 262 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 263 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 264 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 265 | # ensure that their change will be applied to the same version of the policy. |
| 266 | # |
| 267 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 268 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 269 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 270 | # the conditions in the version `3` policy are lost. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 271 | "version": 42, # Specifies the format of the policy. |
| 272 | # |
| 273 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 274 | # are rejected. |
| 275 | # |
| 276 | # Any operation that affects conditional role bindings must specify version |
| 277 | # `3`. This requirement applies to the following operations: |
| 278 | # |
| 279 | # * Getting a policy that includes a conditional role binding |
| 280 | # * Adding a conditional role binding to a policy |
| 281 | # * Changing a conditional role binding in a policy |
| 282 | # * Removing any role binding, with or without a condition, from a policy |
| 283 | # that includes conditions |
| 284 | # |
| 285 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 286 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 287 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 288 | # the conditions in the version `3` policy are lost. |
| 289 | # |
| 290 | # If a policy does not include any conditions, operations on that policy may |
| 291 | # specify any valid version or leave the field unset. |
| 292 | # |
| 293 | # To learn which resources support conditions in their IAM policies, see the |
| 294 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 295 | "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] | 296 | # `condition` that determines how and when the `bindings` are applied. Each |
| 297 | # of the `bindings` must contain at least one member. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 298 | { # Associates `members` with a `role`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 299 | "role": "A String", # Role that is assigned to `members`. |
| 300 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 301 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 302 | # |
| 303 | # If the condition evaluates to `true`, then this binding applies to the |
| 304 | # current request. |
| 305 | # |
| 306 | # If the condition evaluates to `false`, then this binding does not apply to |
| 307 | # the current request. However, a different role binding might grant the same |
| 308 | # role to one or more of the members in this binding. |
| 309 | # |
| 310 | # To learn which resources support conditions in their IAM policies, see the |
| 311 | # [IAM |
| 312 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 313 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 314 | # are documented at https://github.com/google/cel-spec. |
| 315 | # |
| 316 | # Example (Comparison): |
| 317 | # |
| 318 | # title: "Summary size limit" |
| 319 | # description: "Determines if a summary is less than 100 chars" |
| 320 | # expression: "document.summary.size() < 100" |
| 321 | # |
| 322 | # Example (Equality): |
| 323 | # |
| 324 | # title: "Requestor is owner" |
| 325 | # description: "Determines if requestor is the document owner" |
| 326 | # expression: "document.owner == request.auth.claims.email" |
| 327 | # |
| 328 | # Example (Logic): |
| 329 | # |
| 330 | # title: "Public documents" |
| 331 | # description: "Determine whether the document should be publicly visible" |
| 332 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 333 | # |
| 334 | # Example (Data Manipulation): |
| 335 | # |
| 336 | # title: "Notification string" |
| 337 | # description: "Create a notification string with a timestamp." |
| 338 | # expression: "'New message received at ' + string(document.create_time)" |
| 339 | # |
| 340 | # The exact variables and functions that may be referenced within an expression |
| 341 | # are determined by the service that evaluates it. See the service |
| 342 | # documentation for additional information. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 343 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 344 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 345 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 346 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 347 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 348 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 349 | # syntax. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 350 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 351 | # 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] | 352 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [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 |
| 363 | # account. For example, `alice@example.com` . |
| 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 | # |
| 372 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 373 | # identifier) representing a user that has been recently deleted. For |
| 374 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 375 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 376 | # retains the role in the binding. |
| 377 | # |
| 378 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 379 | # unique identifier) representing a service account that has been recently |
| 380 | # deleted. For example, |
| 381 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 382 | # If the service account is undeleted, this value reverts to |
| 383 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 384 | # role in the binding. |
| 385 | # |
| 386 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 387 | # identifier) representing a Google group that has been recently |
| 388 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 389 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 390 | # recovered group retains the role in the binding. |
| 391 | # |
| 392 | # |
| 393 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 394 | # users of that domain. For example, `google.com` or `example.com`. |
| 395 | # |
| 396 | "A String", |
| 397 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 398 | }, |
| 399 | ], |
| 400 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 401 | { # Specifies the audit configuration for a service. |
| 402 | # The configuration determines which permission types are logged, and what |
| 403 | # identities, if any, are exempted from logging. |
| 404 | # An AuditConfig must have one or more AuditLogConfigs. |
| 405 | # |
| 406 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 407 | # the union of the two AuditConfigs is used for that service: the log_types |
| 408 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 409 | # AuditLogConfig are exempted. |
| 410 | # |
| 411 | # Example Policy with multiple AuditConfigs: |
| 412 | # |
| 413 | # { |
| 414 | # "audit_configs": [ |
| 415 | # { |
| 416 | # "service": "allServices", |
| 417 | # "audit_log_configs": [ |
| 418 | # { |
| 419 | # "log_type": "DATA_READ", |
| 420 | # "exempted_members": [ |
| 421 | # "user:jose@example.com" |
| 422 | # ] |
| 423 | # }, |
| 424 | # { |
| 425 | # "log_type": "DATA_WRITE" |
| 426 | # }, |
| 427 | # { |
| 428 | # "log_type": "ADMIN_READ" |
| 429 | # } |
| 430 | # ] |
| 431 | # }, |
| 432 | # { |
| 433 | # "service": "sampleservice.googleapis.com", |
| 434 | # "audit_log_configs": [ |
| 435 | # { |
| 436 | # "log_type": "DATA_READ" |
| 437 | # }, |
| 438 | # { |
| 439 | # "log_type": "DATA_WRITE", |
| 440 | # "exempted_members": [ |
| 441 | # "user:aliya@example.com" |
| 442 | # ] |
| 443 | # } |
| 444 | # ] |
| 445 | # } |
| 446 | # ] |
| 447 | # } |
| 448 | # |
| 449 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 450 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 451 | # aliya@example.com from DATA_WRITE logging. |
| 452 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 453 | { # Provides the configuration for logging a type of permissions. |
| 454 | # Example: |
| 455 | # |
| 456 | # { |
| 457 | # "audit_log_configs": [ |
| 458 | # { |
| 459 | # "log_type": "DATA_READ", |
| 460 | # "exempted_members": [ |
| 461 | # "user:jose@example.com" |
| 462 | # ] |
| 463 | # }, |
| 464 | # { |
| 465 | # "log_type": "DATA_WRITE" |
| 466 | # } |
| 467 | # ] |
| 468 | # } |
| 469 | # |
| 470 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 471 | # jose@example.com from DATA_READ logging. |
| 472 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 473 | # permission. |
| 474 | # Follows the same format of Binding.members. |
| 475 | "A String", |
| 476 | ], |
| 477 | "logType": "A String", # The log type that this config enables. |
| 478 | }, |
| 479 | ], |
| 480 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 481 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 482 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 483 | }, |
| 484 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 485 | }</pre> |
| 486 | </div> |
| 487 | |
| 488 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 489 | <code class="details" id="list">list(parent, orderBy=None, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 490 | <pre>Lists KeyRings. |
| 491 | |
| 492 | Args: |
| 493 | parent: string, Required. The resource name of the location associated with the |
| 494 | KeyRings, in the format `projects/*/locations/*`. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 495 | orderBy: string, Optional. Specify how the results should be sorted. If not specified, the |
| 496 | results will be sorted in the default order. For more information, see |
| 497 | [Sorting and filtering list |
| 498 | results](https://cloud.google.com/kms/docs/sorting-and-filtering). |
| 499 | pageSize: integer, Optional. Optional limit on the number of KeyRings to include in the |
| 500 | response. Further KeyRings can subsequently be obtained by |
| 501 | including the ListKeyRingsResponse.next_page_token in a subsequent |
| 502 | request. If unspecified, the server will pick an appropriate default. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 503 | filter: string, Optional. Only include resources that match the filter in the response. For |
| 504 | more information, see |
| 505 | [Sorting and filtering list |
| 506 | results](https://cloud.google.com/kms/docs/sorting-and-filtering). |
| 507 | pageToken: string, Optional. Optional pagination token, returned earlier via |
| 508 | ListKeyRingsResponse.next_page_token. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 509 | x__xgafv: string, V1 error format. |
| 510 | Allowed values |
| 511 | 1 - v1 error format |
| 512 | 2 - v2 error format |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 513 | |
| 514 | Returns: |
| 515 | An object of the form: |
| 516 | |
| 517 | { # Response message for KeyManagementService.ListKeyRings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 518 | "keyRings": [ # The list of KeyRings. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 519 | { # A KeyRing is a toplevel logical grouping of CryptoKeys. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 520 | "name": "A String", # Output only. The resource name for the KeyRing in the format |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 521 | # `projects/*/locations/*/keyRings/*`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 522 | "createTime": "A String", # Output only. The time at which this KeyRing was created. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 523 | }, |
| 524 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 525 | "totalSize": 42, # The total number of KeyRings that matched the query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 526 | "nextPageToken": "A String", # A token to retrieve next page of results. Pass this value in |
| 527 | # ListKeyRingsRequest.page_token to retrieve the next page of results. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 528 | }</pre> |
| 529 | </div> |
| 530 | |
| 531 | <div class="method"> |
| 532 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 533 | <pre>Retrieves the next page of results. |
| 534 | |
| 535 | Args: |
| 536 | previous_request: The request for the previous page. (required) |
| 537 | previous_response: The response from the request for the previous page. (required) |
| 538 | |
| 539 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 540 | A request object that you can call 'execute()' on to request the next |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 541 | page. Returns None if there are no more items in the collection. |
| 542 | </pre> |
| 543 | </div> |
| 544 | |
| 545 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 546 | <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 547 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 548 | existing policy. |
| 549 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 550 | Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 551 | |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 552 | Args: |
| 553 | resource: string, REQUIRED: The resource for which the policy is being specified. |
| 554 | 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] | 555 | body: object, The request body. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 556 | The object takes the form of: |
| 557 | |
| 558 | { # Request message for `SetIamPolicy` method. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 559 | "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only |
| 560 | # the fields in the mask will be modified. If no mask is provided, the |
| 561 | # following default mask is used: |
| 562 | # |
| 563 | # `paths: "bindings, etag"` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 564 | "policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 565 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 566 | # valid policy but certain Cloud Platform services (such as Projects) |
| 567 | # might reject them. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 568 | # controls for Google Cloud resources. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 569 | # |
| 570 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 571 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 572 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 573 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 574 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 575 | # custom role. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 576 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 577 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 578 | # `condition`, which is a logical expression that allows access to a resource |
| 579 | # only if the expression evaluates to `true`. A condition can add constraints |
| 580 | # based on attributes of the request, the resource, or both. To learn which |
| 581 | # resources support conditions in their IAM policies, see the |
| 582 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 583 | # |
| 584 | # **JSON example:** |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 585 | # |
| 586 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 587 | # "bindings": [ |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 588 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 589 | # "role": "roles/resourcemanager.organizationAdmin", |
| 590 | # "members": [ |
| 591 | # "user:mike@example.com", |
| 592 | # "group:admins@example.com", |
| 593 | # "domain:google.com", |
| 594 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 595 | # ] |
| 596 | # }, |
| 597 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 598 | # "role": "roles/resourcemanager.organizationViewer", |
| 599 | # "members": [ |
| 600 | # "user:eve@example.com" |
| 601 | # ], |
| 602 | # "condition": { |
| 603 | # "title": "expirable access", |
| 604 | # "description": "Does not grant access after Sep 2020", |
| 605 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 606 | # } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 607 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 608 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 609 | # "etag": "BwWWja0YfJA=", |
| 610 | # "version": 3 |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 611 | # } |
| 612 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 613 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 614 | # |
| 615 | # bindings: |
| 616 | # - members: |
| 617 | # - user:mike@example.com |
| 618 | # - group:admins@example.com |
| 619 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 620 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 621 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 622 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 623 | # - user:eve@example.com |
| 624 | # role: roles/resourcemanager.organizationViewer |
| 625 | # condition: |
| 626 | # title: expirable access |
| 627 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 628 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 629 | # - etag: BwWWja0YfJA= |
| 630 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 631 | # |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 632 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 633 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 634 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 635 | # prevent simultaneous updates of a policy from overwriting each other. |
| 636 | # It is strongly suggested that systems make use of the `etag` in the |
| 637 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 638 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 639 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 640 | # ensure that their change will be applied to the same version of the policy. |
| 641 | # |
| 642 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 643 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 644 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 645 | # the conditions in the version `3` policy are lost. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 646 | "version": 42, # Specifies the format of the policy. |
| 647 | # |
| 648 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 649 | # are rejected. |
| 650 | # |
| 651 | # Any operation that affects conditional role bindings must specify version |
| 652 | # `3`. This requirement applies to the following operations: |
| 653 | # |
| 654 | # * Getting a policy that includes a conditional role binding |
| 655 | # * Adding a conditional role binding to a policy |
| 656 | # * Changing a conditional role binding in a policy |
| 657 | # * Removing any role binding, with or without a condition, from a policy |
| 658 | # that includes conditions |
| 659 | # |
| 660 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 661 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 662 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 663 | # the conditions in the version `3` policy are lost. |
| 664 | # |
| 665 | # If a policy does not include any conditions, operations on that policy may |
| 666 | # specify any valid version or leave the field unset. |
| 667 | # |
| 668 | # To learn which resources support conditions in their IAM policies, see the |
| 669 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 670 | "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] | 671 | # `condition` that determines how and when the `bindings` are applied. Each |
| 672 | # of the `bindings` must contain at least one member. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 673 | { # Associates `members` with a `role`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 674 | "role": "A String", # Role that is assigned to `members`. |
| 675 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 676 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 677 | # |
| 678 | # If the condition evaluates to `true`, then this binding applies to the |
| 679 | # current request. |
| 680 | # |
| 681 | # If the condition evaluates to `false`, then this binding does not apply to |
| 682 | # the current request. However, a different role binding might grant the same |
| 683 | # role to one or more of the members in this binding. |
| 684 | # |
| 685 | # To learn which resources support conditions in their IAM policies, see the |
| 686 | # [IAM |
| 687 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 688 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 689 | # are documented at https://github.com/google/cel-spec. |
| 690 | # |
| 691 | # Example (Comparison): |
| 692 | # |
| 693 | # title: "Summary size limit" |
| 694 | # description: "Determines if a summary is less than 100 chars" |
| 695 | # expression: "document.summary.size() < 100" |
| 696 | # |
| 697 | # Example (Equality): |
| 698 | # |
| 699 | # title: "Requestor is owner" |
| 700 | # description: "Determines if requestor is the document owner" |
| 701 | # expression: "document.owner == request.auth.claims.email" |
| 702 | # |
| 703 | # Example (Logic): |
| 704 | # |
| 705 | # title: "Public documents" |
| 706 | # description: "Determine whether the document should be publicly visible" |
| 707 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 708 | # |
| 709 | # Example (Data Manipulation): |
| 710 | # |
| 711 | # title: "Notification string" |
| 712 | # description: "Create a notification string with a timestamp." |
| 713 | # expression: "'New message received at ' + string(document.create_time)" |
| 714 | # |
| 715 | # The exact variables and functions that may be referenced within an expression |
| 716 | # are determined by the service that evaluates it. See the service |
| 717 | # documentation for additional information. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 718 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 719 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 720 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 721 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 722 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 723 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 724 | # syntax. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 725 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 726 | # 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] | 727 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 728 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 729 | # `members` can have the following values: |
| 730 | # |
| 731 | # * `allUsers`: A special identifier that represents anyone who is |
| 732 | # on the internet; with or without a Google account. |
| 733 | # |
| 734 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 735 | # who is authenticated with a Google account or a service account. |
| 736 | # |
| 737 | # * `user:{emailid}`: An email address that represents a specific Google |
| 738 | # account. For example, `alice@example.com` . |
| 739 | # |
| 740 | # |
| 741 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 742 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 743 | # |
| 744 | # * `group:{emailid}`: An email address that represents a Google group. |
| 745 | # For example, `admins@example.com`. |
| 746 | # |
| 747 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 748 | # identifier) representing a user that has been recently deleted. For |
| 749 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 750 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 751 | # retains the role in the binding. |
| 752 | # |
| 753 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 754 | # unique identifier) representing a service account that has been recently |
| 755 | # deleted. For example, |
| 756 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 757 | # If the service account is undeleted, this value reverts to |
| 758 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 759 | # role in the binding. |
| 760 | # |
| 761 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 762 | # identifier) representing a Google group that has been recently |
| 763 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 764 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 765 | # recovered group retains the role in the binding. |
| 766 | # |
| 767 | # |
| 768 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 769 | # users of that domain. For example, `google.com` or `example.com`. |
| 770 | # |
| 771 | "A String", |
| 772 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 773 | }, |
| 774 | ], |
| 775 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 776 | { # Specifies the audit configuration for a service. |
| 777 | # The configuration determines which permission types are logged, and what |
| 778 | # identities, if any, are exempted from logging. |
| 779 | # An AuditConfig must have one or more AuditLogConfigs. |
| 780 | # |
| 781 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 782 | # the union of the two AuditConfigs is used for that service: the log_types |
| 783 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 784 | # AuditLogConfig are exempted. |
| 785 | # |
| 786 | # Example Policy with multiple AuditConfigs: |
| 787 | # |
| 788 | # { |
| 789 | # "audit_configs": [ |
| 790 | # { |
| 791 | # "service": "allServices", |
| 792 | # "audit_log_configs": [ |
| 793 | # { |
| 794 | # "log_type": "DATA_READ", |
| 795 | # "exempted_members": [ |
| 796 | # "user:jose@example.com" |
| 797 | # ] |
| 798 | # }, |
| 799 | # { |
| 800 | # "log_type": "DATA_WRITE" |
| 801 | # }, |
| 802 | # { |
| 803 | # "log_type": "ADMIN_READ" |
| 804 | # } |
| 805 | # ] |
| 806 | # }, |
| 807 | # { |
| 808 | # "service": "sampleservice.googleapis.com", |
| 809 | # "audit_log_configs": [ |
| 810 | # { |
| 811 | # "log_type": "DATA_READ" |
| 812 | # }, |
| 813 | # { |
| 814 | # "log_type": "DATA_WRITE", |
| 815 | # "exempted_members": [ |
| 816 | # "user:aliya@example.com" |
| 817 | # ] |
| 818 | # } |
| 819 | # ] |
| 820 | # } |
| 821 | # ] |
| 822 | # } |
| 823 | # |
| 824 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 825 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 826 | # aliya@example.com from DATA_WRITE logging. |
| 827 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 828 | { # Provides the configuration for logging a type of permissions. |
| 829 | # Example: |
| 830 | # |
| 831 | # { |
| 832 | # "audit_log_configs": [ |
| 833 | # { |
| 834 | # "log_type": "DATA_READ", |
| 835 | # "exempted_members": [ |
| 836 | # "user:jose@example.com" |
| 837 | # ] |
| 838 | # }, |
| 839 | # { |
| 840 | # "log_type": "DATA_WRITE" |
| 841 | # } |
| 842 | # ] |
| 843 | # } |
| 844 | # |
| 845 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 846 | # jose@example.com from DATA_READ logging. |
| 847 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 848 | # permission. |
| 849 | # Follows the same format of Binding.members. |
| 850 | "A String", |
| 851 | ], |
| 852 | "logType": "A String", # The log type that this config enables. |
| 853 | }, |
| 854 | ], |
| 855 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 856 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 857 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 858 | }, |
| 859 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 860 | }, |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 861 | } |
| 862 | |
| 863 | x__xgafv: string, V1 error format. |
| 864 | Allowed values |
| 865 | 1 - v1 error format |
| 866 | 2 - v2 error format |
| 867 | |
| 868 | Returns: |
| 869 | An object of the form: |
| 870 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 871 | { # An Identity and Access Management (IAM) policy, which specifies access |
| 872 | # controls for Google Cloud resources. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 873 | # |
| 874 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 875 | # A `Policy` is a collection of `bindings`. A `binding` binds one or more |
| 876 | # `members` to a single `role`. Members can be user accounts, service accounts, |
| 877 | # Google groups, and domains (such as G Suite). A `role` is a named list of |
| 878 | # permissions; each `role` can be an IAM predefined role or a user-created |
| 879 | # custom role. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 880 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 881 | # For some types of Google Cloud resources, a `binding` can also specify a |
| 882 | # `condition`, which is a logical expression that allows access to a resource |
| 883 | # only if the expression evaluates to `true`. A condition can add constraints |
| 884 | # based on attributes of the request, the resource, or both. To learn which |
| 885 | # resources support conditions in their IAM policies, see the |
| 886 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 887 | # |
| 888 | # **JSON example:** |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 889 | # |
| 890 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 891 | # "bindings": [ |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 892 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 893 | # "role": "roles/resourcemanager.organizationAdmin", |
| 894 | # "members": [ |
| 895 | # "user:mike@example.com", |
| 896 | # "group:admins@example.com", |
| 897 | # "domain:google.com", |
| 898 | # "serviceAccount:my-project-id@appspot.gserviceaccount.com" |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 899 | # ] |
| 900 | # }, |
| 901 | # { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 902 | # "role": "roles/resourcemanager.organizationViewer", |
| 903 | # "members": [ |
| 904 | # "user:eve@example.com" |
| 905 | # ], |
| 906 | # "condition": { |
| 907 | # "title": "expirable access", |
| 908 | # "description": "Does not grant access after Sep 2020", |
| 909 | # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 910 | # } |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 911 | # } |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 912 | # ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 913 | # "etag": "BwWWja0YfJA=", |
| 914 | # "version": 3 |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 915 | # } |
| 916 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 917 | # **YAML example:** |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 918 | # |
| 919 | # bindings: |
| 920 | # - members: |
| 921 | # - user:mike@example.com |
| 922 | # - group:admins@example.com |
| 923 | # - domain:google.com |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 924 | # - serviceAccount:my-project-id@appspot.gserviceaccount.com |
| 925 | # role: roles/resourcemanager.organizationAdmin |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 926 | # - members: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 927 | # - user:eve@example.com |
| 928 | # role: roles/resourcemanager.organizationViewer |
| 929 | # condition: |
| 930 | # title: expirable access |
| 931 | # description: Does not grant access after Sep 2020 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 932 | # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 933 | # - etag: BwWWja0YfJA= |
| 934 | # - version: 3 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 935 | # |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 936 | # For a description of IAM and its features, see the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 937 | # [IAM documentation](https://cloud.google.com/iam/docs/). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 938 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 939 | # prevent simultaneous updates of a policy from overwriting each other. |
| 940 | # It is strongly suggested that systems make use of the `etag` in the |
| 941 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 942 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 943 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 944 | # ensure that their change will be applied to the same version of the policy. |
| 945 | # |
| 946 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 947 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 948 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 949 | # the conditions in the version `3` policy are lost. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 950 | "version": 42, # Specifies the format of the policy. |
| 951 | # |
| 952 | # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value |
| 953 | # are rejected. |
| 954 | # |
| 955 | # Any operation that affects conditional role bindings must specify version |
| 956 | # `3`. This requirement applies to the following operations: |
| 957 | # |
| 958 | # * Getting a policy that includes a conditional role binding |
| 959 | # * Adding a conditional role binding to a policy |
| 960 | # * Changing a conditional role binding in a policy |
| 961 | # * Removing any role binding, with or without a condition, from a policy |
| 962 | # that includes conditions |
| 963 | # |
| 964 | # **Important:** If you use IAM Conditions, you must include the `etag` field |
| 965 | # whenever you call `setIamPolicy`. If you omit this field, then IAM allows |
| 966 | # you to overwrite a version `3` policy with a version `1` policy, and all of |
| 967 | # the conditions in the version `3` policy are lost. |
| 968 | # |
| 969 | # If a policy does not include any conditions, operations on that policy may |
| 970 | # specify any valid version or leave the field unset. |
| 971 | # |
| 972 | # To learn which resources support conditions in their IAM policies, see the |
| 973 | # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 974 | "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] | 975 | # `condition` that determines how and when the `bindings` are applied. Each |
| 976 | # of the `bindings` must contain at least one member. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 977 | { # Associates `members` with a `role`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 978 | "role": "A String", # Role that is assigned to `members`. |
| 979 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 980 | "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding. |
| 981 | # |
| 982 | # If the condition evaluates to `true`, then this binding applies to the |
| 983 | # current request. |
| 984 | # |
| 985 | # If the condition evaluates to `false`, then this binding does not apply to |
| 986 | # the current request. However, a different role binding might grant the same |
| 987 | # role to one or more of the members in this binding. |
| 988 | # |
| 989 | # To learn which resources support conditions in their IAM policies, see the |
| 990 | # [IAM |
| 991 | # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). |
| 992 | # syntax. CEL is a C-like expression language. The syntax and semantics of CEL |
| 993 | # are documented at https://github.com/google/cel-spec. |
| 994 | # |
| 995 | # Example (Comparison): |
| 996 | # |
| 997 | # title: "Summary size limit" |
| 998 | # description: "Determines if a summary is less than 100 chars" |
| 999 | # expression: "document.summary.size() < 100" |
| 1000 | # |
| 1001 | # Example (Equality): |
| 1002 | # |
| 1003 | # title: "Requestor is owner" |
| 1004 | # description: "Determines if requestor is the document owner" |
| 1005 | # expression: "document.owner == request.auth.claims.email" |
| 1006 | # |
| 1007 | # Example (Logic): |
| 1008 | # |
| 1009 | # title: "Public documents" |
| 1010 | # description: "Determine whether the document should be publicly visible" |
| 1011 | # expression: "document.type != 'private' && document.type != 'internal'" |
| 1012 | # |
| 1013 | # Example (Data Manipulation): |
| 1014 | # |
| 1015 | # title: "Notification string" |
| 1016 | # description: "Create a notification string with a timestamp." |
| 1017 | # expression: "'New message received at ' + string(document.create_time)" |
| 1018 | # |
| 1019 | # The exact variables and functions that may be referenced within an expression |
| 1020 | # are determined by the service that evaluates it. See the service |
| 1021 | # documentation for additional information. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1022 | "description": "A String", # Optional. Description of the expression. This is a longer text which |
| 1023 | # describes the expression, e.g. when hovered over it in a UI. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1024 | "title": "A String", # Optional. Title for the expression, i.e. a short string describing |
| 1025 | # its purpose. This can be used e.g. in UIs which allow to enter the |
| 1026 | # expression. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1027 | "expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1028 | # syntax. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1029 | "location": "A String", # Optional. String indicating the location of the expression for error |
| 1030 | # 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] | 1031 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1032 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 1033 | # `members` can have the following values: |
| 1034 | # |
| 1035 | # * `allUsers`: A special identifier that represents anyone who is |
| 1036 | # on the internet; with or without a Google account. |
| 1037 | # |
| 1038 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 1039 | # who is authenticated with a Google account or a service account. |
| 1040 | # |
| 1041 | # * `user:{emailid}`: An email address that represents a specific Google |
| 1042 | # account. For example, `alice@example.com` . |
| 1043 | # |
| 1044 | # |
| 1045 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 1046 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 1047 | # |
| 1048 | # * `group:{emailid}`: An email address that represents a Google group. |
| 1049 | # For example, `admins@example.com`. |
| 1050 | # |
| 1051 | # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1052 | # identifier) representing a user that has been recently deleted. For |
| 1053 | # example, `alice@example.com?uid=123456789012345678901`. If the user is |
| 1054 | # recovered, this value reverts to `user:{emailid}` and the recovered user |
| 1055 | # retains the role in the binding. |
| 1056 | # |
| 1057 | # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus |
| 1058 | # unique identifier) representing a service account that has been recently |
| 1059 | # deleted. For example, |
| 1060 | # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. |
| 1061 | # If the service account is undeleted, this value reverts to |
| 1062 | # `serviceAccount:{emailid}` and the undeleted service account retains the |
| 1063 | # role in the binding. |
| 1064 | # |
| 1065 | # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique |
| 1066 | # identifier) representing a Google group that has been recently |
| 1067 | # deleted. For example, `admins@example.com?uid=123456789012345678901`. If |
| 1068 | # the group is recovered, this value reverts to `group:{emailid}` and the |
| 1069 | # recovered group retains the role in the binding. |
| 1070 | # |
| 1071 | # |
| 1072 | # * `domain:{domain}`: The G Suite domain (primary) that represents all the |
| 1073 | # users of that domain. For example, `google.com` or `example.com`. |
| 1074 | # |
| 1075 | "A String", |
| 1076 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1077 | }, |
| 1078 | ], |
| 1079 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 1080 | { # Specifies the audit configuration for a service. |
| 1081 | # The configuration determines which permission types are logged, and what |
| 1082 | # identities, if any, are exempted from logging. |
| 1083 | # An AuditConfig must have one or more AuditLogConfigs. |
| 1084 | # |
| 1085 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 1086 | # the union of the two AuditConfigs is used for that service: the log_types |
| 1087 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 1088 | # AuditLogConfig are exempted. |
| 1089 | # |
| 1090 | # Example Policy with multiple AuditConfigs: |
| 1091 | # |
| 1092 | # { |
| 1093 | # "audit_configs": [ |
| 1094 | # { |
| 1095 | # "service": "allServices", |
| 1096 | # "audit_log_configs": [ |
| 1097 | # { |
| 1098 | # "log_type": "DATA_READ", |
| 1099 | # "exempted_members": [ |
| 1100 | # "user:jose@example.com" |
| 1101 | # ] |
| 1102 | # }, |
| 1103 | # { |
| 1104 | # "log_type": "DATA_WRITE" |
| 1105 | # }, |
| 1106 | # { |
| 1107 | # "log_type": "ADMIN_READ" |
| 1108 | # } |
| 1109 | # ] |
| 1110 | # }, |
| 1111 | # { |
| 1112 | # "service": "sampleservice.googleapis.com", |
| 1113 | # "audit_log_configs": [ |
| 1114 | # { |
| 1115 | # "log_type": "DATA_READ" |
| 1116 | # }, |
| 1117 | # { |
| 1118 | # "log_type": "DATA_WRITE", |
| 1119 | # "exempted_members": [ |
| 1120 | # "user:aliya@example.com" |
| 1121 | # ] |
| 1122 | # } |
| 1123 | # ] |
| 1124 | # } |
| 1125 | # ] |
| 1126 | # } |
| 1127 | # |
| 1128 | # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 1129 | # logging. It also exempts jose@example.com from DATA_READ logging, and |
| 1130 | # aliya@example.com from DATA_WRITE logging. |
| 1131 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 1132 | { # Provides the configuration for logging a type of permissions. |
| 1133 | # Example: |
| 1134 | # |
| 1135 | # { |
| 1136 | # "audit_log_configs": [ |
| 1137 | # { |
| 1138 | # "log_type": "DATA_READ", |
| 1139 | # "exempted_members": [ |
| 1140 | # "user:jose@example.com" |
| 1141 | # ] |
| 1142 | # }, |
| 1143 | # { |
| 1144 | # "log_type": "DATA_WRITE" |
| 1145 | # } |
| 1146 | # ] |
| 1147 | # } |
| 1148 | # |
| 1149 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 1150 | # jose@example.com from DATA_READ logging. |
| 1151 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 1152 | # permission. |
| 1153 | # Follows the same format of Binding.members. |
| 1154 | "A String", |
| 1155 | ], |
| 1156 | "logType": "A String", # The log type that this config enables. |
| 1157 | }, |
| 1158 | ], |
| 1159 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
| 1160 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 1161 | # `allServices` is a special value that covers all services. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1162 | }, |
| 1163 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1164 | }</pre> |
| 1165 | </div> |
| 1166 | |
| 1167 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1168 | <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1169 | <pre>Returns permissions that a caller has on the specified resource. |
| 1170 | 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] | 1171 | permissions, not a `NOT_FOUND` error. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1172 | |
| 1173 | Note: This operation is designed to be used for building permission-aware |
| 1174 | UIs and command-line tools, not for authorization checking. This operation |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1175 | may "fail open" without warning. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1176 | |
| 1177 | Args: |
| 1178 | resource: string, REQUIRED: The resource for which the policy detail is being requested. |
| 1179 | 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] | 1180 | body: object, The request body. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1181 | The object takes the form of: |
| 1182 | |
| 1183 | { # Request message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1184 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 1185 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1186 | # information see |
| 1187 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1188 | "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1189 | ], |
| 1190 | } |
| 1191 | |
| 1192 | x__xgafv: string, V1 error format. |
| 1193 | Allowed values |
| 1194 | 1 - v1 error format |
| 1195 | 2 - v2 error format |
| 1196 | |
| 1197 | Returns: |
| 1198 | An object of the form: |
| 1199 | |
| 1200 | { # Response message for `TestIamPermissions` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1201 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1202 | # allowed. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1203 | "A String", |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1204 | ], |
| 1205 | }</pre> |
| 1206 | </div> |
| 1207 | |
| 1208 | </body></html> |