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