blob: 27692a5e4a2d654fd75f54a1a0acfcb24d32b050 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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_v1.html">Compute Engine API</a> . <a href="compute_v1.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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#delete">delete(project, image, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Deletes the specified image.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#deprecate">deprecate(project, image, body=None, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000085<p class="firstline">Sets the deprecation status of an image.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
87 <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>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070089<p class="toc_element">
90 <code><a href="#getFromFamily">getFromFamily(project, family)</a></code></p>
91<p class="firstline">Returns the latest image that is part of an image family and is not deprecated.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -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">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#insert">insert(project, body=None, forceCreate=None, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Creates an image in the specified project using the data included in the request.</p>
John Asmuth614db982014-04-24 15:46:26 -040098<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -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>
John Asmuth614db982014-04-24 15:46:26 -0400101<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>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400104<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105 <code><a href="#patch">patch(project, image, body=None, requestId=None)</a></code></p>
106<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">
Dan O'Mearadd494642020-05-01 07:42:23 -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">
Dan O'Mearadd494642020-05-01 07:42:23 -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>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
John Asmuth614db982014-04-24 15:46:26 -0400116<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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 <code class="details" id="delete">delete(project, image, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800124 <pre>Deletes the specified image.
John Asmuth614db982014-04-24 15:46:26 -0400125
126Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000127 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400128 image: string, Name of the image resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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).
John Asmuth614db982014-04-24 15:46:26 -0400134
135Returns:
136 An object of the form:
137
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800139 #
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 ==)
152 &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.
185 &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; }
187 {
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>
John Asmuth614db982014-04-24 15:46:26 -0400197</div>
198
199<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700200 <code class="details" id="deprecate">deprecate(project, image, body=None, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000201 <pre>Sets the deprecation status of an image.
202
203If an empty request body is given, clears the deprecation status instead.
John Asmuth614db982014-04-24 15:46:26 -0400204
205Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000206 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400207 image: string, Image name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400209 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.
John Asmuth614db982014-04-24 15:46:26 -0400217}
218
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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).
John Asmuth614db982014-04-24 15:46:26 -0400224
225Returns:
226 An object of the form:
227
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800229 #
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 ==)
242 &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.
275 &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; }
277 {
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>
John Asmuth614db982014-04-24 15:46:26 -0400287</div>
288
289<div class="method">
290 <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.
John Asmuth614db982014-04-24 15:46:26 -0400292
293Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000294 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400295 image: string, Name of the image resource to return. (required)
296
297Returns:
298 An object of the form:
299
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 { # Represents an Image resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800301 #
302 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
303 &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.
315 &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.
316 { # Guest OS features.
317 &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.
318 },
319 ],
320 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
321 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800323 # 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.
328 &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.
331 &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.
332 },
333 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
334 &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.
335 #
336 # To see the latest fingerprint, make a get() request to retrieve an image.
337 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
338 &quot;a_key&quot;: &quot;A String&quot;,
339 },
340 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
341 &quot;A String&quot;,
342 ],
343 &quot;licenses&quot;: [ # Any applicable license URI.
344 &quot;A String&quot;,
345 ],
346 &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.
347 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
348 &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.
349 &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-botc2cd3262021-05-16 02:16:04 -0700350 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
351 #
352 # In order to create an image, you must provide the full or partial URL of one of the following:
353 # - The rawDisk.source URL
354 # - The sourceDisk URL
355 # - The sourceImage URL
356 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800357 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800358 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800359 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
360 &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.
361 &quot;dbs&quot;: [ # The Key Database (db).
362 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700363 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
364 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800367 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
368 {
369 &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.
371 },
372 ],
373 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
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;pk&quot;: { # The Platform Key (PK).
380 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
381 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
382 },
383 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700384 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800385 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
386 # - projects/project/zones/zone/disks/disk
387 # - zones/zone/disks/disk
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700388 #
389 # In order to create an image, you must provide the full or partial URL of one of the following:
390 # - The rawDisk.source URL
391 # - The sourceDisk URL
392 # - The sourceImage URL
393 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800394 &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.
395 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
396 &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.
397 &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.
398 &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.
399 },
400 &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.
401 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
402 #
403 # In order to create an image, you must provide the full or partial URL of one of the following:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800404 # - The rawDisk.source URL
405 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700406 # - The sourceImage URL
407 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800408 &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.
409 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
410 &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.
411 &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.
412 &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.
413 },
414 &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.
415 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
416 #
417 # In order to create an image, you must provide the full or partial URL of one of the following:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800418 # - The rawDisk.source URL
419 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700420 # - The sourceImage URL
421 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800422 &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.
423 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
424 &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.
425 &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.
426 &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.
427 },
428 &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.
429 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
430 &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.
431 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
432 &quot;A String&quot;,
433 ],
434}</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700435</div>
436
437<div class="method">
438 <code class="details" id="getFromFamily">getFromFamily(project, family)</code>
439 <pre>Returns the latest image that is part of an image family and is not deprecated.
440
441Args:
442 project: string, Project ID for this request. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700443 family: string, Name of the image family to search for. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700444
445Returns:
446 An object of the form:
447
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 { # Represents an Image resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800449 #
450 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
451 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
452 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
453 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
454 &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.
455 &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.
456 &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.
457 &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.
458 &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.
459 },
460 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
461 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
462 &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.
463 &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.
464 { # Guest OS features.
465 &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.
466 },
467 ],
468 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
469 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700470 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800471 # 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).
472 #
473 # Customer-supplied encryption keys do not protect access to metadata of the disk.
474 #
475 # 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.
476 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
477 &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.
478 &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.
479 &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.
480 },
481 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
482 &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.
483 #
484 # To see the latest fingerprint, make a get() request to retrieve an image.
485 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
486 &quot;a_key&quot;: &quot;A String&quot;,
487 },
488 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
489 &quot;A String&quot;,
490 ],
491 &quot;licenses&quot;: [ # Any applicable license URI.
492 &quot;A String&quot;,
493 ],
494 &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.
495 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
496 &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.
497 &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-botc2cd3262021-05-16 02:16:04 -0700498 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
499 #
500 # In order to create an image, you must provide the full or partial URL of one of the following:
501 # - The rawDisk.source URL
502 # - The sourceDisk URL
503 # - The sourceImage URL
504 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800505 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800506 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800507 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
508 &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.
509 &quot;dbs&quot;: [ # The Key Database (db).
510 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
512 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700513 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700514 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800515 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
516 {
517 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
518 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
519 },
520 ],
521 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
522 {
523 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
524 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
525 },
526 ],
527 &quot;pk&quot;: { # The Platform Key (PK).
528 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
529 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
530 },
531 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700532 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800533 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
534 # - projects/project/zones/zone/disks/disk
535 # - zones/zone/disks/disk
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700536 #
537 # In order to create an image, you must provide the full or partial URL of one of the following:
538 # - The rawDisk.source URL
539 # - The sourceDisk URL
540 # - The sourceImage URL
541 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800542 &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.
543 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
544 &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.
545 &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.
546 &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.
547 },
548 &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.
549 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
550 #
551 # In order to create an image, you must provide the full or partial URL of one of the following:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800552 # - The rawDisk.source URL
553 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700554 # - The sourceImage URL
555 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800556 &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.
557 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
558 &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.
559 &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.
560 &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.
561 },
562 &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.
563 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
564 #
565 # In order to create an image, you must provide the full or partial URL of one of the following:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800566 # - The rawDisk.source URL
567 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700568 # - The sourceImage URL
569 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800570 &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.
571 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
572 &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.
573 &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.
574 &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.
575 },
576 &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.
577 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
578 &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.
579 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
580 &quot;A String&quot;,
581 ],
582}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400583</div>
584
585<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700586 <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
588
589Args:
590 project: string, Project ID for this request. (required)
591 resource: string, Name or id of the resource for this request. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700592 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593
594Returns:
595 An object of the form:
596
Dan O'Mearadd494642020-05-01 07:42:23 -0700597 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800598 #
599 #
600 #
601 # 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.
602 #
603 # 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).
604 #
605 # **JSON example:**
606 #
607 # { &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 }
608 #
609 # **YAML example:**
610 #
611 # 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
612 #
613 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
614 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
615 { # 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.
616 #
617 # 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.
618 #
619 # Example Policy with multiple AuditConfigs:
620 #
621 # { &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; ] } ] } ] }
622 #
623 # 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.
624 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
625 { # Provides the configuration for logging a type of permissions. Example:
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800627 # { &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; } ] }
Bu Sun Kim65020912020-05-20 12:08:20 -0700628 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800629 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
630 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
631 &quot;A String&quot;,
632 ],
633 &quot;ignoreChildExemptions&quot;: True or False,
634 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700635 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800636 ],
637 &quot;exemptedMembers&quot;: [
638 &quot;A String&quot;,
639 ],
640 &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.
641 },
642 ],
643 &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.
644 { # Associates `members` with a `role`.
645 &quot;bindingId&quot;: &quot;A String&quot;,
646 &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.
647 #
648 # If the condition evaluates to `true`, then this binding applies to the current request.
649 #
650 # 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.
651 #
652 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
653 #
654 # Example (Comparison):
655 #
656 # 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;
657 #
658 # Example (Equality):
659 #
660 # 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;
661 #
662 # Example (Logic):
663 #
664 # 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;
665 #
666 # Example (Data Manipulation):
667 #
668 # 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;
669 #
670 # 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.
671 &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.
672 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
673 &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.
674 &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 -0700675 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800676 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
677 #
678 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
679 #
680 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
681 #
682 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
683 #
684 #
685 #
686 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
687 #
688 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
689 #
690 # * `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.
691 #
692 # * `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.
693 #
694 # * `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.
695 #
696 #
697 #
698 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
699 &quot;A String&quot;,
700 ],
701 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
702 },
703 ],
704 &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.
705 #
706 # **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.
707 &quot;iamOwned&quot;: True or False,
708 &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.
709 { # A rule to be applied in a Policy.
710 &quot;action&quot;: &quot;A String&quot;, # Required
711 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
712 { # A condition to be met.
713 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
714 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
715 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
716 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
717 &quot;values&quot;: [ # The objects of the condition.
718 &quot;A String&quot;,
719 ],
720 },
721 ],
722 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
723 &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.
724 &quot;A String&quot;,
725 ],
726 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
727 { # Specifies what kind of log the caller must write
728 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
729 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
730 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
731 },
732 &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 -0700733 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800734 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
735 #
736 # 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.
737 #
738 # Field names correspond to IAM request parameters and field values are their respective values.
739 #
740 # 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.
741 #
742 # 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]}
743 &quot;customFields&quot;: [ # Custom fields.
744 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
745 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
746 &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 -0700747 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800748 ],
749 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
750 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
Bu Sun Kim65020912020-05-20 12:08:20 -0700751 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800752 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
753 &quot;logMode&quot;: &quot;A String&quot;,
754 },
755 },
756 ],
757 &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.
758 &quot;A String&quot;,
759 ],
760 &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.
761 &quot;A String&quot;,
762 ],
763 },
764 ],
765 &quot;version&quot;: 42, # Specifies the format of the policy.
766 #
767 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
768 #
769 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
770 #
771 # * 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
772 #
773 # **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.
774 #
775 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
776 #
777 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
778}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779</div>
780
781<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700782 <code class="details" id="insert">insert(project, body=None, forceCreate=None, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800783 <pre>Creates an image in the specified project using the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400784
785Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000786 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700787 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400788 The object takes the form of:
789
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700790{ # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700791 #
792 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
793 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
794 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
795 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
796 &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.
797 &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.
798 &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.
799 &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.
800 &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.
801 },
802 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
803 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
804 &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.
805 &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.
806 { # Guest OS features.
807 &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.
808 },
809 ],
810 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700811 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700812 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700813 # 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).
814 #
815 # Customer-supplied encryption keys do not protect access to metadata of the disk.
816 #
817 # 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.
818 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
819 &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.
820 &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.
821 &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.
822 },
823 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
824 &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.
825 #
826 # To see the latest fingerprint, make a get() request to retrieve an image.
827 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
828 &quot;a_key&quot;: &quot;A String&quot;,
829 },
830 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
831 &quot;A String&quot;,
832 ],
833 &quot;licenses&quot;: [ # Any applicable license URI.
834 &quot;A String&quot;,
835 ],
836 &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.
837 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
838 &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.
839 &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-botc2cd3262021-05-16 02:16:04 -0700840 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
841 #
842 # In order to create an image, you must provide the full or partial URL of one of the following:
843 # - The rawDisk.source URL
844 # - The sourceDisk URL
845 # - The sourceImage URL
846 # - The sourceSnapshot URL
Bu Sun Kim65020912020-05-20 12:08:20 -0700847 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800848 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Bu Sun Kim65020912020-05-20 12:08:20 -0700849 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
850 &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.
851 &quot;dbs&quot;: [ # The Key Database (db).
852 {
853 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
854 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800855 },
856 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
858 {
859 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
860 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700862 ],
863 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
864 {
865 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
866 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
867 },
868 ],
869 &quot;pk&quot;: { # The Platform Key (PK).
870 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
871 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700872 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700873 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700874 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
876 # - projects/project/zones/zone/disks/disk
877 # - zones/zone/disks/disk
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700878 #
879 # In order to create an image, you must provide the full or partial URL of one of the following:
880 # - The rawDisk.source URL
881 # - The sourceDisk URL
882 # - The sourceImage URL
883 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700884 &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 -0700885 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
886 &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.
887 &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.
888 &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.
889 },
890 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700891 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
892 #
893 # In order to create an image, you must provide the full or partial URL of one of the following:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700894 # - The rawDisk.source URL
895 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700896 # - The sourceImage URL
897 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700898 &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 -0700899 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
900 &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.
901 &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.
902 &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.
903 },
904 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700905 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
906 #
907 # In order to create an image, you must provide the full or partial URL of one of the following:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700908 # - The rawDisk.source URL
909 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -0700910 # - The sourceImage URL
911 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700912 &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 -0700913 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
914 &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.
915 &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.
916 &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.
917 },
918 &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.
919 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
920 &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.
921 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
922 &quot;A String&quot;,
923 ],
924}
John Asmuth614db982014-04-24 15:46:26 -0400925
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 forceCreate: boolean, Force image creation if true.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700927 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.
928
929For 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.
930
931The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400932
933Returns:
934 An object of the form:
935
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700936 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800937 #
938 # Google Compute Engine has three Operation resources:
939 #
940 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
941 #
942 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
943 #
944 # Operations can be global, regional or zonal.
945 # - For global operations, use the `globalOperations` resource.
946 # - For regional operations, use the `regionOperations` resource.
947 # - For zonal operations, use the `zonalOperations` resource.
948 #
949 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
950 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
951 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
952 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
953 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
954 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
955 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800957 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
958 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
959 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700960 },
961 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800962 },
963 &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`.
964 &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.
965 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
966 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
967 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
968 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800969 &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 -0800970 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
971 &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.
972 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
973 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
974 &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.
975 &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`.
976 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
977 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
978 &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.
979 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
980 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
981 {
982 &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.
983 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
984 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
985 {
986 &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).
987 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
988 },
989 ],
990 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
991 },
992 ],
993 &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.
994}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400995</div>
996
997<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700998 <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 -0700999 <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.
John Asmuth614db982014-04-24 15:46:26 -04001000
1001Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001002 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 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;`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001004
Dan O'Mearadd494642020-05-01 07:42:23 -07001005For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001006
Dan O'Mearadd494642020-05-01 07:42:23 -07001007You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001008
Bu Sun Kim65020912020-05-20 12:08:20 -07001009To 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) ```
1010 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`)
1011 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1012
1013You 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.
1014
1015Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1016 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 -08001017 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
John Asmuth614db982014-04-24 15:46:26 -04001018
1019Returns:
1020 An object of the form:
1021
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001022 { # Contains a list of images.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001023 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1024 &quot;items&quot;: [ # A list of Image resources.
1025 { # Represents an Image resource.
1026 #
1027 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
1028 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
1029 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1030 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
1031 &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.
1032 &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.
1033 &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.
1034 &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.
1035 &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.
1036 },
1037 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1038 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
1039 &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.
1040 &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.
1041 { # Guest OS features.
1042 &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.
1043 },
1044 ],
1045 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1046 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001047 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001048 # 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).
1049 #
1050 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1051 #
1052 # 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.
1053 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1054 &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.
1055 &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.
1056 &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.
1057 },
1058 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
1059 &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.
1060 #
1061 # To see the latest fingerprint, make a get() request to retrieve an image.
1062 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
1063 &quot;a_key&quot;: &quot;A String&quot;,
1064 },
1065 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
1066 &quot;A String&quot;,
1067 ],
1068 &quot;licenses&quot;: [ # Any applicable license URI.
1069 &quot;A String&quot;,
1070 ],
1071 &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.
1072 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
1073 &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.
1074 &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-botc2cd3262021-05-16 02:16:04 -07001075 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
1076 #
1077 # In order to create an image, you must provide the full or partial URL of one of the following:
1078 # - The rawDisk.source URL
1079 # - The sourceDisk URL
1080 # - The sourceImage URL
1081 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001082 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001083 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001084 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1085 &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.
1086 &quot;dbs&quot;: [ # The Key Database (db).
1087 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001088 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1089 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1090 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001092 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1093 {
1094 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1095 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1096 },
1097 ],
1098 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1099 {
1100 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1101 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1102 },
1103 ],
1104 &quot;pk&quot;: { # The Platform Key (PK).
1105 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1106 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1107 },
1108 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001109 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001110 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1111 # - projects/project/zones/zone/disks/disk
1112 # - zones/zone/disks/disk
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001113 #
1114 # In order to create an image, you must provide the full or partial URL of one of the following:
1115 # - The rawDisk.source URL
1116 # - The sourceDisk URL
1117 # - The sourceImage URL
1118 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001119 &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.
1120 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1121 &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.
1122 &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.
1123 &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.
1124 },
1125 &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.
1126 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
1127 #
1128 # In order to create an image, you must provide the full or partial URL of one of the following:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001129 # - The rawDisk.source URL
1130 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001131 # - The sourceImage URL
1132 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001133 &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.
1134 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1135 &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.
1136 &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.
1137 &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.
1138 },
1139 &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.
1140 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
1141 #
1142 # In order to create an image, you must provide the full or partial URL of one of the following:
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001143 # - The rawDisk.source URL
1144 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001145 # - The sourceImage URL
1146 # - The sourceSnapshot URL
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001147 &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.
1148 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1149 &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.
1150 &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.
1151 &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.
1152 },
1153 &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.
1154 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
1155 &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.
1156 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
1157 &quot;A String&quot;,
1158 ],
1159 },
1160 ],
1161 &quot;kind&quot;: &quot;compute#imageList&quot;, # Type of resource.
1162 &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.
1163 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1164 &quot;warning&quot;: { # [Output Only] Informational warning message.
1165 &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.
1166 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1167 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1168 {
1169 &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).
1170 &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 -07001171 },
John Asmuth614db982014-04-24 15:46:26 -04001172 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001173 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1174 },
1175}</pre>
John Asmuth614db982014-04-24 15:46:26 -04001176</div>
1177
1178<div class="method">
1179 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1180 <pre>Retrieves the next page of results.
1181
1182Args:
1183 previous_request: The request for the previous page. (required)
1184 previous_response: The response from the request for the previous page. (required)
1185
1186Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001187 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04001188 page. Returns None if there are no more items in the collection.
1189 </pre>
1190</div>
1191
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001192<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001193 <code class="details" id="patch">patch(project, image, body=None, requestId=None)</code>
1194 <pre>Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.
1195
1196Args:
1197 project: string, Project ID for this request. (required)
1198 image: string, Name of the image resource to patch. (required)
1199 body: object, The request body.
1200 The object takes the form of:
1201
1202{ # Represents an Image resource.
1203 #
1204 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
1205 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
1206 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1207 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
1208 &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.
1209 &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.
1210 &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.
1211 &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.
1212 &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.
1213 },
1214 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1215 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
1216 &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.
1217 &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.
1218 { # Guest OS features.
1219 &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.
1220 },
1221 ],
1222 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1223 &quot;imageEncryptionKey&quot;: { # Encrypts the image using a customer-supplied encryption key.
1224 #
1225 # 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).
1226 #
1227 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1228 #
1229 # 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.
1230 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1231 &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.
1232 &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.
1233 &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.
1234 },
1235 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
1236 &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.
1237 #
1238 # To see the latest fingerprint, make a get() request to retrieve an image.
1239 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
1240 &quot;a_key&quot;: &quot;A String&quot;,
1241 },
1242 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
1243 &quot;A String&quot;,
1244 ],
1245 &quot;licenses&quot;: [ # Any applicable license URI.
1246 &quot;A String&quot;,
1247 ],
1248 &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.
1249 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
1250 &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.
1251 &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-botc2cd3262021-05-16 02:16:04 -07001252 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored.
1253 #
1254 # In order to create an image, you must provide the full or partial URL of one of the following:
1255 # - The rawDisk.source URL
1256 # - The sourceDisk URL
1257 # - The sourceImage URL
1258 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001259 },
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001260 &quot;satisfiesPzs&quot;: True or False, # [Output Only] Reserved for future use.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001261 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1262 &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.
1263 &quot;dbs&quot;: [ # The Key Database (db).
1264 {
1265 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1266 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1267 },
1268 ],
1269 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1270 {
1271 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1272 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1273 },
1274 ],
1275 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1276 {
1277 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1278 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1279 },
1280 ],
1281 &quot;pk&quot;: { # The Platform Key (PK).
1282 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1283 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1284 },
1285 },
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001286 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. For example, the following are valid values:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001287 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1288 # - projects/project/zones/zone/disks/disk
1289 # - zones/zone/disks/disk
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001290 #
1291 # In order to create an image, you must provide the full or partial URL of one of the following:
1292 # - The rawDisk.source URL
1293 # - The sourceDisk URL
1294 # - The sourceImage URL
1295 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001296 &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.
1297 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1298 &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.
1299 &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.
1300 &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.
1301 },
1302 &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.
1303 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
1304 #
1305 # In order to create an image, you must provide the full or partial URL of one of the following:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001306 # - The rawDisk.source URL
1307 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001308 # - The sourceImage URL
1309 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001310 &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.
1311 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1312 &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.
1313 &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.
1314 &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.
1315 },
1316 &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.
1317 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
1318 #
1319 # In order to create an image, you must provide the full or partial URL of one of the following:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001320 # - The rawDisk.source URL
1321 # - The sourceDisk URL
yoshi-code-botc2cd3262021-05-16 02:16:04 -07001322 # - The sourceImage URL
1323 # - The sourceSnapshot URL
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001324 &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.
1325 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1326 &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.
1327 &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.
1328 &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.
1329 },
1330 &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.
1331 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
1332 &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.
1333 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
1334 &quot;A String&quot;,
1335 ],
1336}
1337
1338 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.
1339
1340For 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.
1341
1342The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1343
1344Returns:
1345 An object of the form:
1346
1347 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001348 #
1349 # Google Compute Engine has three Operation resources:
1350 #
1351 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1352 #
1353 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1354 #
1355 # Operations can be global, regional or zonal.
1356 # - For global operations, use the `globalOperations` resource.
1357 # - For regional operations, use the `regionOperations` resource.
1358 # - For zonal operations, use the `zonalOperations` resource.
1359 #
1360 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1361 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1362 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1363 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1364 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1365 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1366 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001367 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001368 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1369 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1370 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001371 },
1372 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001373 },
1374 &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`.
1375 &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.
1376 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1377 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1378 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1379 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001380 &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 -08001381 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1382 &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.
1383 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1384 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1385 &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.
1386 &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`.
1387 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1388 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1389 &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.
1390 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1391 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1392 {
1393 &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.
1394 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1395 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1396 {
1397 &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).
1398 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1399 },
1400 ],
1401 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1402 },
1403 ],
1404 &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.
1405}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001406</div>
1407
1408<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001409 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001410 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001411
1412Args:
1413 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001414 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001415 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001416 The object takes the form of:
1417
1418{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001419 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1420 { # Associates `members` with a `role`.
1421 &quot;bindingId&quot;: &quot;A String&quot;,
1422 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001423 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001424 # If the condition evaluates to `true`, then this binding applies to the current request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001425 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001426 # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001427 #
1428 # 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 -08001429 #
1430 # Example (Comparison):
1431 #
1432 # 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;
1433 #
1434 # Example (Equality):
1435 #
1436 # 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;
1437 #
1438 # Example (Logic):
1439 #
1440 # 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;
1441 #
1442 # Example (Data Manipulation):
1443 #
1444 # 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;
1445 #
1446 # 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.
1447 &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.
1448 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1449 &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.
1450 &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.
1451 },
1452 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1453 #
1454 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1455 #
1456 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1457 #
1458 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1459 #
1460 #
1461 #
1462 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1463 #
1464 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1465 #
1466 # * `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.
1467 #
1468 # * `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.
1469 #
1470 # * `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.
1471 #
1472 #
1473 #
1474 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1475 &quot;A String&quot;,
1476 ],
1477 &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 -07001478 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001479 ],
1480 &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.
1481 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001482 #
1483 #
1484 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001485 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001487 # 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001488 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001489 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001490 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001491 # { &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 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001493 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001494 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001495 # 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001496 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001497 # 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 -07001498 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001499 { # 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.
1500 #
1501 # 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.
1502 #
1503 # Example Policy with multiple AuditConfigs:
1504 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001505 # { &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; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001506 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001507 # 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 -07001508 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001509 { # Provides the configuration for logging a type of permissions. Example:
1510 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001511 # { &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; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001512 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001513 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1514 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1515 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001516 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001517 &quot;ignoreChildExemptions&quot;: True or False,
1518 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 },
1520 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001521 &quot;exemptedMembers&quot;: [
1522 &quot;A String&quot;,
1523 ],
1524 &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 -07001525 },
1526 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001527 &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 -07001528 { # Associates `members` with a `role`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001529 &quot;bindingId&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001530 &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.
1531 #
1532 # If the condition evaluates to `true`, then this binding applies to the current request.
1533 #
1534 # 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.
1535 #
1536 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1537 #
1538 # Example (Comparison):
1539 #
1540 # 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;
1541 #
1542 # Example (Equality):
1543 #
1544 # 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;
1545 #
1546 # Example (Logic):
1547 #
1548 # 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;
1549 #
1550 # Example (Data Manipulation):
1551 #
1552 # 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;
1553 #
1554 # 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.
1555 &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.
1556 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1557 &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.
1558 &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.
1559 },
1560 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001561 #
1562 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1563 #
1564 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1565 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001566 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001567 #
1568 #
1569 #
1570 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1571 #
1572 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1573 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001574 # * `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.
1575 #
1576 # * `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.
1577 #
1578 # * `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.
1579 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001580 #
1581 #
1582 # * `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 -07001583 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001584 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001585 &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 -07001586 },
1587 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001588 &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.
1589 #
1590 # **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.
1591 &quot;iamOwned&quot;: True or False,
1592 &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.
1593 { # A rule to be applied in a Policy.
1594 &quot;action&quot;: &quot;A String&quot;, # Required
1595 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1596 { # A condition to be met.
1597 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1598 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1599 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1600 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1601 &quot;values&quot;: [ # The objects of the condition.
1602 &quot;A String&quot;,
1603 ],
1604 },
1605 ],
1606 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1607 &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.
1608 &quot;A String&quot;,
1609 ],
1610 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1611 { # Specifies what kind of log the caller must write
1612 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1613 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1614 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1615 },
1616 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1617 },
1618 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1619 #
1620 # 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.
1621 #
1622 # Field names correspond to IAM request parameters and field values are their respective values.
1623 #
1624 # 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.
1625 #
1626 # 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]}
1627 &quot;customFields&quot;: [ # Custom fields.
1628 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1629 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1630 &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.
1631 },
1632 ],
1633 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1634 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1635 },
1636 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1637 &quot;logMode&quot;: &quot;A String&quot;,
1638 },
1639 },
1640 ],
1641 &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.
1642 &quot;A String&quot;,
1643 ],
1644 &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.
1645 &quot;A String&quot;,
1646 ],
1647 },
1648 ],
1649 &quot;version&quot;: 42, # Specifies the format of the policy.
1650 #
1651 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1652 #
1653 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1654 #
1655 # * 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
1656 #
1657 # **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.
1658 #
1659 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1660 #
1661 # 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 -08001662 },
1663}
1664
1665
1666Returns:
1667 An object of the form:
1668
1669 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
1670 #
1671 #
1672 #
1673 # 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.
1674 #
1675 # 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).
1676 #
1677 # **JSON example:**
1678 #
1679 # { &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 }
1680 #
1681 # **YAML example:**
1682 #
1683 # 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
1684 #
1685 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1686 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1687 { # 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.
1688 #
1689 # 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.
1690 #
1691 # Example Policy with multiple AuditConfigs:
1692 #
1693 # { &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; ] } ] } ] }
1694 #
1695 # 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.
1696 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1697 { # Provides the configuration for logging a type of permissions. Example:
1698 #
1699 # { &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; } ] }
1700 #
1701 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1702 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1703 &quot;A String&quot;,
1704 ],
1705 &quot;ignoreChildExemptions&quot;: True or False,
1706 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1707 },
1708 ],
1709 &quot;exemptedMembers&quot;: [
1710 &quot;A String&quot;,
1711 ],
1712 &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.
1713 },
1714 ],
1715 &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.
1716 { # Associates `members` with a `role`.
1717 &quot;bindingId&quot;: &quot;A String&quot;,
1718 &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.
1719 #
1720 # If the condition evaluates to `true`, then this binding applies to the current request.
1721 #
1722 # 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.
1723 #
1724 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1725 #
1726 # Example (Comparison):
1727 #
1728 # 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;
1729 #
1730 # Example (Equality):
1731 #
1732 # 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;
1733 #
1734 # Example (Logic):
1735 #
1736 # 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;
1737 #
1738 # Example (Data Manipulation):
1739 #
1740 # 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;
1741 #
1742 # 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.
1743 &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.
1744 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1745 &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.
1746 &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.
1747 },
1748 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1749 #
1750 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1751 #
1752 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1753 #
1754 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1755 #
1756 #
1757 #
1758 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1759 #
1760 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1761 #
1762 # * `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.
1763 #
1764 # * `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.
1765 #
1766 # * `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.
1767 #
1768 #
1769 #
1770 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1771 &quot;A String&quot;,
1772 ],
1773 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1774 },
1775 ],
1776 &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.
1777 #
1778 # **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.
1779 &quot;iamOwned&quot;: True or False,
1780 &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.
1781 { # A rule to be applied in a Policy.
1782 &quot;action&quot;: &quot;A String&quot;, # Required
1783 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1784 { # A condition to be met.
1785 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1786 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1787 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1788 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1789 &quot;values&quot;: [ # The objects of the condition.
1790 &quot;A String&quot;,
1791 ],
1792 },
1793 ],
1794 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1795 &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.
1796 &quot;A String&quot;,
1797 ],
1798 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1799 { # Specifies what kind of log the caller must write
1800 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1801 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1802 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1803 },
1804 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1805 },
1806 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1807 #
1808 # 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.
1809 #
1810 # Field names correspond to IAM request parameters and field values are their respective values.
1811 #
1812 # 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.
1813 #
1814 # 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]}
1815 &quot;customFields&quot;: [ # Custom fields.
1816 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1817 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1818 &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.
1819 },
1820 ],
1821 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1822 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1823 },
1824 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1825 &quot;logMode&quot;: &quot;A String&quot;,
1826 },
1827 },
1828 ],
1829 &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.
1830 &quot;A String&quot;,
1831 ],
1832 &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.
1833 &quot;A String&quot;,
1834 ],
1835 },
1836 ],
1837 &quot;version&quot;: 42, # Specifies the format of the policy.
1838 #
1839 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1840 #
1841 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1842 #
1843 # * 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
1844 #
1845 # **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.
1846 #
1847 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1848 #
1849 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1850}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001851</div>
1852
1853<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001854 <code class="details" id="setLabels">setLabels(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001855 <pre>Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
1856
1857Args:
1858 project: string, Project ID for this request. (required)
1859 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001860 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001861 The object takes the form of:
1862
1863{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001864 &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.
1865 &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;).
1866 &quot;a_key&quot;: &quot;A String&quot;,
1867 },
1868}
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001869
1870
1871Returns:
1872 An object of the form:
1873
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001874 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001875 #
1876 # Google Compute Engine has three Operation resources:
1877 #
1878 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1879 #
1880 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1881 #
1882 # Operations can be global, regional or zonal.
1883 # - For global operations, use the `globalOperations` resource.
1884 # - For regional operations, use the `regionOperations` resource.
1885 # - For zonal operations, use the `zonalOperations` resource.
1886 #
1887 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1888 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1889 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1890 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1891 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1892 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1893 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001894 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001895 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1896 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1897 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001898 },
1899 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001900 },
1901 &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`.
1902 &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.
1903 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1904 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1905 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1906 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001907 &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 -08001908 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1909 &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.
1910 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1911 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1912 &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.
1913 &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`.
1914 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1915 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1916 &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.
1917 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1918 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1919 {
1920 &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.
1921 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1922 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1923 {
1924 &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).
1925 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1926 },
1927 ],
1928 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1929 },
1930 ],
1931 &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.
1932}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001933</div>
1934
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001935<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001936 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001937 <pre>Returns permissions that a caller has on the specified resource.
1938
1939Args:
1940 project: string, Project ID for this request. (required)
1941 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001942 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001943 The object takes the form of:
1944
1945{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001946 &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.
1947 &quot;A String&quot;,
1948 ],
1949}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001950
1951
1952Returns:
1953 An object of the form:
1954
1955 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001956 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1957 &quot;A String&quot;,
1958 ],
1959}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001960</div>
1961
John Asmuth614db982014-04-24 15:46:26 -04001962</body></html>