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