blob: 9919c0e3522aa1d99ffbf596bc53e7a344fc1d4c [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_beta.html">Compute Engine API</a> . <a href="compute_beta.images.html">images</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070081 <code><a href="#delete">delete(project, image, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Deletes the specified image.</p>
83<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070084 <code><a href="#deprecate">deprecate(project, image, body=None, requestId=None)</a></code></p>
85<p class="firstline">Sets the deprecation status of an image.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070086<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070087 <code><a href="#get">get(project, image)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified image. Gets a list of available images by making a list() request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070090 <code><a href="#getFromFamily">getFromFamily(project, family)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Returns the latest image that is part of an image family and is not deprecated.</p>
92<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070093 <code><a href="#getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
95<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070096 <code><a href="#insert">insert(project, body=None, forceCreate=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Creates an image in the specified project using the data included in the request.</p>
98<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -070099 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<p class="toc_element">
102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700105 <code><a href="#patch">patch(project, image, body=None, requestId=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700106<p class="firstline">Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.</p>
107<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700108 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
110<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700111 <code><a href="#setLabels">setLabels(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700113<p class="toc_element">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700114 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
116<h3>Method Details</h3>
117<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700118 <code class="details" id="close">close()</code>
119 <pre>Close httplib2 connections.</pre>
120</div>
121
122<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700123 <code class="details" id="delete">delete(project, image, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700124 <pre>Deletes the specified image.
125
126Args:
127 project: string, Project ID for this request. (required)
128 image: string, Name of the image resource to delete. (required)
yoshi-code-botc3f86752021-06-12 00:20:02 -0700129 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.
130
131For 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.
132
133The 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 -0700134
135Returns:
136 An object of the form:
137
yoshi-code-botc3f86752021-06-12 00:20:02 -0700138 { # Represents an Operation resource.
139 #
140 # Google Compute Engine has three Operation resources:
141 #
142 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
143 #
144 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
145 #
146 # Operations can be global, regional or zonal.
147 # - For global operations, use the `globalOperations` resource.
148 # - For regional operations, use the `regionOperations` resource.
149 # - For zonal operations, use the `zonalOperations` resource.
150 #
151 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800152 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
153 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
154 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
155 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
156 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
157 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800159 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
160 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
161 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 },
163 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800164 },
165 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
166 &quot;httpErrorStatusCode&quot;: 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.
167 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
168 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
169 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
170 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800171 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800172 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
173 &quot;progress&quot;: 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.
174 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
175 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
176 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
177 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
178 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
179 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
180 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
181 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
182 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
183 {
184 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700185 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
186 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800187 {
188 &quot;key&quot;: &quot;A String&quot;, # [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).
189 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
190 },
191 ],
192 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
193 },
194 ],
195 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
196}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700197</div>
198
199<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700200 <code class="details" id="deprecate">deprecate(project, image, body=None, requestId=None)</code>
201 <pre>Sets the deprecation status of an image.
202
203If an empty request body is given, clears the deprecation status instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700204
205Args:
206 project: string, Project ID for this request. (required)
207 image: string, Image name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700209 The object takes the form of:
210
211{ # Deprecation status for a public resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 &quot;deleted&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
213 &quot;deprecated&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
214 &quot;obsolete&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
215 &quot;replacement&quot;: &quot;A String&quot;, # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
216 &quot;state&quot;: &quot;A String&quot;, # The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700217}
218
yoshi-code-botc3f86752021-06-12 00:20:02 -0700219 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.
220
221For 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.
222
223The 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 -0700224
225Returns:
226 An object of the form:
227
yoshi-code-botc3f86752021-06-12 00:20:02 -0700228 { # Represents an Operation resource.
229 #
230 # Google Compute Engine has three Operation resources:
231 #
232 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
233 #
234 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
235 #
236 # Operations can be global, regional or zonal.
237 # - For global operations, use the `globalOperations` resource.
238 # - For regional operations, use the `regionOperations` resource.
239 # - For zonal operations, use the `zonalOperations` resource.
240 #
241 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800242 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
243 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
244 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
245 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
246 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
247 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800249 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
250 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
251 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 },
253 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800254 },
255 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
256 &quot;httpErrorStatusCode&quot;: 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.
257 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
258 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
259 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
260 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800261 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800262 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
263 &quot;progress&quot;: 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.
264 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
265 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
266 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
267 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
268 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
269 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
270 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
271 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
272 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
273 {
274 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700275 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
276 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800277 {
278 &quot;key&quot;: &quot;A String&quot;, # [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).
279 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
280 },
281 ],
282 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
283 },
284 ],
285 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
286}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700287</div>
288
289<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700290 <code class="details" id="get">get(project, image)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 <pre>Returns the specified image. Gets a list of available images by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700292
293Args:
294 project: string, Project ID for this request. (required)
295 image: string, Name of the image resource to return. (required)
296
297Returns:
298 An object of the form:
299
yoshi-code-botc3f86752021-06-12 00:20:02 -0700300 { # Represents an Image resource.
301 #
302 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800303 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
304 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
305 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
306 &quot;deleted&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
307 &quot;deprecated&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
308 &quot;obsolete&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
309 &quot;replacement&quot;: &quot;A String&quot;, # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
310 &quot;state&quot;: &quot;A String&quot;, # The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
311 },
312 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
313 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
314 &quot;family&quot;: &quot;A String&quot;, # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700315 &quot;guestOsFeatures&quot;: [ # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800316 { # Guest OS features.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700317 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800318 },
319 ],
320 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700321 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
322 #
323 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
324 #
325 # Customer-supplied encryption keys do not protect access to metadata of the disk.
326 #
327 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800328 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
329 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
330 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700331 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
332 #
333 # The key must meet the following requirements before you can provide it to Compute Engine:
334 # - The key is wrapped using a RSA public key certificate provided by Google.
335 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
336 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800337 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
338 },
339 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700340 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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.
341 #
342 # To see the latest fingerprint, make a get() request to retrieve an image.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800343 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
344 &quot;a_key&quot;: &quot;A String&quot;,
345 },
346 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
347 &quot;A String&quot;,
348 ],
349 &quot;licenses&quot;: [ # Any applicable license URI.
350 &quot;A String&quot;,
351 ],
352 &quot;name&quot;: &quot;A String&quot;, # 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.
353 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
354 &quot;containerType&quot;: &quot;A String&quot;, # The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
355 &quot;sha1Checksum&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700356 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
357 #
358 # In order to create an image, you must provide the full or partial URL of one of the following:
359 # - The rawDisk.source URL
360 # - The sourceDisk URL
361 # - The sourceImage URL
362 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800363 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800364 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800365 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
366 &quot;shieldedInstanceInitialState&quot;: { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
367 &quot;dbs&quot;: [ # The Key Database (db).
368 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
370 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700371 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800373 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
374 {
375 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
376 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
377 },
378 ],
379 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
380 {
381 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
382 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
383 },
384 ],
385 &quot;pk&quot;: { # The Platform Key (PK).
386 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
387 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
388 },
389 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700390 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
391 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
392 # - projects/project/zones/zone/disks/disk
393 # - zones/zone/disks/disk
394 #
395 # In order to create an image, you must provide the full or partial URL of one of the following:
396 # - The rawDisk.source URL
397 # - The sourceDisk URL
398 # - The sourceImage URL
399 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800400 &quot;sourceDiskEncryptionKey&quot;: { # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
401 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
402 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
403 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700404 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
405 #
406 # The key must meet the following requirements before you can provide it to Compute Engine:
407 # - The key is wrapped using a RSA public key certificate provided by Google.
408 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
409 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800410 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
411 },
412 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700413 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
414 #
415 # In order to create an image, you must provide the full or partial URL of one of the following:
416 # - The rawDisk.source URL
417 # - The sourceDisk URL
418 # - The sourceImage URL
419 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800420 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
421 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
422 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
423 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700424 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
425 #
426 # The key must meet the following requirements before you can provide it to Compute Engine:
427 # - The key is wrapped using a RSA public key certificate provided by Google.
428 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
429 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800430 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
431 },
432 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700433 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
434 #
435 # In order to create an image, you must provide the full or partial URL of one of the following:
436 # - The rawDisk.source URL
437 # - The sourceDisk URL
438 # - The sourceImage URL
439 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800440 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
441 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
442 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
443 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700444 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # 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.
448 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
449 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800450 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
451 },
452 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
453 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
454 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
455 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
456 &quot;A String&quot;,
457 ],
458}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700459</div>
460
461<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700462 <code class="details" id="getFromFamily">getFromFamily(project, family)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700463 <pre>Returns the latest image that is part of an image family and is not deprecated.
464
465Args:
466 project: string, Project ID for this request. (required)
467 family: string, Name of the image family to search for. (required)
468
469Returns:
470 An object of the form:
471
yoshi-code-botc3f86752021-06-12 00:20:02 -0700472 { # Represents an Image resource.
473 #
474 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800475 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
476 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
477 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
478 &quot;deleted&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
479 &quot;deprecated&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
480 &quot;obsolete&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
481 &quot;replacement&quot;: &quot;A String&quot;, # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
482 &quot;state&quot;: &quot;A String&quot;, # The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
483 },
484 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
485 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
486 &quot;family&quot;: &quot;A String&quot;, # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700487 &quot;guestOsFeatures&quot;: [ # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800488 { # Guest OS features.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700489 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800490 },
491 ],
492 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700493 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
494 #
495 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
496 #
497 # Customer-supplied encryption keys do not protect access to metadata of the disk.
498 #
499 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800500 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
501 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
502 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700503 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
504 #
505 # The key must meet the following requirements before you can provide it to Compute Engine:
506 # - The key is wrapped using a RSA public key certificate provided by Google.
507 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
508 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800509 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
510 },
511 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700512 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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.
513 #
514 # To see the latest fingerprint, make a get() request to retrieve an image.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800515 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
516 &quot;a_key&quot;: &quot;A String&quot;,
517 },
518 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
519 &quot;A String&quot;,
520 ],
521 &quot;licenses&quot;: [ # Any applicable license URI.
522 &quot;A String&quot;,
523 ],
524 &quot;name&quot;: &quot;A String&quot;, # 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.
525 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
526 &quot;containerType&quot;: &quot;A String&quot;, # The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
527 &quot;sha1Checksum&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700528 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
529 #
530 # In order to create an image, you must provide the full or partial URL of one of the following:
531 # - The rawDisk.source URL
532 # - The sourceDisk URL
533 # - The sourceImage URL
534 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800535 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800536 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800537 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
538 &quot;shieldedInstanceInitialState&quot;: { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
539 &quot;dbs&quot;: [ # The Key Database (db).
540 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
542 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700543 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800545 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
546 {
547 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
548 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
549 },
550 ],
551 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
552 {
553 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
554 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
555 },
556 ],
557 &quot;pk&quot;: { # The Platform Key (PK).
558 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
559 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
560 },
561 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700562 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
563 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
564 # - projects/project/zones/zone/disks/disk
565 # - zones/zone/disks/disk
566 #
567 # In order to create an image, you must provide the full or partial URL of one of the following:
568 # - The rawDisk.source URL
569 # - The sourceDisk URL
570 # - The sourceImage URL
571 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800572 &quot;sourceDiskEncryptionKey&quot;: { # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
573 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
574 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
575 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700576 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
577 #
578 # The key must meet the following requirements before you can provide it to Compute Engine:
579 # - The key is wrapped using a RSA public key certificate provided by Google.
580 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
581 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800582 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
583 },
584 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700585 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
586 #
587 # In order to create an image, you must provide the full or partial URL of one of the following:
588 # - The rawDisk.source URL
589 # - The sourceDisk URL
590 # - The sourceImage URL
591 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800592 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
593 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
594 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
595 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700596 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
597 #
598 # The key must meet the following requirements before you can provide it to Compute Engine:
599 # - The key is wrapped using a RSA public key certificate provided by Google.
600 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
601 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800602 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
603 },
604 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700605 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
606 #
607 # In order to create an image, you must provide the full or partial URL of one of the following:
608 # - The rawDisk.source URL
609 # - The sourceDisk URL
610 # - The sourceImage URL
611 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800612 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
613 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
614 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
615 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700616 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
617 #
618 # The key must meet the following requirements before you can provide it to Compute Engine:
619 # - The key is wrapped using a RSA public key certificate provided by Google.
620 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
621 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800622 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
623 },
624 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
625 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
626 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
627 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
628 &quot;A String&quot;,
629 ],
630}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700631</div>
632
633<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700634 <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
636
637Args:
638 project: string, Project ID for this request. (required)
639 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700640 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700641
642Returns:
643 An object of the form:
644
yoshi-code-botc3f86752021-06-12 00:20:02 -0700645 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
646 #
647 #
648 #
649 # 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.
650 #
651 # For some types of Google Cloud resources, a `binding` can also 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
652 #
653 # **JSON example:**
654 #
655 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
656 #
657 # **YAML example:**
658 #
659 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
660 #
661 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800662 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700663 { # 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.
664 #
665 # 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.
666 #
667 # Example Policy with multiple AuditConfigs:
668 #
669 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
670 #
671 # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800672 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700673 { # Provides the configuration for logging a type of permissions. Example:
674 #
675 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
676 #
677 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
678 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800679 &quot;A String&quot;,
680 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700681 &quot;ignoreChildExemptions&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800682 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700683 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800684 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700685 &quot;exemptedMembers&quot;: [
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800686 &quot;A String&quot;,
687 ],
688 &quot;service&quot;: &quot;A String&quot;, # 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.
689 },
690 ],
691 &quot;bindings&quot;: [ # 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.
692 { # Associates `members` with a `role`.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700693 &quot;bindingId&quot;: &quot;A String&quot;,
694 &quot;condition&quot;: { # 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.
695 #
696 # If the condition evaluates to `true`, then this binding applies to the current request.
697 #
698 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
699 #
700 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
701 #
702 # Example (Comparison):
703 #
704 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
705 #
706 # Example (Equality):
707 #
708 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
709 #
710 # Example (Logic):
711 #
712 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
713 #
714 # Example (Data Manipulation):
715 #
716 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
717 #
718 # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800719 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
720 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
721 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
722 &quot;title&quot;: &quot;A String&quot;, # 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 -0700723 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700724 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
725 #
726 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
727 #
728 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
729 #
730 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
731 #
732 #
733 #
734 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
735 #
736 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
737 #
738 # * `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.
739 #
740 # * `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.
741 #
742 # * `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.
743 #
744 #
745 #
746 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800747 &quot;A String&quot;,
748 ],
749 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
750 },
751 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700752 &quot;etag&quot;: &quot;A String&quot;, # `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.
753 #
754 # **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.
755 &quot;iamOwned&quot;: True or False,
756 &quot;rules&quot;: [ # 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.
757 { # A rule to be applied in a Policy.
758 &quot;action&quot;: &quot;A String&quot;, # Required
759 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
760 { # A condition to be met.
761 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
762 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
763 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
764 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
765 &quot;values&quot;: [ # The objects of the condition.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800766 &quot;A String&quot;,
767 ],
768 },
769 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700770 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
771 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800772 &quot;A String&quot;,
773 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700774 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
775 { # Specifies what kind of log the caller must write
776 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
777 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
778 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800779 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700780 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim65020912020-05-20 12:08:20 -0700781 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700782 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
783 #
784 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
785 #
786 # Field names correspond to IAM request parameters and field values are their respective values.
787 #
788 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
789 #
790 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
791 &quot;customFields&quot;: [ # Custom fields.
792 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
793 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
794 &quot;value&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800796 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700797 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
798 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700800 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
801 &quot;logMode&quot;: &quot;A String&quot;,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800802 },
803 },
804 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700805 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800806 &quot;A String&quot;,
807 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700808 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800809 &quot;A String&quot;,
810 ],
811 },
812 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -0700813 &quot;version&quot;: 42, # Specifies the format of the policy.
814 #
815 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
816 #
817 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
818 #
819 # * 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
820 #
821 # **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.
822 #
823 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
824 #
825 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800826}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700827</div>
828
829<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -0700830 <code class="details" id="insert">insert(project, body=None, forceCreate=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700831 <pre>Creates an image in the specified project using the data included in the request.
832
833Args:
834 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700835 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700836 The object takes the form of:
837
yoshi-code-botc3f86752021-06-12 00:20:02 -0700838{ # Represents an Image resource.
839 #
840 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700841 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
842 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
843 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
844 &quot;deleted&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
845 &quot;deprecated&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
846 &quot;obsolete&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
847 &quot;replacement&quot;: &quot;A String&quot;, # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
848 &quot;state&quot;: &quot;A String&quot;, # The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
849 },
850 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
851 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
852 &quot;family&quot;: &quot;A String&quot;, # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700853 &quot;guestOsFeatures&quot;: [ # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 { # Guest OS features.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700855 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 },
857 ],
858 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700859 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
860 #
861 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
862 #
863 # Customer-supplied encryption keys do not protect access to metadata of the disk.
864 #
865 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
Bu Sun Kim65020912020-05-20 12:08:20 -0700866 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
867 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
868 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700869 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
870 #
871 # The key must meet the following requirements before you can provide it to Compute Engine:
872 # - The key is wrapped using a RSA public key certificate provided by Google.
873 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
874 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
876 },
877 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700878 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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.
879 #
880 # To see the latest fingerprint, make a get() request to retrieve an image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
882 &quot;a_key&quot;: &quot;A String&quot;,
883 },
884 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
885 &quot;A String&quot;,
886 ],
887 &quot;licenses&quot;: [ # Any applicable license URI.
888 &quot;A String&quot;,
889 ],
890 &quot;name&quot;: &quot;A String&quot;, # 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.
891 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
892 &quot;containerType&quot;: &quot;A String&quot;, # The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
893 &quot;sha1Checksum&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700894 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
895 #
896 # In order to create an image, you must provide the full or partial URL of one of the following:
897 # - The rawDisk.source URL
898 # - The sourceDisk URL
899 # - The sourceImage URL
900 # - The sourceSnapshot URL
Bu Sun Kim65020912020-05-20 12:08:20 -0700901 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800902 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
904 &quot;shieldedInstanceInitialState&quot;: { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
905 &quot;dbs&quot;: [ # The Key Database (db).
906 {
907 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
908 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700909 },
910 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
912 {
913 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
914 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700915 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 ],
917 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
918 {
919 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
920 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
921 },
922 ],
923 &quot;pk&quot;: { # The Platform Key (PK).
924 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
925 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700926 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700927 },
yoshi-code-botc3f86752021-06-12 00:20:02 -0700928 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
929 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
930 # - projects/project/zones/zone/disks/disk
931 # - zones/zone/disks/disk
932 #
933 # In order to create an image, you must provide the full or partial URL of one of the following:
934 # - The rawDisk.source URL
935 # - The sourceDisk URL
936 # - The sourceImage URL
937 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700938 &quot;sourceDiskEncryptionKey&quot;: { # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
940 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
941 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700942 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
943 #
944 # The key must meet the following requirements before you can provide it to Compute Engine:
945 # - The key is wrapped using a RSA public key certificate provided by Google.
946 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
947 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
949 },
950 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700951 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
952 #
953 # In order to create an image, you must provide the full or partial URL of one of the following:
954 # - The rawDisk.source URL
955 # - The sourceDisk URL
956 # - The sourceImage URL
957 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700958 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
960 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
961 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700962 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
963 #
964 # The key must meet the following requirements before you can provide it to Compute Engine:
965 # - The key is wrapped using a RSA public key certificate provided by Google.
966 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
967 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
969 },
970 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700971 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
972 #
973 # In order to create an image, you must provide the full or partial URL of one of the following:
974 # - The rawDisk.source URL
975 # - The sourceDisk URL
976 # - The sourceImage URL
977 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700978 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700979 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
980 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
981 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700982 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
983 #
984 # The key must meet the following requirements before you can provide it to Compute Engine:
985 # - The key is wrapped using a RSA public key certificate provided by Google.
986 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
987 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
989 },
990 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
991 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
992 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
993 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
994 &quot;A String&quot;,
995 ],
996}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700997
Bu Sun Kim65020912020-05-20 12:08:20 -0700998 forceCreate: boolean, Force image creation if true.
yoshi-code-botc3f86752021-06-12 00:20:02 -0700999 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.
1000
1001For 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.
1002
1003The 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 -07001004
1005Returns:
1006 An object of the form:
1007
yoshi-code-botc3f86752021-06-12 00:20:02 -07001008 { # Represents an Operation resource.
1009 #
1010 # Google Compute Engine has three Operation resources:
1011 #
1012 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1013 #
1014 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1015 #
1016 # Operations can be global, regional or zonal.
1017 # - For global operations, use the `globalOperations` resource.
1018 # - For regional operations, use the `regionOperations` resource.
1019 # - For zonal operations, use the `zonalOperations` resource.
1020 #
1021 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001022 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1023 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1024 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1025 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1026 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1027 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001028 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001029 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1030 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1031 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 },
1033 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001034 },
1035 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1036 &quot;httpErrorStatusCode&quot;: 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.
1037 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1038 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1039 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1040 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001041 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001042 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1043 &quot;progress&quot;: 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.
1044 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1045 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1046 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1047 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1048 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1049 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1050 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1051 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1052 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1053 {
1054 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001055 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1056 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001057 {
1058 &quot;key&quot;: &quot;A String&quot;, # [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).
1059 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1060 },
1061 ],
1062 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1063 },
1064 ],
1065 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1066}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001067</div>
1068
1069<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001070 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001071 <pre>Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001072
1073Args:
1074 project: string, Project ID for this request. (required)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001075 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;`.
1076
1077For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1078
1079You 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.
1080
1081To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Bu Sun Kim65020912020-05-20 12:08:20 -07001082 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`)
yoshi-code-botc3f86752021-06-12 00:20:02 -07001083 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1084
1085You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
1086
1087Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Bu Sun Kim65020912020-05-20 12:08:20 -07001088 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001089 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001090
1091Returns:
1092 An object of the form:
1093
1094 { # Contains a list of images.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001095 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1096 &quot;items&quot;: [ # A list of Image resources.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001097 { # Represents an Image resource.
1098 #
1099 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001100 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
1101 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1102 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
1103 &quot;deleted&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
1104 &quot;deprecated&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
1105 &quot;obsolete&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
1106 &quot;replacement&quot;: &quot;A String&quot;, # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
1107 &quot;state&quot;: &quot;A String&quot;, # The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
1108 },
1109 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1110 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
1111 &quot;family&quot;: &quot;A String&quot;, # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001112 &quot;guestOsFeatures&quot;: [ # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001113 { # Guest OS features.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001114 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001115 },
1116 ],
1117 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001118 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
1119 #
1120 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
1121 #
1122 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1123 #
1124 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001125 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1126 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1127 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001128 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1129 #
1130 # The key must meet the following requirements before you can provide it to Compute Engine:
1131 # - The key is wrapped using a RSA public key certificate provided by Google.
1132 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1133 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001134 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1135 },
1136 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001137 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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.
1138 #
1139 # To see the latest fingerprint, make a get() request to retrieve an image.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001140 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
1141 &quot;a_key&quot;: &quot;A String&quot;,
1142 },
1143 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
1144 &quot;A String&quot;,
1145 ],
1146 &quot;licenses&quot;: [ # Any applicable license URI.
1147 &quot;A String&quot;,
1148 ],
1149 &quot;name&quot;: &quot;A String&quot;, # 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.
1150 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
1151 &quot;containerType&quot;: &quot;A String&quot;, # The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
1152 &quot;sha1Checksum&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001153 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
1154 #
1155 # In order to create an image, you must provide the full or partial URL of one of the following:
1156 # - The rawDisk.source URL
1157 # - The sourceDisk URL
1158 # - The sourceImage URL
1159 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001160 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001161 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001162 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1163 &quot;shieldedInstanceInitialState&quot;: { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
1164 &quot;dbs&quot;: [ # The Key Database (db).
1165 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001166 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1167 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1168 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001169 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001170 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1171 {
1172 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1173 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1174 },
1175 ],
1176 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1177 {
1178 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1179 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1180 },
1181 ],
1182 &quot;pk&quot;: { # The Platform Key (PK).
1183 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1184 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1185 },
1186 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001187 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
1188 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1189 # - projects/project/zones/zone/disks/disk
1190 # - zones/zone/disks/disk
1191 #
1192 # In order to create an image, you must provide the full or partial URL of one of the following:
1193 # - The rawDisk.source URL
1194 # - The sourceDisk URL
1195 # - The sourceImage URL
1196 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001197 &quot;sourceDiskEncryptionKey&quot;: { # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
1198 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1199 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1200 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001201 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1202 #
1203 # The key must meet the following requirements before you can provide it to Compute Engine:
1204 # - The key is wrapped using a RSA public key certificate provided by Google.
1205 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1206 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001207 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1208 },
1209 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001210 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
1211 #
1212 # In order to create an image, you must provide the full or partial URL of one of the following:
1213 # - The rawDisk.source URL
1214 # - The sourceDisk URL
1215 # - The sourceImage URL
1216 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001217 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1218 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1219 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1220 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001221 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1222 #
1223 # The key must meet the following requirements before you can provide it to Compute Engine:
1224 # - The key is wrapped using a RSA public key certificate provided by Google.
1225 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1226 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001227 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1228 },
1229 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001230 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
1231 #
1232 # In order to create an image, you must provide the full or partial URL of one of the following:
1233 # - The rawDisk.source URL
1234 # - The sourceDisk URL
1235 # - The sourceImage URL
1236 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001237 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
1238 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1239 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1240 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001241 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1242 #
1243 # The key must meet the following requirements before you can provide it to Compute Engine:
1244 # - The key is wrapped using a RSA public key certificate provided by Google.
1245 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1246 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001247 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1248 },
1249 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
1250 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
1251 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
1252 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
1253 &quot;A String&quot;,
1254 ],
1255 },
1256 ],
1257 &quot;kind&quot;: &quot;compute#imageList&quot;, # Type of resource.
1258 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
1259 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1260 &quot;warning&quot;: { # [Output Only] Informational warning message.
1261 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001262 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1263 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001264 {
1265 &quot;key&quot;: &quot;A String&quot;, # [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).
1266 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001267 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001268 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001269 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1270 },
1271}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001272</div>
1273
1274<div class="method">
1275 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1276 <pre>Retrieves the next page of results.
1277
1278Args:
1279 previous_request: The request for the previous page. (required)
1280 previous_response: The response from the request for the previous page. (required)
1281
1282Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001283 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001284 page. Returns None if there are no more items in the collection.
1285 </pre>
1286</div>
1287
1288<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001289 <code class="details" id="patch">patch(project, image, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001290 <pre>Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.
1291
1292Args:
1293 project: string, Project ID for this request. (required)
1294 image: string, Name of the image resource to patch. (required)
1295 body: object, The request body.
1296 The object takes the form of:
1297
yoshi-code-botc3f86752021-06-12 00:20:02 -07001298{ # Represents an Image resource.
1299 #
1300 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001301 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
1302 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1303 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
1304 &quot;deleted&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it.
1305 &quot;deprecated&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it.
1306 &quot;obsolete&quot;: &quot;A String&quot;, # An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it.
1307 &quot;replacement&quot;: &quot;A String&quot;, # The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource.
1308 &quot;state&quot;: &quot;A String&quot;, # The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
1309 },
1310 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1311 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
1312 &quot;family&quot;: &quot;A String&quot;, # The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001313 &quot;guestOsFeatures&quot;: [ # 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001314 { # Guest OS features.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001315 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001316 },
1317 ],
1318 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001319 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
1320 #
1321 # After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
1322 #
1323 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1324 #
1325 # If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001326 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1327 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1328 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001329 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1330 #
1331 # The key must meet the following requirements before you can provide it to Compute Engine:
1332 # - The key is wrapped using a RSA public key certificate provided by Google.
1333 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1334 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001335 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1336 },
1337 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001338 &quot;labelFingerprint&quot;: &quot;A String&quot;, # A fingerprint for the labels being applied to this image, which is essentially a hash of the labels 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.
1339 #
1340 # To see the latest fingerprint, make a get() request to retrieve an image.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001341 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
1342 &quot;a_key&quot;: &quot;A String&quot;,
1343 },
1344 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
1345 &quot;A String&quot;,
1346 ],
1347 &quot;licenses&quot;: [ # Any applicable license URI.
1348 &quot;A String&quot;,
1349 ],
1350 &quot;name&quot;: &quot;A String&quot;, # 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.
1351 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
1352 &quot;containerType&quot;: &quot;A String&quot;, # The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
1353 &quot;sha1Checksum&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001354 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
1355 #
1356 # In order to create an image, you must provide the full or partial URL of one of the following:
1357 # - The rawDisk.source URL
1358 # - The sourceDisk URL
1359 # - The sourceImage URL
1360 # - The sourceSnapshot URL
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001361 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001362 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001363 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1364 &quot;shieldedInstanceInitialState&quot;: { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
1365 &quot;dbs&quot;: [ # The Key Database (db).
1366 {
1367 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1368 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1369 },
1370 ],
1371 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1372 {
1373 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1374 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1375 },
1376 ],
1377 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1378 {
1379 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1380 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1381 },
1382 ],
1383 &quot;pk&quot;: { # The Platform Key (PK).
1384 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1385 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1386 },
1387 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001388 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
1389 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1390 # - projects/project/zones/zone/disks/disk
1391 # - zones/zone/disks/disk
1392 #
1393 # In order to create an image, you must provide the full or partial URL of one of the following:
1394 # - The rawDisk.source URL
1395 # - The sourceDisk URL
1396 # - The sourceImage URL
1397 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001398 &quot;sourceDiskEncryptionKey&quot;: { # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001399 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1400 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1401 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001402 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1403 #
1404 # The key must meet the following requirements before you can provide it to Compute Engine:
1405 # - The key is wrapped using a RSA public key certificate provided by Google.
1406 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1407 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001408 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1409 },
1410 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001411 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
1412 #
1413 # In order to create an image, you must provide the full or partial URL of one of the following:
1414 # - The rawDisk.source URL
1415 # - The sourceDisk URL
1416 # - The sourceImage URL
1417 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001418 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001419 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1420 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1421 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001422 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1423 #
1424 # The key must meet the following requirements before you can provide it to Compute Engine:
1425 # - The key is wrapped using a RSA public key certificate provided by Google.
1426 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1427 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001428 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1429 },
1430 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001431 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
1432 #
1433 # In order to create an image, you must provide the full or partial URL of one of the following:
1434 # - The rawDisk.source URL
1435 # - The sourceDisk URL
1436 # - The sourceImage URL
1437 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001438 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001439 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1440 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1441 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001442 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1443 #
1444 # The key must meet the following requirements before you can provide it to Compute Engine:
1445 # - The key is wrapped using a RSA public key certificate provided by Google.
1446 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1447 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001448 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1449 },
1450 &quot;sourceSnapshotId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
1451 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
1452 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
1453 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
1454 &quot;A String&quot;,
1455 ],
1456}
1457
yoshi-code-botc3f86752021-06-12 00:20:02 -07001458 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.
1459
1460For 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.
1461
1462The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001463
1464Returns:
1465 An object of the form:
1466
yoshi-code-botc3f86752021-06-12 00:20:02 -07001467 { # Represents an Operation resource.
1468 #
1469 # Google Compute Engine has three Operation resources:
1470 #
1471 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1472 #
1473 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1474 #
1475 # Operations can be global, regional or zonal.
1476 # - For global operations, use the `globalOperations` resource.
1477 # - For regional operations, use the `regionOperations` resource.
1478 # - For zonal operations, use the `zonalOperations` resource.
1479 #
1480 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001481 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1482 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1483 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1484 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1485 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1486 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001487 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001488 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1489 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1490 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001491 },
1492 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001493 },
1494 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1495 &quot;httpErrorStatusCode&quot;: 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.
1496 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1497 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1498 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1499 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001500 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001501 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1502 &quot;progress&quot;: 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.
1503 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1504 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1505 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1506 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1507 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1508 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1509 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1510 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1511 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1512 {
1513 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001514 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1515 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001516 {
1517 &quot;key&quot;: &quot;A String&quot;, # [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).
1518 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1519 },
1520 ],
1521 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1522 },
1523 ],
1524 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1525}</pre>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001526</div>
1527
1528<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001529 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001530 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001531
1532Args:
1533 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001534 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001535 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001536 The object takes the form of:
1537
1538{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001539 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1540 { # Associates `members` with a `role`.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001541 &quot;bindingId&quot;: &quot;A String&quot;,
1542 &quot;condition&quot;: { # 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.
1543 #
1544 # If the condition evaluates to `true`, then this binding applies to the current request.
1545 #
1546 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1547 #
1548 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1549 #
1550 # Example (Comparison):
1551 #
1552 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1553 #
1554 # Example (Equality):
1555 #
1556 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1557 #
1558 # Example (Logic):
1559 #
1560 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1561 #
1562 # Example (Data Manipulation):
1563 #
1564 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1565 #
1566 # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001567 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1568 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1569 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1570 &quot;title&quot;: &quot;A String&quot;, # 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.
1571 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001572 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1573 #
1574 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1575 #
1576 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1577 #
1578 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1579 #
1580 #
1581 #
1582 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1583 #
1584 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1585 #
1586 # * `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.
1587 #
1588 # * `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.
1589 #
1590 # * `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.
1591 #
1592 #
1593 #
1594 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001595 &quot;A String&quot;,
1596 ],
1597 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001598 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001599 ],
1600 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001601 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. 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.
1602 #
1603 #
1604 #
1605 # 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.
1606 #
1607 # For some types of Google Cloud resources, a `binding` can also 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1608 #
1609 # **JSON example:**
1610 #
1611 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
1612 #
1613 # **YAML example:**
1614 #
1615 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
1616 #
1617 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001618 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001619 { # 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.
1620 #
1621 # 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.
1622 #
1623 # Example Policy with multiple AuditConfigs:
1624 #
1625 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
1626 #
1627 # 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 Kim65020912020-05-20 12:08:20 -07001628 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001629 { # Provides the configuration for logging a type of permissions. Example:
1630 #
1631 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
1632 #
1633 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1634 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Bu Sun Kim65020912020-05-20 12:08:20 -07001635 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001636 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001637 &quot;ignoreChildExemptions&quot;: True or False,
Bu Sun Kim65020912020-05-20 12:08:20 -07001638 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001639 },
1640 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001641 &quot;exemptedMembers&quot;: [
Bu Sun Kim65020912020-05-20 12:08:20 -07001642 &quot;A String&quot;,
1643 ],
1644 &quot;service&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001645 },
1646 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001647 &quot;bindings&quot;: [ # 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 -07001648 { # Associates `members` with a `role`.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001649 &quot;bindingId&quot;: &quot;A String&quot;,
1650 &quot;condition&quot;: { # 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.
1651 #
1652 # If the condition evaluates to `true`, then this binding applies to the current request.
1653 #
1654 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1655 #
1656 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1657 #
1658 # Example (Comparison):
1659 #
1660 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1661 #
1662 # Example (Equality):
1663 #
1664 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1665 #
1666 # Example (Logic):
1667 #
1668 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1669 #
1670 # Example (Data Manipulation):
1671 #
1672 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1673 #
1674 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001675 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1676 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1677 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1678 &quot;title&quot;: &quot;A String&quot;, # 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.
1679 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001680 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1681 #
1682 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1683 #
1684 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1685 #
1686 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1687 #
1688 #
1689 #
1690 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1691 #
1692 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1693 #
1694 # * `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.
1695 #
1696 # * `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.
1697 #
1698 # * `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.
1699 #
1700 #
1701 #
1702 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001703 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001704 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001705 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001706 },
1707 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001708 &quot;etag&quot;: &quot;A String&quot;, # `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.
1709 #
1710 # **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.
1711 &quot;iamOwned&quot;: True or False,
1712 &quot;rules&quot;: [ # 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.
1713 { # A rule to be applied in a Policy.
1714 &quot;action&quot;: &quot;A String&quot;, # Required
1715 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1716 { # A condition to be met.
1717 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1718 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1719 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1720 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1721 &quot;values&quot;: [ # The objects of the condition.
Bu Sun Kim65020912020-05-20 12:08:20 -07001722 &quot;A String&quot;,
1723 ],
1724 },
1725 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001726 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1727 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
Bu Sun Kim65020912020-05-20 12:08:20 -07001728 &quot;A String&quot;,
1729 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001730 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1731 { # Specifies what kind of log the caller must write
1732 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1733 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1734 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
Bu Sun Kim65020912020-05-20 12:08:20 -07001735 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001736 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim65020912020-05-20 12:08:20 -07001737 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001738 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1739 #
1740 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1741 #
1742 # Field names correspond to IAM request parameters and field values are their respective values.
1743 #
1744 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1745 #
1746 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1747 &quot;customFields&quot;: [ # Custom fields.
1748 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1749 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1750 &quot;value&quot;: &quot;A String&quot;, # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001751 },
1752 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001753 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1754 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
Bu Sun Kim65020912020-05-20 12:08:20 -07001755 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001756 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1757 &quot;logMode&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001758 },
1759 },
1760 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001761 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
Bu Sun Kim65020912020-05-20 12:08:20 -07001762 &quot;A String&quot;,
1763 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001764 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
Bu Sun Kim65020912020-05-20 12:08:20 -07001765 &quot;A String&quot;,
1766 ],
1767 },
1768 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001769 &quot;version&quot;: 42, # Specifies the format of the policy.
1770 #
1771 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1772 #
1773 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1774 #
1775 # * 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
1776 #
1777 # **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.
1778 #
1779 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1780 #
1781 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001782 },
1783}
1784
1785
1786Returns:
1787 An object of the form:
1788
yoshi-code-botc3f86752021-06-12 00:20:02 -07001789 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
1790 #
1791 #
1792 #
1793 # 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.
1794 #
1795 # For some types of Google Cloud resources, a `binding` can also 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. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1796 #
1797 # **JSON example:**
1798 #
1799 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
1800 #
1801 # **YAML example:**
1802 #
1803 # 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(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
1804 #
1805 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001806 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001807 { # 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.
1808 #
1809 # 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.
1810 #
1811 # Example Policy with multiple AuditConfigs:
1812 #
1813 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
1814 #
1815 # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001816 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001817 { # Provides the configuration for logging a type of permissions. Example:
1818 #
1819 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
1820 #
1821 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1822 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001823 &quot;A String&quot;,
1824 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001825 &quot;ignoreChildExemptions&quot;: True or False,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001826 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1827 },
1828 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001829 &quot;exemptedMembers&quot;: [
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001830 &quot;A String&quot;,
1831 ],
1832 &quot;service&quot;: &quot;A String&quot;, # 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.
1833 },
1834 ],
1835 &quot;bindings&quot;: [ # 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.
1836 { # Associates `members` with a `role`.
yoshi-code-botc3f86752021-06-12 00:20:02 -07001837 &quot;bindingId&quot;: &quot;A String&quot;,
1838 &quot;condition&quot;: { # 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.
1839 #
1840 # If the condition evaluates to `true`, then this binding applies to the current request.
1841 #
1842 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1843 #
1844 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1845 #
1846 # Example (Comparison):
1847 #
1848 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1849 #
1850 # Example (Equality):
1851 #
1852 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1853 #
1854 # Example (Logic):
1855 #
1856 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1857 #
1858 # Example (Data Manipulation):
1859 #
1860 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1861 #
1862 # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001863 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1864 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1865 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1866 &quot;title&quot;: &quot;A String&quot;, # 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.
1867 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001868 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1869 #
1870 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1871 #
1872 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1873 #
1874 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1875 #
1876 #
1877 #
1878 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1879 #
1880 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1881 #
1882 # * `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.
1883 #
1884 # * `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.
1885 #
1886 # * `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.
1887 #
1888 #
1889 #
1890 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001891 &quot;A String&quot;,
1892 ],
1893 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1894 },
1895 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001896 &quot;etag&quot;: &quot;A String&quot;, # `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.
1897 #
1898 # **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.
1899 &quot;iamOwned&quot;: True or False,
1900 &quot;rules&quot;: [ # 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.
1901 { # A rule to be applied in a Policy.
1902 &quot;action&quot;: &quot;A String&quot;, # Required
1903 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1904 { # A condition to be met.
1905 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1906 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1907 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1908 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1909 &quot;values&quot;: [ # The objects of the condition.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001910 &quot;A String&quot;,
1911 ],
1912 },
1913 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001914 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1915 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001916 &quot;A String&quot;,
1917 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001918 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1919 { # Specifies what kind of log the caller must write
1920 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1921 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1922 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001923 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001924 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001925 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001926 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1927 #
1928 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1929 #
1930 # Field names correspond to IAM request parameters and field values are their respective values.
1931 #
1932 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1933 #
1934 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1935 &quot;customFields&quot;: [ # Custom fields.
1936 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1937 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1938 &quot;value&quot;: &quot;A String&quot;, # 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.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001939 },
1940 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001941 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1942 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001943 },
yoshi-code-botc3f86752021-06-12 00:20:02 -07001944 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1945 &quot;logMode&quot;: &quot;A String&quot;,
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001946 },
1947 },
1948 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001949 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001950 &quot;A String&quot;,
1951 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001952 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001953 &quot;A String&quot;,
1954 ],
1955 },
1956 ],
yoshi-code-botc3f86752021-06-12 00:20:02 -07001957 &quot;version&quot;: 42, # Specifies the format of the policy.
1958 #
1959 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1960 #
1961 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1962 #
1963 # * 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
1964 #
1965 # **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.
1966 #
1967 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1968 #
1969 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001970}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001971</div>
1972
1973<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07001974 <code class="details" id="setLabels">setLabels(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001975 <pre>Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
1976
1977Args:
1978 project: string, Project ID for this request. (required)
1979 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001980 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001981 The object takes the form of:
1982
1983{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001984 &quot;labelFingerprint&quot;: &quot;A String&quot;, # 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.
1985 &quot;labels&quot;: { # A list of labels to apply for this resource. Each label key &amp; 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, &quot;webserver-frontend&quot;: &quot;images&quot;. A label value can also be empty (e.g. &quot;my-label&quot;: &quot;&quot;).
1986 &quot;a_key&quot;: &quot;A String&quot;,
1987 },
1988}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001989
1990
1991Returns:
1992 An object of the form:
1993
yoshi-code-botc3f86752021-06-12 00:20:02 -07001994 { # Represents an Operation resource.
1995 #
1996 # Google Compute Engine has three Operation resources:
1997 #
1998 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1999 #
2000 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2001 #
2002 # Operations can be global, regional or zonal.
2003 # - For global operations, use the `globalOperations` resource.
2004 # - For regional operations, use the `regionOperations` resource.
2005 # - For zonal operations, use the `zonalOperations` resource.
2006 #
2007 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002008 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2009 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2010 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2011 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2012 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2013 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002014 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002015 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2016 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2017 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002018 },
2019 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002020 },
2021 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2022 &quot;httpErrorStatusCode&quot;: 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.
2023 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2024 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2025 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2026 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08002027 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002028 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2029 &quot;progress&quot;: 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.
2030 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2031 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2032 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2033 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2034 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2035 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2036 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
2037 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2038 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2039 {
2040 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
yoshi-code-botc3f86752021-06-12 00:20:02 -07002041 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2042 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002043 {
2044 &quot;key&quot;: &quot;A String&quot;, # [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).
2045 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2046 },
2047 ],
2048 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2049 },
2050 ],
2051 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2052}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002053</div>
2054
2055<div class="method">
yoshi-code-botc3f86752021-06-12 00:20:02 -07002056 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002057 <pre>Returns permissions that a caller has on the specified resource.
2058
2059Args:
2060 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002061 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002062 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002063 The object takes the form of:
2064
2065{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002066 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
2067 &quot;A String&quot;,
2068 ],
2069}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002070
2071
2072Returns:
2073 An object of the form:
2074
2075 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002076 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2077 &quot;A String&quot;,
2078 ],
2079}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002080</div>
2081
2082</body></html>