blob: 4a049f7c2b969009463614377e1d70e5005ad2b3 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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.licenses.html">licenses</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040078 <code><a href="#delete">delete(project, license, requestId=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070079<p class="firstline">Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040080<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070081 <code><a href="#get">get(project, license)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070082<p class="firstline">Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</a></code></p>
85<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
88<p class="firstline">Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</a></code></p>
91<p class="firstline">Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
97<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
100<p class="firstline">Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<h3>Method Details</h3>
102<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400103 <code class="details" id="delete">delete(project, license, requestId=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700104 <pre>Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400105
106Args:
107 project: string, Project ID for this request. (required)
108 license: string, Name of the license resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
110
111For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
112
113The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400114
115Returns:
116 An object of the form:
117
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 { # Represents an Operation resource.
119 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 # Google Compute Engine has three Operation resources:
121 #
122 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
123 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
125 #
126 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 # - For global operations, use the `globalOperations` resource.
128 # - For regional operations, use the `regionOperations` resource.
129 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700131 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400132 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400134 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400137 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
139 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400140 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400142 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400144 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
145 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
146 {
147 "message": "A String", # [Output Only] A human-readable description of the warning code.
148 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
149 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
150 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
151 {
152 "value": "A String", # [Output Only] A warning data value corresponding to the key.
153 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
154 },
155 ],
156 },
157 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400160 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700161 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
162 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400164 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
165 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
166 {
167 "message": "A String", # [Output Only] An optional, human-readable error message.
168 "code": "A String", # [Output Only] The error type identifier for this error.
169 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
170 },
171 ],
172 },
173 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
174 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
175 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
176 }</pre>
177</div>
178
179<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700180 <code class="details" id="get">get(project, license)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 <pre>Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700182
183Args:
184 project: string, Project ID for this request. (required)
185 license: string, Name of the License resource to return. (required)
186
187Returns:
188 An object of the form:
189
Dan O'Mearadd494642020-05-01 07:42:23 -0700190 { # Represents a License resource.
191 #
192 # A License represents billing and aggregate usage data for public and marketplace images. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (== resource_for {$api_version}.licenses ==)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400193 "kind": "compute#license", # [Output Only] Type of resource. Always compute#license for licenses.
194 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 "chargesUseFee": True or False, # [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.
196 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400197 "licenseCode": "A String", # [Output Only] The unique code used to attach this license to images, snapshots, and disks.
198 "transferable": True or False, # If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.
199 "resourceRequirements": {
200 "minMemoryMb": 42, # Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.
201 "minGuestCpuCount": 42, # Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.
202 },
203 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
204 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
205 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206 "name": "A String", # Name of the resource. The name must be 1-63 characters long and comply with RFC1035.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400207 }</pre>
208</div>
209
210<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700211 <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</code>
212 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213
214Args:
215 project: string, Project ID for this request. (required)
216 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700217 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218
219Returns:
220 An object of the form:
221
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 #
224 #
225 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700235 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700236 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700238 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
240 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
241 #
242 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
243 #
244 # Example Policy with multiple AuditConfigs:
245 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700248 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700249 "exemptedMembers": [
250 "A String",
251 ],
252 "auditLogConfigs": [ # The configuration for logging of each type of permission.
253 { # Provides the configuration for logging a type of permissions. Example:
254 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
259 "A String",
260 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700262 "logType": "A String", # The log type that this config enables.
263 },
264 ],
265 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
266 },
267 ],
268 "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.
269 { # A rule to be applied in a Policy.
270 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
271 { # Specifies what kind of log the caller must write
272 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
273 #
274 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
275 #
276 # Field names correspond to IAM request parameters and field values are their respective values.
277 #
278 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
279 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700280 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700281 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -0700282 "customFields": [ # Custom fields.
283 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
284 "name": "A String", # Name is the field name.
285 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
286 },
287 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 "metric": "A String", # The metric to update.
289 },
290 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -0700291 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 },
293 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
294 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
295 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
296 "permissionType": "A String", # The type of the permission that was checked.
297 },
298 },
299 },
300 ],
301 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
302 "A String",
303 ],
304 "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.
305 "A String",
306 ],
307 "action": "A String", # Required
308 "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.
309 "A String",
310 ],
311 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
312 { # A condition to be met.
313 "iam": "A String", # Trusted attributes supplied by the IAM system.
314 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
315 "values": [ # The objects of the condition.
316 "A String",
317 ],
318 "svc": "A String", # Trusted attributes discharged by the service.
319 "op": "A String", # An operator to apply the subject with.
320 },
321 ],
322 "description": "A String", # Human-readable description of the rule.
323 },
324 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700325 "version": 42, # Specifies the format of the policy.
326 #
327 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
328 #
329 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
330 #
331 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
332 #
333 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
334 #
335 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 "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.
337 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700338 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
339 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700340 { # Associates `members` with a `role`.
341 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
342 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
343 #
344 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
345 #
346 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
347 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 #
350 #
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 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
357 #
358 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
359 #
360 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
361 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700362 #
363 #
364 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
365 "A String",
366 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700367 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700368 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 # Example (Comparison):
370 #
371 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
372 #
373 # Example (Equality):
374 #
375 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
376 #
377 # Example (Logic):
378 #
379 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
380 #
381 # Example (Data Manipulation):
382 #
383 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
384 #
385 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
386 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700387 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700388 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
389 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700390 },
391 },
392 ],
393 "iamOwned": True or False,
394 }</pre>
395</div>
396
397<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700398 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
399 <pre>Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400400
401Args:
402 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700403 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400404 The object takes the form of:
405
Dan O'Mearadd494642020-05-01 07:42:23 -0700406{ # Represents a License resource.
407 #
408 # A License represents billing and aggregate usage data for public and marketplace images. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (== resource_for {$api_version}.licenses ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700409 "kind": "compute#license", # [Output Only] Type of resource. Always compute#license for licenses.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400410 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 "chargesUseFee": True or False, # [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.
412 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800413 "licenseCode": "A String", # [Output Only] The unique code used to attach this license to images, snapshots, and disks.
414 "transferable": True or False, # If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400415 "resourceRequirements": {
416 "minMemoryMb": 42, # Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.
417 "minGuestCpuCount": 42, # Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.
418 },
419 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
420 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700421 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 "name": "A String", # Name of the resource. The name must be 1-63 characters long and comply with RFC1035.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400423 }
424
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
426
427For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
428
429The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400430
431Returns:
432 An object of the form:
433
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700434 { # Represents an Operation resource.
435 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 # Google Compute Engine has three Operation resources:
437 #
438 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
439 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
441 #
442 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700443 # - For global operations, use the `globalOperations` resource.
444 # - For regional operations, use the `regionOperations` resource.
445 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700447 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400448 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400450 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700451 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400453 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700454 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
455 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400456 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400458 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400460 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
461 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
462 {
463 "message": "A String", # [Output Only] A human-readable description of the warning code.
464 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
465 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
466 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
467 {
468 "value": "A String", # [Output Only] A warning data value corresponding to the key.
469 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
470 },
471 ],
472 },
473 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700475 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400476 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700477 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
478 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400480 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
481 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
482 {
483 "message": "A String", # [Output Only] An optional, human-readable error message.
484 "code": "A String", # [Output Only] The error type identifier for this error.
485 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
486 },
487 ],
488 },
489 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
490 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
491 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700492 }</pre>
493</div>
494
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400495<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700496 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</code>
497 <pre>Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400498
499Args:
500 project: string, Project ID for this request. (required)
501 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
502
Dan O'Mearadd494642020-05-01 07:42:23 -0700503You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400504
Dan O'Mearadd494642020-05-01 07:42:23 -0700505Currently, only sorting by `name` or `creationTimestamp desc` is supported.
506 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
507 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
508 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
509 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400510
Dan O'Mearadd494642020-05-01 07:42:23 -0700511For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400512
Dan O'Mearadd494642020-05-01 07:42:23 -0700513You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400514
Dan O'Mearadd494642020-05-01 07:42:23 -0700515To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400516
517Returns:
518 An object of the form:
519
520 {
521 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700522 "items": [ # A list of License resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700523 { # Represents a License resource.
524 #
525 # A License represents billing and aggregate usage data for public and marketplace images. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. (== resource_for {$api_version}.licenses ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400526 "kind": "compute#license", # [Output Only] Type of resource. Always compute#license for licenses.
527 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 "chargesUseFee": True or False, # [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.
529 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400530 "licenseCode": "A String", # [Output Only] The unique code used to attach this license to images, snapshots, and disks.
531 "transferable": True or False, # If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.
532 "resourceRequirements": {
533 "minMemoryMb": 42, # Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.
534 "minGuestCpuCount": 42, # Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.
535 },
536 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
537 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
538 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 "name": "A String", # Name of the resource. The name must be 1-63 characters long and comply with RFC1035.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400540 },
541 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 "warning": { # [Output Only] Informational warning message.
543 "message": "A String", # [Output Only] A human-readable description of the warning code.
544 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
545 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
546 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
547 {
548 "value": "A String", # [Output Only] A warning data value corresponding to the key.
549 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
550 },
551 ],
552 },
553 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400554 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
555 }</pre>
556</div>
557
558<div class="method">
559 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
560 <pre>Retrieves the next page of results.
561
562Args:
563 previous_request: The request for the previous page. (required)
564 previous_response: The response from the request for the previous page. (required)
565
566Returns:
567 A request object that you can call 'execute()' on to request the next
568 page. Returns None if there are no more items in the collection.
569 </pre>
570</div>
571
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700572<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700573 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
574 <pre>Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700575
576Args:
577 project: string, Project ID for this request. (required)
578 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700579 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 The object takes the form of:
581
582{
Dan O'Mearadd494642020-05-01 07:42:23 -0700583 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 #
585 #
586 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700588 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700589 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700590 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700591 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700593 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700594 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700595 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700597 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700599 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
601 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
602 #
603 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
604 #
605 # Example Policy with multiple AuditConfigs:
606 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700607 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700609 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 "exemptedMembers": [
611 "A String",
612 ],
613 "auditLogConfigs": [ # The configuration for logging of each type of permission.
614 { # Provides the configuration for logging a type of permissions. Example:
615 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700616 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700617 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700618 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
620 "A String",
621 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700622 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623 "logType": "A String", # The log type that this config enables.
624 },
625 ],
626 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
627 },
628 ],
629 "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.
630 { # A rule to be applied in a Policy.
631 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
632 { # Specifies what kind of log the caller must write
633 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
634 #
635 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
636 #
637 # Field names correspond to IAM request parameters and field values are their respective values.
638 #
639 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
640 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700642 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -0700643 "customFields": [ # Custom fields.
644 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
645 "name": "A String", # Name is the field name.
646 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
647 },
648 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 "metric": "A String", # The metric to update.
650 },
651 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700653 },
654 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
655 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
656 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
657 "permissionType": "A String", # The type of the permission that was checked.
658 },
659 },
660 },
661 ],
662 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
663 "A String",
664 ],
665 "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.
666 "A String",
667 ],
668 "action": "A String", # Required
669 "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.
670 "A String",
671 ],
672 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
673 { # A condition to be met.
674 "iam": "A String", # Trusted attributes supplied by the IAM system.
675 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
676 "values": [ # The objects of the condition.
677 "A String",
678 ],
679 "svc": "A String", # Trusted attributes discharged by the service.
680 "op": "A String", # An operator to apply the subject with.
681 },
682 ],
683 "description": "A String", # Human-readable description of the rule.
684 },
685 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700686 "version": 42, # Specifies the format of the policy.
687 #
688 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
689 #
690 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
691 #
692 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
693 #
694 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
695 #
696 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 "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.
698 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700699 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
700 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 { # Associates `members` with a `role`.
702 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
703 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
704 #
705 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
706 #
707 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
708 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700709 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 #
711 #
712 #
713 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
714 #
715 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
716 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700717 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
718 #
719 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
720 #
721 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
722 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700723 #
724 #
725 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
726 "A String",
727 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700728 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700729 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700730 # Example (Comparison):
731 #
732 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
733 #
734 # Example (Equality):
735 #
736 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
737 #
738 # Example (Logic):
739 #
740 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
741 #
742 # Example (Data Manipulation):
743 #
744 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
745 #
746 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
747 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700748 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700749 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
750 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 },
752 },
753 ],
754 "iamOwned": True or False,
755 },
756 "bindings": [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.
757 { # Associates `members` with a `role`.
758 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
759 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
760 #
761 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
762 #
763 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
764 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700765 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 #
767 #
768 #
769 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
770 #
771 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
772 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700773 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
774 #
775 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
776 #
777 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
778 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779 #
780 #
781 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
782 "A String",
783 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700784 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700786 # Example (Comparison):
787 #
788 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
789 #
790 # Example (Equality):
791 #
792 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
793 #
794 # Example (Logic):
795 #
796 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
797 #
798 # Example (Data Manipulation):
799 #
800 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
801 #
802 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
803 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700804 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700805 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
806 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700807 },
808 },
809 ],
810 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
811 }
812
813
814Returns:
815 An object of the form:
816
Dan O'Mearadd494642020-05-01 07:42:23 -0700817 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700818 #
819 #
820 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700821 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700822 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700823 # Optionally, a `binding` can specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700824 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700825 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700827 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700829 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700830 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700831 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700832 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700833 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700834 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
835 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
836 #
837 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
838 #
839 # Example Policy with multiple AuditConfigs:
840 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700841 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700842 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700843 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700844 "exemptedMembers": [
845 "A String",
846 ],
847 "auditLogConfigs": [ # The configuration for logging of each type of permission.
848 { # Provides the configuration for logging a type of permissions. Example:
849 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700850 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700851 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700852 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700853 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
854 "A String",
855 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700856 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 "logType": "A String", # The log type that this config enables.
858 },
859 ],
860 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
861 },
862 ],
863 "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.
864 { # A rule to be applied in a Policy.
865 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
866 { # Specifies what kind of log the caller must write
867 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
868 #
869 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
870 #
871 # Field names correspond to IAM request parameters and field values are their respective values.
872 #
873 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
874 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -0700877 "customFields": [ # Custom fields.
878 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
879 "name": "A String", # Name is the field name.
880 "value": "A String", # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
881 },
882 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883 "metric": "A String", # The metric to update.
884 },
885 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -0700886 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700887 },
888 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
889 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
890 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
891 "permissionType": "A String", # The type of the permission that was checked.
892 },
893 },
894 },
895 ],
896 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
897 "A String",
898 ],
899 "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.
900 "A String",
901 ],
902 "action": "A String", # Required
903 "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.
904 "A String",
905 ],
906 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
907 { # A condition to be met.
908 "iam": "A String", # Trusted attributes supplied by the IAM system.
909 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
910 "values": [ # The objects of the condition.
911 "A String",
912 ],
913 "svc": "A String", # Trusted attributes discharged by the service.
914 "op": "A String", # An operator to apply the subject with.
915 },
916 ],
917 "description": "A String", # Human-readable description of the rule.
918 },
919 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700920 "version": 42, # Specifies the format of the policy.
921 #
922 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
923 #
924 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
925 #
926 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
927 #
928 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
929 #
930 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 "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.
932 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700933 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
934 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 { # Associates `members` with a `role`.
936 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
937 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
938 #
939 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
940 #
941 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
942 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700943 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700944 #
945 #
946 #
947 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
948 #
949 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
950 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700951 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
952 #
953 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
954 #
955 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
956 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 #
958 #
959 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
960 "A String",
961 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700962 "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700963 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700964 # Example (Comparison):
965 #
966 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
967 #
968 # Example (Equality):
969 #
970 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
971 #
972 # Example (Logic):
973 #
974 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
975 #
976 # Example (Data Manipulation):
977 #
978 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
979 #
980 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
981 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700982 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700983 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
984 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 },
986 },
987 ],
988 "iamOwned": True or False,
989 }</pre>
990</div>
991
992<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700993 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
994 <pre>Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700995
996Args:
997 project: string, Project ID for this request. (required)
998 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700999 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001000 The object takes the form of:
1001
1002{
1003 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1004 "A String",
1005 ],
1006 }
1007
1008
1009Returns:
1010 An object of the form:
1011
1012 {
1013 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1014 "A String",
1015 ],
1016 }</pre>
1017</div>
1018
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001019</body></html>