blob: 1d9391dc7a5aaad5d0af1e5de0eeb92eba9660e7 [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.snapshots.html">snapshots</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#delete">delete(project, snapshot, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, snapshot)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070083<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#getIamPolicy">getIamPolicy(project, resource)</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.</p>
86<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070087 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
88<p class="firstline">Retrieves the list of Snapshot resources contained within the specified project.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040093 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body)</a></code></p>
94<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
95<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070096 <code><a href="#setLabels">setLabels(project, resource, body)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098<p class="toc_element">
99 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body)</a></code></p>
100<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
101<h3>Method Details</h3>
102<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400103 <code class="details" id="delete">delete(project, snapshot, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104 <pre>Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.
105
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106For more information, see Deleting snapshots.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700107
108Args:
109 project: string, Project ID for this request. (required)
110 snapshot: string, Name of the Snapshot resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 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.
112
113For 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.
114
115The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116
117Returns:
118 An object of the form:
119
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 { # Represents an Operation resource.
121 #
122 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
123 #
124 # Operations can be global, regional or zonal.
125 # - For global operations, use the globalOperations resource.
126 # - For regional operations, use the regionOperations resource.
127 # - For zonal operations, use the zonalOperations resource.
128 #
129 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130 "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 -0700131 "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 -0400132 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700135 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
136 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
137 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
138 "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.
139 "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.
140 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
141 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
142 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
143 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
144 {
145 "message": "A String", # [Output Only] A human-readable description of the warning code.
146 "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.
147 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
148 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
149 {
150 "value": "A String", # [Output Only] A warning data value corresponding to the key.
151 "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).
152 },
153 ],
154 },
155 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700156 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
158 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
159 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
160 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700161 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700162 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
163 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
164 {
165 "message": "A String", # [Output Only] An optional, human-readable error message.
166 "code": "A String", # [Output Only] The error type identifier for this error.
167 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
168 },
169 ],
170 },
171 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
172 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800173 "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 -0700174 }</pre>
175</div>
176
177<div class="method">
178 <code class="details" id="get">get(project, snapshot)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 <pre>Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700180
181Args:
182 project: string, Project ID for this request. (required)
183 snapshot: string, Name of the Snapshot resource to return. (required)
184
185Returns:
186 An object of the form:
187
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 { # Represents a Persistent Disk Snapshot resource.
189 #
190 # You can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700191 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
192 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700194 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
195 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
196 #
197 # The key must meet the following requirements before you can provide it to Compute Engine:
198 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700200 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400201 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700202 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400203 "labels": { # Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700204 "a_key": "A String",
205 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206 "guestOsFeatures": [ # [Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
207 { # Guest OS features.
208 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
209 },
210 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700211 "licenses": [ # [Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).
212 "A String",
213 ],
214 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
215 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 "licenseCodes": [ # [Output Only] Integer license codes indicating which licenses are attached to this snapshot.
217 "A String",
218 ],
219 "sourceDisk": "A String", # [Output Only] The source disk used to create this snapshot.
220 "diskSizeGb": "A String", # [Output Only] Size of the snapshot, specified in GB.
221 "storageLocations": [ # GCS bucket storage location of the snapshot (regional or multi-regional).
222 "A String",
223 ],
224 "storageBytesStatus": "A String", # [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.
225 "status": "A String", # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
226 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
227 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
228 #
229 # To see the latest fingerprint, make a get() request to retrieve a snapshot.
230 "sourceDiskId": "A String", # [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.
231 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
232 "autoCreated": True or False, # [Output Only] Set to true if snapshots are automatically by applying resource policy on the target disk.
233 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
234 "storageBytes": "A String", # [Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.
235 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
236 "snapshotEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the snapshot using a customer-supplied encryption key.
237 #
238 # After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the snapshot later. For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request.
239 #
240 # Customer-supplied encryption keys do not protect access to metadata of the snapshot.
241 #
242 # If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later.
243 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
244 "kmsKeyServiceAccount": "A String",
245 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
246 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
247 #
248 # The key must meet the following requirements before you can provide it to Compute Engine:
249 # - The key is wrapped using a RSA public key certificate provided by Google.
250 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
251 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
252 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
253 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700254 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700255 }</pre>
256</div>
257
258<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400259 <code class="details" id="getIamPolicy">getIamPolicy(project, resource)</code>
260 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
261
262Args:
263 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700264 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400265
266Returns:
267 An object of the form:
268
269 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
270 #
271 #
272 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700273 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400274 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 # **JSON Example**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400276 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400278 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700279 # **YAML Example**
280 #
281 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
282 #
283 #
284 #
285 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400286 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400287 { # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400288 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400290 #
291 # Example Policy with multiple AuditConfigs:
292 #
293 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
294 #
295 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400296 "exemptedMembers": [
297 "A String",
298 ],
299 "auditLogConfigs": [ # The configuration for logging of each type of permission.
300 { # Provides the configuration for logging a type of permissions. Example:
301 #
302 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
303 #
304 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
305 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
306 "A String",
307 ],
308 "logType": "A String", # The log type that this config enables.
309 },
310 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400311 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400312 },
313 ],
314 "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.
315 { # A rule to be applied in a Policy.
316 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
317 { # Specifies what kind of log the caller must write
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
319 #
320 # 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.
321 #
322 # Field names correspond to IAM request parameters and field values are their respective values.
323 #
324 # 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.
325 #
326 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
327 #
328 # At this time we do not support multiple field names (though this may be supported in the future).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400329 "field": "A String", # The field value to attribute.
330 "metric": "A String", # The metric to update.
331 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700332 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
333 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
334 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400335 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
336 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
338 "permissionType": "A String", # The type of the permission that was checked.
339 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400340 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400341 },
342 ],
343 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
344 "A String",
345 ],
346 "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.
347 "A String",
348 ],
349 "action": "A String", # Required
350 "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.
351 "A String",
352 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700353 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400354 { # A condition to be met.
355 "iam": "A String", # Trusted attributes supplied by the IAM system.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400356 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700357 "values": [ # The objects of the condition.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400358 "A String",
359 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 "svc": "A String", # Trusted attributes discharged by the service.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400361 "op": "A String", # An operator to apply the subject with.
362 },
363 ],
364 "description": "A String", # Human-readable description of the rule.
365 },
366 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 "version": 42, # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400368 "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.
369 #
370 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400372 { # Associates `members` with a `role`.
373 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
374 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
375 #
376 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
377 #
378 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
379 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700380 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400381 #
382 #
383 #
384 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
385 #
386 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
387 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400388 #
389 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700390 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400391 "A String",
392 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 "condition": { # Represents an expression text. Example: # 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.
394 #
395 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
396 "title": "A String", # An 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.
397 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
398 #
399 # The application context of the containing message determines which well-known feature set of CEL is supported.
400 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
401 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
402 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400403 },
404 ],
405 "iamOwned": True or False,
406 }</pre>
407</div>
408
409<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700410 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
411 <pre>Retrieves the list of Snapshot resources contained within the specified project.
412
413Args:
414 project: string, Project ID for this request. (required)
415 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
416
417You 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.
418
419Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400420 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)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700421 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 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 =, !=, >, or <.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700423
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700424For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700425
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700426You 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 Cheemalapatidf613972016-10-21 13:59:49 -0700427
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700428To 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 Cheemalapatidf613972016-10-21 13:59:49 -0700429
430Returns:
431 An object of the form:
432
433 { # Contains a list of Snapshot resources.
434 "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 -0700435 "kind": "compute#snapshotList", # Type of resource.
436 "items": [ # A list of Snapshot resources.
437 { # Represents a Persistent Disk Snapshot resource.
438 #
439 # You can use snapshots to back up data on a regular interval. For more information, read Creating persistent disk snapshots. (== resource_for beta.snapshots ==) (== resource_for v1.snapshots ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700440 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
441 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 "kmsKeyServiceAccount": "A String",
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700443 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
444 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
445 #
446 # The key must meet the following requirements before you can provide it to Compute Engine:
447 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700449 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400450 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700451 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400452 "labels": { # Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700453 "a_key": "A String",
454 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455 "guestOsFeatures": [ # [Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
456 { # Guest OS features.
457 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
458 },
459 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700460 "licenses": [ # [Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image).
461 "A String",
462 ],
463 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
464 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 "licenseCodes": [ # [Output Only] Integer license codes indicating which licenses are attached to this snapshot.
466 "A String",
467 ],
468 "sourceDisk": "A String", # [Output Only] The source disk used to create this snapshot.
469 "diskSizeGb": "A String", # [Output Only] Size of the snapshot, specified in GB.
470 "storageLocations": [ # GCS bucket storage location of the snapshot (regional or multi-regional).
471 "A String",
472 ],
473 "storageBytesStatus": "A String", # [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.
474 "status": "A String", # [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.
475 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
476 "labelFingerprint": "A String", # A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
477 #
478 # To see the latest fingerprint, make a get() request to retrieve a snapshot.
479 "sourceDiskId": "A String", # [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.
480 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
481 "autoCreated": True or False, # [Output Only] Set to true if snapshots are automatically by applying resource policy on the target disk.
482 "kind": "compute#snapshot", # [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
483 "storageBytes": "A String", # [Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.
484 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
485 "snapshotEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the snapshot using a customer-supplied encryption key.
486 #
487 # After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the snapshot later. For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request.
488 #
489 # Customer-supplied encryption keys do not protect access to metadata of the snapshot.
490 #
491 # If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later.
492 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
493 "kmsKeyServiceAccount": "A String",
494 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
495 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
496 #
497 # The key must meet the following requirements before you can provide it to Compute Engine:
498 # - The key is wrapped using a RSA public key certificate provided by Google.
499 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
500 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
501 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
502 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700503 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700504 },
505 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700506 "warning": { # [Output Only] Informational warning message.
507 "message": "A String", # [Output Only] A human-readable description of the warning code.
508 "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.
509 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
510 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
511 {
512 "value": "A String", # [Output Only] A warning data value corresponding to the key.
513 "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).
514 },
515 ],
516 },
517 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700518 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
519 }</pre>
520</div>
521
522<div class="method">
523 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
524 <pre>Retrieves the next page of results.
525
526Args:
527 previous_request: The request for the previous page. (required)
528 previous_response: The response from the request for the previous page. (required)
529
530Returns:
531 A request object that you can call 'execute()' on to request the next
532 page. Returns None if there are no more items in the collection.
533 </pre>
534</div>
535
536<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400537 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body)</code>
538 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
539
540Args:
541 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400543 body: object, The request body. (required)
544 The object takes the form of:
545
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700546{
547 "policy": { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400548 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400549 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400550 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400552 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 # **JSON Example**
554 #
555 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
556 #
557 # **YAML Example**
558 #
559 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
560 #
561 #
562 #
563 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
564 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
565 { # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400566 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400568 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 # Example Policy with multiple AuditConfigs:
570 #
571 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
572 #
573 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
574 "exemptedMembers": [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400575 "A String",
576 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700577 "auditLogConfigs": [ # The configuration for logging of each type of permission.
578 { # Provides the configuration for logging a type of permissions. Example:
579 #
580 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
581 #
582 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
583 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
584 "A String",
585 ],
586 "logType": "A String", # The log type that this config enables.
587 },
588 ],
589 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400590 },
591 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 "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.
593 { # A rule to be applied in a Policy.
594 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
595 { # Specifies what kind of log the caller must write
596 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
597 #
598 # 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.
599 #
600 # Field names correspond to IAM request parameters and field values are their respective values.
601 #
602 # 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.
603 #
604 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
605 #
606 # At this time we do not support multiple field names (though this may be supported in the future).
607 "field": "A String", # The field value to attribute.
608 "metric": "A String", # The metric to update.
609 },
610 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
611 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
612 },
613 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
614 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
615 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
616 "permissionType": "A String", # The type of the permission that was checked.
617 },
618 },
619 },
620 ],
621 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
622 "A String",
623 ],
624 "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.
625 "A String",
626 ],
627 "action": "A String", # Required
628 "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.
629 "A String",
630 ],
631 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
632 { # A condition to be met.
633 "iam": "A String", # Trusted attributes supplied by the IAM system.
634 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
635 "values": [ # The objects of the condition.
636 "A String",
637 ],
638 "svc": "A String", # Trusted attributes discharged by the service.
639 "op": "A String", # An operator to apply the subject with.
640 },
641 ],
642 "description": "A String", # Human-readable description of the rule.
643 },
644 ],
645 "version": 42, # Deprecated.
646 "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.
647 #
648 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
649 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
650 { # Associates `members` with a `role`.
651 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
652 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
653 #
654 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
655 #
656 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
657 #
658 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
659 #
660 #
661 #
662 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
663 #
664 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
665 #
666 #
667 #
668 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
669 "A String",
670 ],
671 "condition": { # Represents an expression text. Example: # 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.
672 #
673 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
674 "title": "A String", # An 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.
675 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
676 #
677 # The application context of the containing message determines which well-known feature set of CEL is supported.
678 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
679 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400680 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400681 },
682 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700683 "iamOwned": True or False,
684 },
685 "bindings": [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.
686 { # Associates `members` with a `role`.
687 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
688 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
689 #
690 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
691 #
692 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
693 #
694 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
695 #
696 #
697 #
698 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
699 #
700 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
701 #
702 #
703 #
704 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
705 "A String",
706 ],
707 "condition": { # Represents an expression text. Example: # 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.
708 #
709 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
710 "title": "A String", # An 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.
711 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
712 #
713 # The application context of the containing message determines which well-known feature set of CEL is supported.
714 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
715 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400716 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 },
718 ],
719 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
720 }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400721
722
723Returns:
724 An object of the form:
725
726 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
727 #
728 #
729 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 # A `Policy` consists of a list of `bindings`. A `binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400731 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700732 # **JSON Example**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400733 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400735 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736 # **YAML Example**
737 #
738 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-other-app@appspot.gserviceaccount.com role: roles/owner - members: - user:sean@example.com role: roles/viewer
739 #
740 #
741 #
742 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam/docs).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400743 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400744 { # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400745 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400747 #
748 # Example Policy with multiple AuditConfigs:
749 #
750 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:bar@gmail.com" ] } ] } ] }
751 #
752 # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400753 "exemptedMembers": [
754 "A String",
755 ],
756 "auditLogConfigs": [ # The configuration for logging of each type of permission.
757 { # Provides the configuration for logging a type of permissions. Example:
758 #
759 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", } ] }
760 #
761 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ logging.
762 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
763 "A String",
764 ],
765 "logType": "A String", # The log type that this config enables.
766 },
767 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400768 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400769 },
770 ],
771 "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.
772 { # A rule to be applied in a Policy.
773 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
774 { # Specifies what kind of log the caller must write
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
776 #
777 # 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.
778 #
779 # Field names correspond to IAM request parameters and field values are their respective values.
780 #
781 # 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.
782 #
783 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
784 #
785 # At this time we do not support multiple field names (though this may be supported in the future).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400786 "field": "A String", # The field value to attribute.
787 "metric": "A String", # The metric to update.
788 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700789 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
790 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only in the LocalIAM implementation, for now.
791 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400792 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
793 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
795 "permissionType": "A String", # The type of the permission that was checked.
796 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400797 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400798 },
799 ],
800 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
801 "A String",
802 ],
803 "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.
804 "A String",
805 ],
806 "action": "A String", # Required
807 "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.
808 "A String",
809 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400811 { # A condition to be met.
812 "iam": "A String", # Trusted attributes supplied by the IAM system.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400813 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 "values": [ # The objects of the condition.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400815 "A String",
816 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 "svc": "A String", # Trusted attributes discharged by the service.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400818 "op": "A String", # An operator to apply the subject with.
819 },
820 ],
821 "description": "A String", # Human-readable description of the rule.
822 },
823 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700824 "version": 42, # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400825 "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.
826 #
827 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 "bindings": [ # Associates a list of `members` to a `role`. `bindings` with no members will result in an error.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400829 { # Associates `members` with a `role`.
830 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
831 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
832 #
833 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
834 #
835 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
836 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700837 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400838 #
839 #
840 #
841 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
842 #
843 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
844 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400845 #
846 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700847 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400848 "A String",
849 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700850 "condition": { # Represents an expression text. Example: # 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.
851 #
852 # title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0"
853 "title": "A String", # An 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.
854 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
855 #
856 # The application context of the containing message determines which well-known feature set of CEL is supported.
857 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
858 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
859 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400860 },
861 ],
862 "iamOwned": True or False,
863 }</pre>
864</div>
865
866<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700867 <code class="details" id="setLabels">setLabels(project, resource, body)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 <pre>Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700869
870Args:
871 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700872 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700873 body: object, The request body. (required)
874 The object takes the form of:
875
876{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700877 "labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.
878 "labels": { # A list of labels to apply for this resource. Each label key & value must comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. For example, "webserver-frontend": "images". A label value can also be empty (e.g. "my-label": "").
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700879 "a_key": "A String",
880 },
881 }
882
883
884Returns:
885 An object of the form:
886
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700887 { # Represents an Operation resource.
888 #
889 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
890 #
891 # Operations can be global, regional or zonal.
892 # - For global operations, use the globalOperations resource.
893 # - For regional operations, use the regionOperations resource.
894 # - For zonal operations, use the zonalOperations resource.
895 #
896 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700897 "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 -0700898 "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 -0400899 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700900 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700901 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700902 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
903 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
904 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
905 "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.
906 "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.
907 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
908 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
909 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
910 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
911 {
912 "message": "A String", # [Output Only] A human-readable description of the warning code.
913 "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.
914 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
915 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
916 {
917 "value": "A String", # [Output Only] A warning data value corresponding to the key.
918 "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).
919 },
920 ],
921 },
922 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700923 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700924 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
925 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
926 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
927 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700928 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700929 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
930 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
931 {
932 "message": "A String", # [Output Only] An optional, human-readable error message.
933 "code": "A String", # [Output Only] The error type identifier for this error.
934 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
935 },
936 ],
937 },
938 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
939 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800940 "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 -0700941 }</pre>
942</div>
943
944<div class="method">
945 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body)</code>
946 <pre>Returns permissions that a caller has on the specified resource.
947
948Args:
949 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700950 resource: string, Name or id of the resource for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700951 body: object, The request body. (required)
952 The object takes the form of:
953
954{
955 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
956 "A String",
957 ],
958 }
959
960
961Returns:
962 An object of the form:
963
964 {
965 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
966 "A String",
967 ],
968 }</pre>
969</div>
970
971</body></html>