Sai Cheemalapati | df61397 | 2016-10-21 13:59:49 -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 | |
| 75 | <h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.hosts.html">hosts</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p> |
| 79 | <p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body)</a></code></p> |
| 82 | <p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p> |
| 85 | <p class="firstline">Returns permissions that a caller has on the specified resource.</p> |
| 86 | <h3>Method Details</h3> |
| 87 | <div class="method"> |
| 88 | <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code> |
| 89 | <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists. |
| 90 | |
| 91 | Args: |
| 92 | project: string, Project ID for this request. (required) |
| 93 | zone: string, The name of the zone for this request. (required) |
| 94 | resource: string, Name of the resource for this request. (required) |
| 95 | |
| 96 | Returns: |
| 97 | An object of the form: |
| 98 | |
| 99 | { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. |
| 100 | # |
| 101 | # |
| 102 | # |
| 103 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. |
| 104 | # |
| 105 | # **Example** |
| 106 | # |
| 107 | # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } |
| 108 | # |
| 109 | # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). |
| 110 | "auditConfigs": [ # Specifies audit logging configs for "data access". "data access": generally refers to data reads/writes and admin reads. "admin activity": generally refers to admin writes. |
| 111 | # |
| 112 | # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging. |
| 113 | { # Enables "data access" audit logging for a service and specifies a list of members that are log-exempted. |
| 114 | "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members. |
| 115 | "A String", |
| 116 | ], |
| 117 | "service": "A String", # Specifies a service that will be enabled for "data access" audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services. |
| 118 | }, |
| 119 | ], |
| 120 | "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied. |
| 121 | { # A rule to be applied in a Policy. |
| 122 | "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. |
| 123 | { # Specifies what kind of log the caller must write |
| 124 | "counter": { # Options for counters # Counter options. |
| 125 | "field": "A String", # The field value to attribute. |
| 126 | "metric": "A String", # The metric to update. |
| 127 | }, |
| 128 | }, |
| 129 | ], |
| 130 | "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. |
| 131 | "A String", |
| 132 | ], |
| 133 | "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. |
| 134 | "A String", |
| 135 | ], |
| 136 | "action": "A String", # Required |
| 137 | "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. |
| 138 | "A String", |
| 139 | ], |
| 140 | "conditions": [ # Additional restrictions that must be met |
| 141 | { # A condition to be met. |
| 142 | "iam": "A String", # Trusted attributes supplied by the IAM system. |
| 143 | "svc": "A String", # Trusted attributes discharged by the service. |
| 144 | "value": "A String", # DEPRECATED. Use 'values' instead. |
| 145 | "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. |
| 146 | "values": [ # The objects of the condition. This is mutually exclusive with 'value'. |
| 147 | "A String", |
| 148 | ], |
| 149 | "op": "A String", # An operator to apply the subject with. |
| 150 | }, |
| 151 | ], |
| 152 | "description": "A String", # Human-readable description of the rule. |
| 153 | }, |
| 154 | ], |
| 155 | "version": 42, # Version of the `Policy`. The default version is 0. |
| 156 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. |
| 157 | # |
| 158 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. |
| 159 | "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error. |
| 160 | { # Associates `members` with a `role`. |
| 161 | "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 162 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: |
| 163 | # |
| 164 | # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. |
| 165 | # |
| 166 | # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. |
| 167 | # |
| 168 | # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. |
| 169 | # |
| 170 | # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 171 | # |
| 172 | # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. |
| 173 | # |
| 174 | # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. |
| 175 | "A String", |
| 176 | ], |
| 177 | }, |
| 178 | ], |
| 179 | "iamOwned": True or False, |
| 180 | }</pre> |
| 181 | </div> |
| 182 | |
| 183 | <div class="method"> |
| 184 | <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body)</code> |
| 185 | <pre>Sets the access control policy on the specified resource. Replaces any existing policy. |
| 186 | |
| 187 | Args: |
| 188 | project: string, Project ID for this request. (required) |
| 189 | zone: string, The name of the zone for this request. (required) |
| 190 | resource: string, Name of the resource for this request. (required) |
| 191 | body: object, The request body. (required) |
| 192 | The object takes the form of: |
| 193 | |
| 194 | { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. |
| 195 | # |
| 196 | # |
| 197 | # |
| 198 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. |
| 199 | # |
| 200 | # **Example** |
| 201 | # |
| 202 | # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } |
| 203 | # |
| 204 | # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). |
| 205 | "auditConfigs": [ # Specifies audit logging configs for "data access". "data access": generally refers to data reads/writes and admin reads. "admin activity": generally refers to admin writes. |
| 206 | # |
| 207 | # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging. |
| 208 | { # Enables "data access" audit logging for a service and specifies a list of members that are log-exempted. |
| 209 | "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members. |
| 210 | "A String", |
| 211 | ], |
| 212 | "service": "A String", # Specifies a service that will be enabled for "data access" audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services. |
| 213 | }, |
| 214 | ], |
| 215 | "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied. |
| 216 | { # A rule to be applied in a Policy. |
| 217 | "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. |
| 218 | { # Specifies what kind of log the caller must write |
| 219 | "counter": { # Options for counters # Counter options. |
| 220 | "field": "A String", # The field value to attribute. |
| 221 | "metric": "A String", # The metric to update. |
| 222 | }, |
| 223 | }, |
| 224 | ], |
| 225 | "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. |
| 226 | "A String", |
| 227 | ], |
| 228 | "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. |
| 229 | "A String", |
| 230 | ], |
| 231 | "action": "A String", # Required |
| 232 | "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. |
| 233 | "A String", |
| 234 | ], |
| 235 | "conditions": [ # Additional restrictions that must be met |
| 236 | { # A condition to be met. |
| 237 | "iam": "A String", # Trusted attributes supplied by the IAM system. |
| 238 | "svc": "A String", # Trusted attributes discharged by the service. |
| 239 | "value": "A String", # DEPRECATED. Use 'values' instead. |
| 240 | "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. |
| 241 | "values": [ # The objects of the condition. This is mutually exclusive with 'value'. |
| 242 | "A String", |
| 243 | ], |
| 244 | "op": "A String", # An operator to apply the subject with. |
| 245 | }, |
| 246 | ], |
| 247 | "description": "A String", # Human-readable description of the rule. |
| 248 | }, |
| 249 | ], |
| 250 | "version": 42, # Version of the `Policy`. The default version is 0. |
| 251 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. |
| 252 | # |
| 253 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. |
| 254 | "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error. |
| 255 | { # Associates `members` with a `role`. |
| 256 | "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 257 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: |
| 258 | # |
| 259 | # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. |
| 260 | # |
| 261 | # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. |
| 262 | # |
| 263 | # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. |
| 264 | # |
| 265 | # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 266 | # |
| 267 | # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. |
| 268 | # |
| 269 | # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. |
| 270 | "A String", |
| 271 | ], |
| 272 | }, |
| 273 | ], |
| 274 | "iamOwned": True or False, |
| 275 | } |
| 276 | |
| 277 | |
| 278 | Returns: |
| 279 | An object of the form: |
| 280 | |
| 281 | { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. |
| 282 | # |
| 283 | # |
| 284 | # |
| 285 | # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. |
| 286 | # |
| 287 | # **Example** |
| 288 | # |
| 289 | # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } |
| 290 | # |
| 291 | # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam). |
| 292 | "auditConfigs": [ # Specifies audit logging configs for "data access". "data access": generally refers to data reads/writes and admin reads. "admin activity": generally refers to admin writes. |
| 293 | # |
| 294 | # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging. |
| 295 | { # Enables "data access" audit logging for a service and specifies a list of members that are log-exempted. |
| 296 | "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members. |
| 297 | "A String", |
| 298 | ], |
| 299 | "service": "A String", # Specifies a service that will be enabled for "data access" audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services. |
| 300 | }, |
| 301 | ], |
| 302 | "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied. |
| 303 | { # A rule to be applied in a Policy. |
| 304 | "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. |
| 305 | { # Specifies what kind of log the caller must write |
| 306 | "counter": { # Options for counters # Counter options. |
| 307 | "field": "A String", # The field value to attribute. |
| 308 | "metric": "A String", # The metric to update. |
| 309 | }, |
| 310 | }, |
| 311 | ], |
| 312 | "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. |
| 313 | "A String", |
| 314 | ], |
| 315 | "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. |
| 316 | "A String", |
| 317 | ], |
| 318 | "action": "A String", # Required |
| 319 | "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. |
| 320 | "A String", |
| 321 | ], |
| 322 | "conditions": [ # Additional restrictions that must be met |
| 323 | { # A condition to be met. |
| 324 | "iam": "A String", # Trusted attributes supplied by the IAM system. |
| 325 | "svc": "A String", # Trusted attributes discharged by the service. |
| 326 | "value": "A String", # DEPRECATED. Use 'values' instead. |
| 327 | "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. |
| 328 | "values": [ # The objects of the condition. This is mutually exclusive with 'value'. |
| 329 | "A String", |
| 330 | ], |
| 331 | "op": "A String", # An operator to apply the subject with. |
| 332 | }, |
| 333 | ], |
| 334 | "description": "A String", # Human-readable description of the rule. |
| 335 | }, |
| 336 | ], |
| 337 | "version": 42, # Version of the `Policy`. The default version is 0. |
| 338 | "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. |
| 339 | # |
| 340 | # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly. |
| 341 | "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error. |
| 342 | { # Associates `members` with a `role`. |
| 343 | "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 344 | "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: |
| 345 | # |
| 346 | # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. |
| 347 | # |
| 348 | # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. |
| 349 | # |
| 350 | # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`. |
| 351 | # |
| 352 | # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 353 | # |
| 354 | # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. |
| 355 | # |
| 356 | # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`. |
| 357 | "A String", |
| 358 | ], |
| 359 | }, |
| 360 | ], |
| 361 | "iamOwned": True or False, |
| 362 | }</pre> |
| 363 | </div> |
| 364 | |
| 365 | <div class="method"> |
| 366 | <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code> |
| 367 | <pre>Returns permissions that a caller has on the specified resource. |
| 368 | |
| 369 | Args: |
| 370 | project: string, Project ID for this request. (required) |
| 371 | zone: string, The name of the zone for this request. (required) |
| 372 | resource: string, Name of the resource for this request. (required) |
| 373 | body: object, The request body. (required) |
| 374 | The object takes the form of: |
| 375 | |
| 376 | { |
| 377 | "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. |
| 378 | "A String", |
| 379 | ], |
| 380 | } |
| 381 | |
| 382 | |
| 383 | Returns: |
| 384 | An object of the form: |
| 385 | |
| 386 | { |
| 387 | "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |
| 388 | "A String", |
| 389 | ], |
| 390 | }</pre> |
| 391 | </div> |
| 392 | |
| 393 | </body></html> |