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 | |
| 75 | <h1><a href="cloudkms_v1.html">Google 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> |
| 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"> |
| 83 | <code><a href="#create">create(parent=None, body, keyRingId=None, x__xgafv=None)</a></code></p> |
| 84 | <p class="firstline">Create a new KeyRing in a given Project and Location.</p> |
| 85 | <p class="toc_element"> |
| 86 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 87 | <p class="firstline">Returns metadata for a given KeyRing.</p> |
| 88 | <p class="toc_element"> |
| 89 | <code><a href="#getIamPolicy">getIamPolicy(resource=None, x__xgafv=None)</a></code></p> |
| 90 | <p class="firstline">Gets the access control policy for a resource.</p> |
| 91 | <p class="toc_element"> |
| 92 | <code><a href="#list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p> |
| 93 | <p class="firstline">Lists KeyRings.</p> |
| 94 | <p class="toc_element"> |
| 95 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 96 | <p class="firstline">Retrieves the next page of results.</p> |
| 97 | <p class="toc_element"> |
| 98 | <code><a href="#setIamPolicy">setIamPolicy(resource=None, body, x__xgafv=None)</a></code></p> |
| 99 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any</p> |
| 100 | <p class="toc_element"> |
| 101 | <code><a href="#testIamPermissions">testIamPermissions(resource=None, body, x__xgafv=None)</a></code></p> |
| 102 | <p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
| 103 | <h3>Method Details</h3> |
| 104 | <div class="method"> |
| 105 | <code class="details" id="create">create(parent=None, body, keyRingId=None, x__xgafv=None)</code> |
| 106 | <pre>Create a new KeyRing in a given Project and Location. |
| 107 | |
| 108 | Args: |
| 109 | parent: string, Required. The resource name of the location associated with the |
| 110 | KeyRings, in the format `projects/*/locations/*`. (required) |
| 111 | body: object, The request body. (required) |
| 112 | The object takes the form of: |
| 113 | |
| 114 | { # A KeyRing is a toplevel logical grouping of CryptoKeys. |
| 115 | "createTime": "A String", # Output only. The time at which this KeyRing was created. |
| 116 | "name": "A String", # Output only. The resource name for the KeyRing in the format |
| 117 | # `projects/*/locations/*/keyRings/*`. |
| 118 | } |
| 119 | |
| 120 | keyRingId: string, Required. It must be unique within a location and match the regular |
| 121 | expression `[a-zA-Z0-9_-]{1,63}` |
| 122 | x__xgafv: string, V1 error format. |
| 123 | Allowed values |
| 124 | 1 - v1 error format |
| 125 | 2 - v2 error format |
| 126 | |
| 127 | Returns: |
| 128 | An object of the form: |
| 129 | |
| 130 | { # A KeyRing is a toplevel logical grouping of CryptoKeys. |
| 131 | "createTime": "A String", # Output only. The time at which this KeyRing was created. |
| 132 | "name": "A String", # Output only. The resource name for the KeyRing in the format |
| 133 | # `projects/*/locations/*/keyRings/*`. |
| 134 | }</pre> |
| 135 | </div> |
| 136 | |
| 137 | <div class="method"> |
| 138 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 139 | <pre>Returns metadata for a given KeyRing. |
| 140 | |
| 141 | Args: |
| 142 | name: string, The name of the KeyRing to get. (required) |
| 143 | x__xgafv: string, V1 error format. |
| 144 | Allowed values |
| 145 | 1 - v1 error format |
| 146 | 2 - v2 error format |
| 147 | |
| 148 | Returns: |
| 149 | An object of the form: |
| 150 | |
| 151 | { # A KeyRing is a toplevel logical grouping of CryptoKeys. |
| 152 | "createTime": "A String", # Output only. The time at which this KeyRing was created. |
| 153 | "name": "A String", # Output only. The resource name for the KeyRing in the format |
| 154 | # `projects/*/locations/*/keyRings/*`. |
| 155 | }</pre> |
| 156 | </div> |
| 157 | |
| 158 | <div class="method"> |
| 159 | <code class="details" id="getIamPolicy">getIamPolicy(resource=None, x__xgafv=None)</code> |
| 160 | <pre>Gets the access control policy for a resource. |
| 161 | Returns an empty policy if the resource exists and does not have a policy |
| 162 | set. |
| 163 | |
| 164 | Args: |
| 165 | resource: string, REQUIRED: The resource for which the policy is being requested. |
| 166 | See the operation documentation for the appropriate value for this field. (required) |
| 167 | x__xgafv: string, V1 error format. |
| 168 | Allowed values |
| 169 | 1 - v1 error format |
| 170 | 2 - v2 error format |
| 171 | |
| 172 | Returns: |
| 173 | An object of the form: |
| 174 | |
| 175 | { # Defines an Identity and Access Management (IAM) policy. It is used to |
| 176 | # specify access control policies for Cloud Platform resources. |
| 177 | # |
| 178 | # |
| 179 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 180 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 181 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 182 | # defined by IAM. |
| 183 | # |
| 184 | # **Example** |
| 185 | # |
| 186 | # { |
| 187 | # "bindings": [ |
| 188 | # { |
| 189 | # "role": "roles/owner", |
| 190 | # "members": [ |
| 191 | # "user:mike@example.com", |
| 192 | # "group:admins@example.com", |
| 193 | # "domain:google.com", |
| 194 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 195 | # ] |
| 196 | # }, |
| 197 | # { |
| 198 | # "role": "roles/viewer", |
| 199 | # "members": ["user:sean@example.com"] |
| 200 | # } |
| 201 | # ] |
| 202 | # } |
| 203 | # |
| 204 | # For a description of IAM and its features, see the |
| 205 | # [IAM developer's guide](https://cloud.google.com/iam). |
| 206 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 207 | { # Specifies the audit configuration for a service. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 208 | # The configuration determines which permission types are logged, and what |
| 209 | # identities, if any, are exempted from logging. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 210 | # An AuditConifg must have one or more AuditLogConfigs. |
| 211 | # |
| 212 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 213 | # the union of the two AuditConfigs is used for that service: the log_types |
| 214 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 215 | # AuditConfig are exempted. |
| 216 | # Example Policy with multiple AuditConfigs: |
| 217 | # { |
| 218 | # "audit_configs": [ |
| 219 | # { |
| 220 | # "service": "allServices" |
| 221 | # "audit_log_configs": [ |
| 222 | # { |
| 223 | # "log_type": "DATA_READ", |
| 224 | # "exempted_members": [ |
| 225 | # "user:foo@gmail.com" |
| 226 | # ] |
| 227 | # }, |
| 228 | # { |
| 229 | # "log_type": "DATA_WRITE", |
| 230 | # }, |
| 231 | # { |
| 232 | # "log_type": "ADMIN_READ", |
| 233 | # } |
| 234 | # ] |
| 235 | # }, |
| 236 | # { |
| 237 | # "service": "fooservice@googleapis.com" |
| 238 | # "audit_log_configs": [ |
| 239 | # { |
| 240 | # "log_type": "DATA_READ", |
| 241 | # }, |
| 242 | # { |
| 243 | # "log_type": "DATA_WRITE", |
| 244 | # "exempted_members": [ |
| 245 | # "user:bar@gmail.com" |
| 246 | # ] |
| 247 | # } |
| 248 | # ] |
| 249 | # } |
| 250 | # ] |
| 251 | # } |
| 252 | # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 253 | # logging. It also exempts foo@gmail.com from DATA_READ logging, and |
| 254 | # bar@gmail.com from DATA_WRITE logging. |
| 255 | "exemptedMembers": [ |
| 256 | "A String", |
| 257 | ], |
| 258 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 259 | # Next ID: 4 |
| 260 | { # Provides the configuration for logging a type of permissions. |
| 261 | # Example: |
| 262 | # |
| 263 | # { |
| 264 | # "audit_log_configs": [ |
| 265 | # { |
| 266 | # "log_type": "DATA_READ", |
| 267 | # "exempted_members": [ |
| 268 | # "user:foo@gmail.com" |
| 269 | # ] |
| 270 | # }, |
| 271 | # { |
| 272 | # "log_type": "DATA_WRITE", |
| 273 | # } |
| 274 | # ] |
| 275 | # } |
| 276 | # |
| 277 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 278 | # foo@gmail.com from DATA_READ logging. |
| 279 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 280 | # permission. |
| 281 | # Follows the same format of Binding.members. |
| 282 | "A String", |
| 283 | ], |
| 284 | "logType": "A String", # The log type that this config enables. |
| 285 | }, |
| 286 | ], |
| 287 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 288 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 289 | # `allServices` is a special value that covers all services. |
| 290 | }, |
| 291 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 292 | "rules": [ # If more than one rule is specified, the rules are applied in the following |
| 293 | # manner: |
| 294 | # - All matching LOG rules are always applied. |
| 295 | # - If any DENY/DENY_WITH_LOG rule matches, permission is denied. |
| 296 | # Logging will be applied if one or more matching rule requires logging. |
| 297 | # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is |
| 298 | # granted. |
| 299 | # Logging will be applied if one or more matching rule requires logging. |
| 300 | # - Otherwise, if no rule applies, permission is denied. |
| 301 | { # A rule to be applied in a Policy. |
| 302 | "notIn": [ # If one or more 'not_in' clauses are specified, the rule matches |
| 303 | # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. |
| 304 | # The format for in and not_in entries is the same as for members in a |
| 305 | # Binding (see google/iam/v1/policy.proto). |
| 306 | "A String", |
| 307 | ], |
| 308 | "description": "A String", # Human-readable description of the rule. |
| 309 | "in": [ # If one or more 'in' clauses are specified, the rule matches if |
| 310 | # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. |
| 311 | "A String", |
| 312 | ], |
| 313 | "action": "A String", # Required |
| 314 | "conditions": [ # Additional restrictions that must be met |
| 315 | { # A condition to be met. |
| 316 | "iam": "A String", # Trusted attributes supplied by the IAM system. |
| 317 | "svc": "A String", # Trusted attributes discharged by the service. |
| 318 | "value": "A String", # DEPRECATED. Use 'values' instead. |
| 319 | "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses |
| 320 | # the IAM system for access control. |
| 321 | "values": [ # The objects of the condition. This is mutually exclusive with 'value'. |
| 322 | "A String", |
| 323 | ], |
| 324 | "op": "A String", # An operator to apply the subject with. |
| 325 | }, |
| 326 | ], |
| 327 | "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries |
| 328 | # that match the LOG action. |
| 329 | { # Specifies what kind of log the caller must write |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 330 | "counter": { # Options for counters # Counter options. |
| 331 | "field": "A String", # The field value to attribute. |
| 332 | "metric": "A String", # The metric to update. |
| 333 | }, |
| 334 | "dataAccess": { # Write a Data Access (Gin) log # Data access options. |
| 335 | }, |
| 336 | "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. |
| 337 | }, |
| 338 | }, |
| 339 | ], |
| 340 | "permissions": [ # A permission is a string of form '<service>.<resource type>.<verb>' |
| 341 | # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, |
| 342 | # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. |
| 343 | "A String", |
| 344 | ], |
| 345 | }, |
| 346 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 347 | "version": 42, # Version of the `Policy`. The default version is 0. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 348 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 349 | # prevent simultaneous updates of a policy from overwriting each other. |
| 350 | # It is strongly suggested that systems make use of the `etag` in the |
| 351 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 352 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 353 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 354 | # ensure that their change will be applied to the same version of the policy. |
| 355 | # |
| 356 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 357 | # policy is overwritten blindly. |
| 358 | "bindings": [ # Associates a list of `members` to a `role`. |
| 359 | # Multiple `bindings` must not be specified for the same `role`. |
| 360 | # `bindings` with no members will result in an error. |
| 361 | { # Associates `members` with a `role`. |
| 362 | "role": "A String", # Role that is assigned to `members`. |
| 363 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 364 | # Required |
| 365 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 366 | # `members` can have the following values: |
| 367 | # |
| 368 | # * `allUsers`: A special identifier that represents anyone who is |
| 369 | # on the internet; with or without a Google account. |
| 370 | # |
| 371 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 372 | # who is authenticated with a Google account or a service account. |
| 373 | # |
| 374 | # * `user:{emailid}`: An email address that represents a specific Google |
| 375 | # account. For example, `alice@gmail.com` or `joe@example.com`. |
| 376 | # |
| 377 | # |
| 378 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 379 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 380 | # |
| 381 | # * `group:{emailid}`: An email address that represents a Google group. |
| 382 | # For example, `admins@example.com`. |
| 383 | # |
| 384 | # * `domain:{domain}`: A Google Apps domain name that represents all the |
| 385 | # users of that domain. For example, `google.com` or `example.com`. |
| 386 | # |
| 387 | "A String", |
| 388 | ], |
| 389 | }, |
| 390 | ], |
| 391 | "iamOwned": True or False, |
| 392 | }</pre> |
| 393 | </div> |
| 394 | |
| 395 | <div class="method"> |
| 396 | <code class="details" id="list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</code> |
| 397 | <pre>Lists KeyRings. |
| 398 | |
| 399 | Args: |
| 400 | parent: string, Required. The resource name of the location associated with the |
| 401 | KeyRings, in the format `projects/*/locations/*`. (required) |
| 402 | pageToken: string, Optional pagination token, returned earlier via |
| 403 | ListKeyRingsResponse.next_page_token. |
| 404 | x__xgafv: string, V1 error format. |
| 405 | Allowed values |
| 406 | 1 - v1 error format |
| 407 | 2 - v2 error format |
| 408 | pageSize: integer, Optional limit on the number of KeyRings to include in the |
| 409 | response. Further KeyRings can subsequently be obtained by |
| 410 | including the ListKeyRingsResponse.next_page_token in a subsequent |
| 411 | request. If unspecified, the server will pick an appropriate default. |
| 412 | |
| 413 | Returns: |
| 414 | An object of the form: |
| 415 | |
| 416 | { # Response message for KeyManagementService.ListKeyRings. |
| 417 | "nextPageToken": "A String", # A token to retrieve next page of results. Pass this value in |
| 418 | # ListKeyRingsRequest.page_token to retrieve the next page of results. |
| 419 | "totalSize": 42, # The total number of KeyRings that matched the query. |
| 420 | "keyRings": [ # The list of KeyRings. |
| 421 | { # A KeyRing is a toplevel logical grouping of CryptoKeys. |
| 422 | "createTime": "A String", # Output only. The time at which this KeyRing was created. |
| 423 | "name": "A String", # Output only. The resource name for the KeyRing in the format |
| 424 | # `projects/*/locations/*/keyRings/*`. |
| 425 | }, |
| 426 | ], |
| 427 | }</pre> |
| 428 | </div> |
| 429 | |
| 430 | <div class="method"> |
| 431 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 432 | <pre>Retrieves the next page of results. |
| 433 | |
| 434 | Args: |
| 435 | previous_request: The request for the previous page. (required) |
| 436 | previous_response: The response from the request for the previous page. (required) |
| 437 | |
| 438 | Returns: |
| 439 | A request object that you can call 'execute()' on to request the next |
| 440 | page. Returns None if there are no more items in the collection. |
| 441 | </pre> |
| 442 | </div> |
| 443 | |
| 444 | <div class="method"> |
| 445 | <code class="details" id="setIamPolicy">setIamPolicy(resource=None, body, x__xgafv=None)</code> |
| 446 | <pre>Sets the access control policy on the specified resource. Replaces any |
| 447 | existing policy. |
| 448 | |
| 449 | Args: |
| 450 | resource: string, REQUIRED: The resource for which the policy is being specified. |
| 451 | See the operation documentation for the appropriate value for this field. (required) |
| 452 | body: object, The request body. (required) |
| 453 | The object takes the form of: |
| 454 | |
| 455 | { # Request message for `SetIamPolicy` method. |
| 456 | "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 |
| 457 | # the policy is limited to a few 10s of KB. An empty policy is a |
| 458 | # valid policy but certain Cloud Platform services (such as Projects) |
| 459 | # might reject them. |
| 460 | # specify access control policies for Cloud Platform resources. |
| 461 | # |
| 462 | # |
| 463 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 464 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 465 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 466 | # defined by IAM. |
| 467 | # |
| 468 | # **Example** |
| 469 | # |
| 470 | # { |
| 471 | # "bindings": [ |
| 472 | # { |
| 473 | # "role": "roles/owner", |
| 474 | # "members": [ |
| 475 | # "user:mike@example.com", |
| 476 | # "group:admins@example.com", |
| 477 | # "domain:google.com", |
| 478 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 479 | # ] |
| 480 | # }, |
| 481 | # { |
| 482 | # "role": "roles/viewer", |
| 483 | # "members": ["user:sean@example.com"] |
| 484 | # } |
| 485 | # ] |
| 486 | # } |
| 487 | # |
| 488 | # For a description of IAM and its features, see the |
| 489 | # [IAM developer's guide](https://cloud.google.com/iam). |
| 490 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 491 | { # Specifies the audit configuration for a service. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 492 | # The configuration determines which permission types are logged, and what |
| 493 | # identities, if any, are exempted from logging. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 494 | # An AuditConifg must have one or more AuditLogConfigs. |
| 495 | # |
| 496 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 497 | # the union of the two AuditConfigs is used for that service: the log_types |
| 498 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 499 | # AuditConfig are exempted. |
| 500 | # Example Policy with multiple AuditConfigs: |
| 501 | # { |
| 502 | # "audit_configs": [ |
| 503 | # { |
| 504 | # "service": "allServices" |
| 505 | # "audit_log_configs": [ |
| 506 | # { |
| 507 | # "log_type": "DATA_READ", |
| 508 | # "exempted_members": [ |
| 509 | # "user:foo@gmail.com" |
| 510 | # ] |
| 511 | # }, |
| 512 | # { |
| 513 | # "log_type": "DATA_WRITE", |
| 514 | # }, |
| 515 | # { |
| 516 | # "log_type": "ADMIN_READ", |
| 517 | # } |
| 518 | # ] |
| 519 | # }, |
| 520 | # { |
| 521 | # "service": "fooservice@googleapis.com" |
| 522 | # "audit_log_configs": [ |
| 523 | # { |
| 524 | # "log_type": "DATA_READ", |
| 525 | # }, |
| 526 | # { |
| 527 | # "log_type": "DATA_WRITE", |
| 528 | # "exempted_members": [ |
| 529 | # "user:bar@gmail.com" |
| 530 | # ] |
| 531 | # } |
| 532 | # ] |
| 533 | # } |
| 534 | # ] |
| 535 | # } |
| 536 | # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 537 | # logging. It also exempts foo@gmail.com from DATA_READ logging, and |
| 538 | # bar@gmail.com from DATA_WRITE logging. |
| 539 | "exemptedMembers": [ |
| 540 | "A String", |
| 541 | ], |
| 542 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 543 | # Next ID: 4 |
| 544 | { # Provides the configuration for logging a type of permissions. |
| 545 | # Example: |
| 546 | # |
| 547 | # { |
| 548 | # "audit_log_configs": [ |
| 549 | # { |
| 550 | # "log_type": "DATA_READ", |
| 551 | # "exempted_members": [ |
| 552 | # "user:foo@gmail.com" |
| 553 | # ] |
| 554 | # }, |
| 555 | # { |
| 556 | # "log_type": "DATA_WRITE", |
| 557 | # } |
| 558 | # ] |
| 559 | # } |
| 560 | # |
| 561 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 562 | # foo@gmail.com from DATA_READ logging. |
| 563 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 564 | # permission. |
| 565 | # Follows the same format of Binding.members. |
| 566 | "A String", |
| 567 | ], |
| 568 | "logType": "A String", # The log type that this config enables. |
| 569 | }, |
| 570 | ], |
| 571 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 572 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 573 | # `allServices` is a special value that covers all services. |
| 574 | }, |
| 575 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 576 | "rules": [ # If more than one rule is specified, the rules are applied in the following |
| 577 | # manner: |
| 578 | # - All matching LOG rules are always applied. |
| 579 | # - If any DENY/DENY_WITH_LOG rule matches, permission is denied. |
| 580 | # Logging will be applied if one or more matching rule requires logging. |
| 581 | # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is |
| 582 | # granted. |
| 583 | # Logging will be applied if one or more matching rule requires logging. |
| 584 | # - Otherwise, if no rule applies, permission is denied. |
| 585 | { # A rule to be applied in a Policy. |
| 586 | "notIn": [ # If one or more 'not_in' clauses are specified, the rule matches |
| 587 | # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. |
| 588 | # The format for in and not_in entries is the same as for members in a |
| 589 | # Binding (see google/iam/v1/policy.proto). |
| 590 | "A String", |
| 591 | ], |
| 592 | "description": "A String", # Human-readable description of the rule. |
| 593 | "in": [ # If one or more 'in' clauses are specified, the rule matches if |
| 594 | # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. |
| 595 | "A String", |
| 596 | ], |
| 597 | "action": "A String", # Required |
| 598 | "conditions": [ # Additional restrictions that must be met |
| 599 | { # A condition to be met. |
| 600 | "iam": "A String", # Trusted attributes supplied by the IAM system. |
| 601 | "svc": "A String", # Trusted attributes discharged by the service. |
| 602 | "value": "A String", # DEPRECATED. Use 'values' instead. |
| 603 | "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses |
| 604 | # the IAM system for access control. |
| 605 | "values": [ # The objects of the condition. This is mutually exclusive with 'value'. |
| 606 | "A String", |
| 607 | ], |
| 608 | "op": "A String", # An operator to apply the subject with. |
| 609 | }, |
| 610 | ], |
| 611 | "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries |
| 612 | # that match the LOG action. |
| 613 | { # Specifies what kind of log the caller must write |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 614 | "counter": { # Options for counters # Counter options. |
| 615 | "field": "A String", # The field value to attribute. |
| 616 | "metric": "A String", # The metric to update. |
| 617 | }, |
| 618 | "dataAccess": { # Write a Data Access (Gin) log # Data access options. |
| 619 | }, |
| 620 | "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. |
| 621 | }, |
| 622 | }, |
| 623 | ], |
| 624 | "permissions": [ # A permission is a string of form '<service>.<resource type>.<verb>' |
| 625 | # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, |
| 626 | # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. |
| 627 | "A String", |
| 628 | ], |
| 629 | }, |
| 630 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 631 | "version": 42, # Version of the `Policy`. The default version is 0. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 632 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 633 | # prevent simultaneous updates of a policy from overwriting each other. |
| 634 | # It is strongly suggested that systems make use of the `etag` in the |
| 635 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 636 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 637 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 638 | # ensure that their change will be applied to the same version of the policy. |
| 639 | # |
| 640 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 641 | # policy is overwritten blindly. |
| 642 | "bindings": [ # Associates a list of `members` to a `role`. |
| 643 | # Multiple `bindings` must not be specified for the same `role`. |
| 644 | # `bindings` with no members will result in an error. |
| 645 | { # Associates `members` with a `role`. |
| 646 | "role": "A String", # Role that is assigned to `members`. |
| 647 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 648 | # Required |
| 649 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 650 | # `members` can have the following values: |
| 651 | # |
| 652 | # * `allUsers`: A special identifier that represents anyone who is |
| 653 | # on the internet; with or without a Google account. |
| 654 | # |
| 655 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 656 | # who is authenticated with a Google account or a service account. |
| 657 | # |
| 658 | # * `user:{emailid}`: An email address that represents a specific Google |
| 659 | # account. For example, `alice@gmail.com` or `joe@example.com`. |
| 660 | # |
| 661 | # |
| 662 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 663 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 664 | # |
| 665 | # * `group:{emailid}`: An email address that represents a Google group. |
| 666 | # For example, `admins@example.com`. |
| 667 | # |
| 668 | # * `domain:{domain}`: A Google Apps domain name that represents all the |
| 669 | # users of that domain. For example, `google.com` or `example.com`. |
| 670 | # |
| 671 | "A String", |
| 672 | ], |
| 673 | }, |
| 674 | ], |
| 675 | "iamOwned": True or False, |
| 676 | }, |
| 677 | "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 678 | # the fields in the mask will be modified. If no mask is provided, the |
| 679 | # following default mask is used: |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 680 | # paths: "bindings, etag" |
| 681 | # This field is only used by Cloud IAM. |
| 682 | } |
| 683 | |
| 684 | x__xgafv: string, V1 error format. |
| 685 | Allowed values |
| 686 | 1 - v1 error format |
| 687 | 2 - v2 error format |
| 688 | |
| 689 | Returns: |
| 690 | An object of the form: |
| 691 | |
| 692 | { # Defines an Identity and Access Management (IAM) policy. It is used to |
| 693 | # specify access control policies for Cloud Platform resources. |
| 694 | # |
| 695 | # |
| 696 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 697 | # `members` to a `role`, where the members can be user accounts, Google groups, |
| 698 | # Google domains, and service accounts. A `role` is a named list of permissions |
| 699 | # defined by IAM. |
| 700 | # |
| 701 | # **Example** |
| 702 | # |
| 703 | # { |
| 704 | # "bindings": [ |
| 705 | # { |
| 706 | # "role": "roles/owner", |
| 707 | # "members": [ |
| 708 | # "user:mike@example.com", |
| 709 | # "group:admins@example.com", |
| 710 | # "domain:google.com", |
| 711 | # "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 712 | # ] |
| 713 | # }, |
| 714 | # { |
| 715 | # "role": "roles/viewer", |
| 716 | # "members": ["user:sean@example.com"] |
| 717 | # } |
| 718 | # ] |
| 719 | # } |
| 720 | # |
| 721 | # For a description of IAM and its features, see the |
| 722 | # [IAM developer's guide](https://cloud.google.com/iam). |
| 723 | "auditConfigs": [ # Specifies cloud audit logging configuration for this policy. |
| 724 | { # Specifies the audit configuration for a service. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 725 | # The configuration determines which permission types are logged, and what |
| 726 | # identities, if any, are exempted from logging. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 727 | # An AuditConifg must have one or more AuditLogConfigs. |
| 728 | # |
| 729 | # If there are AuditConfigs for both `allServices` and a specific service, |
| 730 | # the union of the two AuditConfigs is used for that service: the log_types |
| 731 | # specified in each AuditConfig are enabled, and the exempted_members in each |
| 732 | # AuditConfig are exempted. |
| 733 | # Example Policy with multiple AuditConfigs: |
| 734 | # { |
| 735 | # "audit_configs": [ |
| 736 | # { |
| 737 | # "service": "allServices" |
| 738 | # "audit_log_configs": [ |
| 739 | # { |
| 740 | # "log_type": "DATA_READ", |
| 741 | # "exempted_members": [ |
| 742 | # "user:foo@gmail.com" |
| 743 | # ] |
| 744 | # }, |
| 745 | # { |
| 746 | # "log_type": "DATA_WRITE", |
| 747 | # }, |
| 748 | # { |
| 749 | # "log_type": "ADMIN_READ", |
| 750 | # } |
| 751 | # ] |
| 752 | # }, |
| 753 | # { |
| 754 | # "service": "fooservice@googleapis.com" |
| 755 | # "audit_log_configs": [ |
| 756 | # { |
| 757 | # "log_type": "DATA_READ", |
| 758 | # }, |
| 759 | # { |
| 760 | # "log_type": "DATA_WRITE", |
| 761 | # "exempted_members": [ |
| 762 | # "user:bar@gmail.com" |
| 763 | # ] |
| 764 | # } |
| 765 | # ] |
| 766 | # } |
| 767 | # ] |
| 768 | # } |
| 769 | # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 770 | # logging. It also exempts foo@gmail.com from DATA_READ logging, and |
| 771 | # bar@gmail.com from DATA_WRITE logging. |
| 772 | "exemptedMembers": [ |
| 773 | "A String", |
| 774 | ], |
| 775 | "auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 776 | # Next ID: 4 |
| 777 | { # Provides the configuration for logging a type of permissions. |
| 778 | # Example: |
| 779 | # |
| 780 | # { |
| 781 | # "audit_log_configs": [ |
| 782 | # { |
| 783 | # "log_type": "DATA_READ", |
| 784 | # "exempted_members": [ |
| 785 | # "user:foo@gmail.com" |
| 786 | # ] |
| 787 | # }, |
| 788 | # { |
| 789 | # "log_type": "DATA_WRITE", |
| 790 | # } |
| 791 | # ] |
| 792 | # } |
| 793 | # |
| 794 | # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 795 | # foo@gmail.com from DATA_READ logging. |
| 796 | "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 797 | # permission. |
| 798 | # Follows the same format of Binding.members. |
| 799 | "A String", |
| 800 | ], |
| 801 | "logType": "A String", # The log type that this config enables. |
| 802 | }, |
| 803 | ], |
| 804 | "service": "A String", # Specifies a service that will be enabled for audit logging. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 805 | # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 806 | # `allServices` is a special value that covers all services. |
| 807 | }, |
| 808 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 809 | "rules": [ # If more than one rule is specified, the rules are applied in the following |
| 810 | # manner: |
| 811 | # - All matching LOG rules are always applied. |
| 812 | # - If any DENY/DENY_WITH_LOG rule matches, permission is denied. |
| 813 | # Logging will be applied if one or more matching rule requires logging. |
| 814 | # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is |
| 815 | # granted. |
| 816 | # Logging will be applied if one or more matching rule requires logging. |
| 817 | # - Otherwise, if no rule applies, permission is denied. |
| 818 | { # A rule to be applied in a Policy. |
| 819 | "notIn": [ # If one or more 'not_in' clauses are specified, the rule matches |
| 820 | # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. |
| 821 | # The format for in and not_in entries is the same as for members in a |
| 822 | # Binding (see google/iam/v1/policy.proto). |
| 823 | "A String", |
| 824 | ], |
| 825 | "description": "A String", # Human-readable description of the rule. |
| 826 | "in": [ # If one or more 'in' clauses are specified, the rule matches if |
| 827 | # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. |
| 828 | "A String", |
| 829 | ], |
| 830 | "action": "A String", # Required |
| 831 | "conditions": [ # Additional restrictions that must be met |
| 832 | { # A condition to be met. |
| 833 | "iam": "A String", # Trusted attributes supplied by the IAM system. |
| 834 | "svc": "A String", # Trusted attributes discharged by the service. |
| 835 | "value": "A String", # DEPRECATED. Use 'values' instead. |
| 836 | "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses |
| 837 | # the IAM system for access control. |
| 838 | "values": [ # The objects of the condition. This is mutually exclusive with 'value'. |
| 839 | "A String", |
| 840 | ], |
| 841 | "op": "A String", # An operator to apply the subject with. |
| 842 | }, |
| 843 | ], |
| 844 | "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries |
| 845 | # that match the LOG action. |
| 846 | { # Specifies what kind of log the caller must write |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 847 | "counter": { # Options for counters # Counter options. |
| 848 | "field": "A String", # The field value to attribute. |
| 849 | "metric": "A String", # The metric to update. |
| 850 | }, |
| 851 | "dataAccess": { # Write a Data Access (Gin) log # Data access options. |
| 852 | }, |
| 853 | "cloudAudit": { # Write a Cloud Audit log # Cloud audit options. |
| 854 | }, |
| 855 | }, |
| 856 | ], |
| 857 | "permissions": [ # A permission is a string of form '<service>.<resource type>.<verb>' |
| 858 | # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, |
| 859 | # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. |
| 860 | "A String", |
| 861 | ], |
| 862 | }, |
| 863 | ], |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame^] | 864 | "version": 42, # Version of the `Policy`. The default version is 0. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 865 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help |
| 866 | # prevent simultaneous updates of a policy from overwriting each other. |
| 867 | # It is strongly suggested that systems make use of the `etag` in the |
| 868 | # read-modify-write cycle to perform policy updates in order to avoid race |
| 869 | # conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 870 | # systems are expected to put that etag in the request to `setIamPolicy` to |
| 871 | # ensure that their change will be applied to the same version of the policy. |
| 872 | # |
| 873 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 874 | # policy is overwritten blindly. |
| 875 | "bindings": [ # Associates a list of `members` to a `role`. |
| 876 | # Multiple `bindings` must not be specified for the same `role`. |
| 877 | # `bindings` with no members will result in an error. |
| 878 | { # Associates `members` with a `role`. |
| 879 | "role": "A String", # Role that is assigned to `members`. |
| 880 | # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 881 | # Required |
| 882 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. |
| 883 | # `members` can have the following values: |
| 884 | # |
| 885 | # * `allUsers`: A special identifier that represents anyone who is |
| 886 | # on the internet; with or without a Google account. |
| 887 | # |
| 888 | # * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 889 | # who is authenticated with a Google account or a service account. |
| 890 | # |
| 891 | # * `user:{emailid}`: An email address that represents a specific Google |
| 892 | # account. For example, `alice@gmail.com` or `joe@example.com`. |
| 893 | # |
| 894 | # |
| 895 | # * `serviceAccount:{emailid}`: An email address that represents a service |
| 896 | # account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 897 | # |
| 898 | # * `group:{emailid}`: An email address that represents a Google group. |
| 899 | # For example, `admins@example.com`. |
| 900 | # |
| 901 | # * `domain:{domain}`: A Google Apps domain name that represents all the |
| 902 | # users of that domain. For example, `google.com` or `example.com`. |
| 903 | # |
| 904 | "A String", |
| 905 | ], |
| 906 | }, |
| 907 | ], |
| 908 | "iamOwned": True or False, |
| 909 | }</pre> |
| 910 | </div> |
| 911 | |
| 912 | <div class="method"> |
| 913 | <code class="details" id="testIamPermissions">testIamPermissions(resource=None, body, x__xgafv=None)</code> |
| 914 | <pre>Returns permissions that a caller has on the specified resource. |
| 915 | If the resource does not exist, this will return an empty set of |
| 916 | permissions, not a NOT_FOUND error. |
| 917 | |
| 918 | Note: This operation is designed to be used for building permission-aware |
| 919 | UIs and command-line tools, not for authorization checking. This operation |
| 920 | may "fail open" without warning. |
| 921 | |
| 922 | Args: |
| 923 | resource: string, REQUIRED: The resource for which the policy detail is being requested. |
| 924 | See the operation documentation for the appropriate value for this field. (required) |
| 925 | body: object, The request body. (required) |
| 926 | The object takes the form of: |
| 927 | |
| 928 | { # Request message for `TestIamPermissions` method. |
| 929 | "permissions": [ # The set of permissions to check for the `resource`. Permissions with |
| 930 | # wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 931 | # information see |
| 932 | # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| 933 | "A String", |
| 934 | ], |
| 935 | } |
| 936 | |
| 937 | x__xgafv: string, V1 error format. |
| 938 | Allowed values |
| 939 | 1 - v1 error format |
| 940 | 2 - v2 error format |
| 941 | |
| 942 | Returns: |
| 943 | An object of the form: |
| 944 | |
| 945 | { # Response message for `TestIamPermissions` method. |
| 946 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
| 947 | # allowed. |
| 948 | "A String", |
| 949 | ], |
| 950 | }</pre> |
| 951 | </div> |
| 952 | |
| 953 | </body></html> |