blob: 3a794c0afc9adee762d3173bf3d3939f80870e20 [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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#delete">delete(project, image, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Deletes the specified image.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#deprecate">deprecate(project, image, body=None, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000082<p class="firstline">Sets the deprecation status of an image.</p>
John Asmuth614db982014-04-24 15:46:26 -040083<p class="toc_element">
84 <code><a href="#get">get(project, image)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<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 -070086<p class="toc_element">
87 <code><a href="#getFromFamily">getFromFamily(project, family)</a></code></p>
88<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 -040089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, resource)</a></code></p>
91<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#insert">insert(project, body=None, forceCreate=None, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<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 -040095<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<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 -040098<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#setLabels">setLabels(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
John Asmuth614db982014-04-24 15:46:26 -0400110<h3>Method Details</h3>
111<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 <code class="details" id="delete">delete(project, image, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800113 <pre>Deletes the specified image.
John Asmuth614db982014-04-24 15:46:26 -0400114
115Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000116 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400117 image: string, Name of the image resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 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.
119
120For 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.
121
122The 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 -0400123
124Returns:
125 An object of the form:
126
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700127 { # Represents an Operation resource.
128 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 # Google Compute Engine has three Operation resources:
130 #
131 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
132 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
134 #
135 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 # - For global operations, use the `globalOperations` resource.
137 # - For regional operations, use the `regionOperations` resource.
138 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700140 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
142 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
143 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
144 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
145 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
146 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400147 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
149 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
150 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400151 },
152 ],
153 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &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`.
155 &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.
156 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
157 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
158 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
159 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
160 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
161 &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.
162 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
163 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
164 &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.
165 &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`.
166 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
167 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
168 &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.
169 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
170 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
171 {
172 &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.
173 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
174 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
175 {
176 &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).
177 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
178 },
179 ],
180 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
181 },
182 ],
183 &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.
John Asmuth614db982014-04-24 15:46:26 -0400184 }</pre>
185</div>
186
187<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 <code class="details" id="deprecate">deprecate(project, image, body=None, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000189 <pre>Sets the deprecation status of an image.
190
191If an empty request body is given, clears the deprecation status instead.
John Asmuth614db982014-04-24 15:46:26 -0400192
193Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000194 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400195 image: string, Image name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700196 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400197 The object takes the form of:
198
199{ # Deprecation status for a public resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &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.
201 &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.
202 &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.
203 &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.
204 &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 -0400205}
206
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 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.
208
209For 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.
210
211The 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 -0400212
213Returns:
214 An object of the form:
215
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 { # Represents an Operation resource.
217 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700218 # Google Compute Engine has three Operation resources:
219 #
220 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
221 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
223 #
224 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 # - For global operations, use the `globalOperations` resource.
226 # - For regional operations, use the `regionOperations` resource.
227 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700229 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
231 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
232 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
233 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
234 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
235 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400236 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
238 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
239 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400240 },
241 ],
242 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700243 &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`.
244 &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.
245 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
246 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
247 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
248 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
249 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
250 &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.
251 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
252 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
253 &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.
254 &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`.
255 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
256 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
257 &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.
258 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
259 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
260 {
261 &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.
262 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
263 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
264 {
265 &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).
266 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
267 },
268 ],
269 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
270 },
271 ],
272 &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.
John Asmuth614db982014-04-24 15:46:26 -0400273 }</pre>
274</div>
275
276<div class="method">
277 <code class="details" id="get">get(project, image)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 <pre>Returns the specified image. Gets a list of available images by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -0400279
280Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000281 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400282 image: string, Name of the image resource to return. (required)
283
284Returns:
285 An object of the form:
286
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 { # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 #
289 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
290 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
291 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
292 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
293 &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.
294 &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.
295 &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.
296 &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.
297 &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.
298 },
299 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
300 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
301 &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.
302 &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.
303 { # Guest OS features.
304 &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.
305 },
306 ],
307 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
308 &quot;imageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 # 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).
311 #
312 # Customer-supplied encryption keys do not protect access to metadata of the disk.
313 #
314 # 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.
315 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
316 &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.
317 &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.
318 &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.
319 },
320 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
321 &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.
322 #
323 # To see the latest fingerprint, make a get() request to retrieve an image.
324 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
325 &quot;a_key&quot;: &quot;A String&quot;,
326 },
327 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
328 &quot;A String&quot;,
329 ],
330 &quot;licenses&quot;: [ # Any applicable license URI.
331 &quot;A String&quot;,
332 ],
333 &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.
334 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
335 &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.
336 &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.
337 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
338 },
339 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
340 &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.
341 &quot;dbs&quot;: [ # The Key Database (db).
342 {
343 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
344 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800345 },
346 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
348 {
349 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
350 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 ],
353 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
354 {
355 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
356 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
357 },
358 ],
359 &quot;pk&quot;: { # The Platform Key (PK).
360 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
361 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700363 },
364 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
365 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
366 # - projects/project/zones/zone/disks/disk
367 # - zones/zone/disks/disk
368 &quot;sourceDiskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
369 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
370 &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.
371 &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.
372 &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.
373 },
374 &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.
375 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
376 # - this property, or
377 # - the rawDisk.source property, or
378 # - the sourceDisk property in order to create an image.
379 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
380 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
381 &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.
382 &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.
383 &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.
384 },
385 &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.
386 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
387 # - this property, or
388 # - the sourceImage property, or
389 # - the rawDisk.source property, or
390 # - the sourceDisk property in order to create an image.
391 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
392 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
393 &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.
394 &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.
395 &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.
396 },
397 &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.
398 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
399 &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.
400 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
401 &quot;A String&quot;,
402 ],
403 }</pre>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700404</div>
405
406<div class="method">
407 <code class="details" id="getFromFamily">getFromFamily(project, family)</code>
408 <pre>Returns the latest image that is part of an image family and is not deprecated.
409
410Args:
411 project: string, Project ID for this request. (required)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700412 family: string, Name of the image family to search for. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700413
414Returns:
415 An object of the form:
416
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700417 { # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700418 #
419 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
420 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
421 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
422 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
423 &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.
424 &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.
425 &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.
426 &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.
427 &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.
428 },
429 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
430 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
431 &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.
432 &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.
433 { # Guest OS features.
434 &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.
435 },
436 ],
437 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
438 &quot;imageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700439 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 # 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).
441 #
442 # Customer-supplied encryption keys do not protect access to metadata of the disk.
443 #
444 # 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.
445 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
446 &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.
447 &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.
448 &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.
449 },
450 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
451 &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.
452 #
453 # To see the latest fingerprint, make a get() request to retrieve an image.
454 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
455 &quot;a_key&quot;: &quot;A String&quot;,
456 },
457 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
458 &quot;A String&quot;,
459 ],
460 &quot;licenses&quot;: [ # Any applicable license URI.
461 &quot;A String&quot;,
462 ],
463 &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.
464 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
465 &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.
466 &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.
467 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
468 },
469 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
470 &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.
471 &quot;dbs&quot;: [ # The Key Database (db).
472 {
473 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
474 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800475 },
476 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
478 {
479 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
480 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700481 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700482 ],
483 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
484 {
485 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
486 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
487 },
488 ],
489 &quot;pk&quot;: { # The Platform Key (PK).
490 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
491 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700492 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 },
494 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
495 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
496 # - projects/project/zones/zone/disks/disk
497 # - zones/zone/disks/disk
498 &quot;sourceDiskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
499 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
500 &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.
501 &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.
502 &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.
503 },
504 &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.
505 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
506 # - this property, or
507 # - the rawDisk.source property, or
508 # - the sourceDisk property in order to create an image.
509 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
510 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
511 &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.
512 &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.
513 &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.
514 },
515 &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.
516 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
517 # - this property, or
518 # - the sourceImage property, or
519 # - the rawDisk.source property, or
520 # - the sourceDisk property in order to create an image.
521 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
522 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
523 &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.
524 &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.
525 &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.
526 },
527 &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.
528 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
529 &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.
530 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
531 &quot;A String&quot;,
532 ],
533 }</pre>
John Asmuth614db982014-04-24 15:46:26 -0400534</div>
535
536<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 <code class="details" id="getIamPolicy">getIamPolicy(project, resource)</code>
538 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
539
540Args:
541 project: string, Project ID for this request. (required)
542 resource: string, Name or id of the resource for this request. (required)
543
544Returns:
545 An object of the form:
546
Dan O'Mearadd494642020-05-01 07:42:23 -0700547 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 #
549 #
550 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700551 # 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 -0700552 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700553 # 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 -0700554 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 # { &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 -0700558 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700559 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700560 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 # 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 -0700562 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 # 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 -0700564 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 { # 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.
566 #
567 # 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.
568 #
569 # Example Policy with multiple AuditConfigs:
570 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 # { &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 -0700572 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700573 # 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 -0700574 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700575 { # Provides the configuration for logging a type of permissions. Example:
576 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700577 # { &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 -0700578 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
580 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
581 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 &quot;ignoreChildExemptions&quot;: True or False,
584 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 },
586 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &quot;exemptedMembers&quot;: [
588 &quot;A String&quot;,
589 ],
590 &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 -0700591 },
592 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 &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 -0700594 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700595 &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.
596 #
597 # If the condition evaluates to `true`, then this binding applies to the current request.
598 #
599 # 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.
600 #
601 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
602 #
603 # Example (Comparison):
604 #
605 # 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;
606 #
607 # Example (Equality):
608 #
609 # 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;
610 #
611 # Example (Logic):
612 #
613 # 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;
614 #
615 # Example (Data Manipulation):
616 #
617 # 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;
618 #
619 # 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.
620 &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.
621 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
622 &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.
623 &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.
624 },
625 &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 -0700626 #
627 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
628 #
629 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
630 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700632 #
633 #
634 #
635 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
636 #
637 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
638 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700639 # * `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.
640 #
641 # * `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.
642 #
643 # * `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.
644 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700645 #
646 #
647 # * `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 -0700648 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 &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 -0700651 },
652 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &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.
654 #
655 # **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.
656 &quot;iamOwned&quot;: True or False,
657 &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.
658 { # A rule to be applied in a Policy.
659 &quot;action&quot;: &quot;A String&quot;, # Required
660 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
661 { # A condition to be met.
662 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
663 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
664 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
665 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
666 &quot;values&quot;: [ # The objects of the condition.
667 &quot;A String&quot;,
668 ],
669 },
670 ],
671 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
672 &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.
673 &quot;A String&quot;,
674 ],
675 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
676 { # Specifies what kind of log the caller must write
677 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
678 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
679 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
680 },
681 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
682 },
683 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
684 #
685 # 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.
686 #
687 # Field names correspond to IAM request parameters and field values are their respective values.
688 #
689 # 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.
690 #
691 # 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]}
692 &quot;customFields&quot;: [ # Custom fields.
693 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
694 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
695 &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.
696 },
697 ],
698 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
699 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
700 },
701 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
702 &quot;logMode&quot;: &quot;A String&quot;,
703 },
704 },
705 ],
706 &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.
707 &quot;A String&quot;,
708 ],
709 &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.
710 &quot;A String&quot;,
711 ],
712 },
713 ],
714 &quot;version&quot;: 42, # Specifies the format of the policy.
715 #
716 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
717 #
718 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
719 #
720 # * 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
721 #
722 # **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.
723 #
724 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
725 #
726 # 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 -0700727 }</pre>
728</div>
729
730<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700731 <code class="details" id="insert">insert(project, body=None, forceCreate=None, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800732 <pre>Creates an image in the specified project using the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -0400733
734Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000735 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700736 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400737 The object takes the form of:
738
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700739{ # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 #
741 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
742 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
743 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
744 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
745 &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.
746 &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.
747 &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.
748 &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.
749 &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.
750 },
751 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
752 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
753 &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.
754 &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.
755 { # Guest OS features.
756 &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.
757 },
758 ],
759 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
760 &quot;imageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700761 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700762 # 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).
763 #
764 # Customer-supplied encryption keys do not protect access to metadata of the disk.
765 #
766 # 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.
767 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
768 &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.
769 &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.
770 &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.
771 },
772 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
773 &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.
774 #
775 # To see the latest fingerprint, make a get() request to retrieve an image.
776 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
777 &quot;a_key&quot;: &quot;A String&quot;,
778 },
779 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
780 &quot;A String&quot;,
781 ],
782 &quot;licenses&quot;: [ # Any applicable license URI.
783 &quot;A String&quot;,
784 ],
785 &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.
786 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
787 &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.
788 &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.
789 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
790 },
791 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
792 &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.
793 &quot;dbs&quot;: [ # The Key Database (db).
794 {
795 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
796 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800797 },
798 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
800 {
801 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
802 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700804 ],
805 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
806 {
807 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
808 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
809 },
810 ],
811 &quot;pk&quot;: { # The Platform Key (PK).
812 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
813 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700814 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700815 },
816 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
817 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
818 # - projects/project/zones/zone/disks/disk
819 # - zones/zone/disks/disk
820 &quot;sourceDiskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
821 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
822 &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.
823 &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.
824 &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.
825 },
826 &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.
827 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
828 # - this property, or
829 # - the rawDisk.source property, or
830 # - the sourceDisk property in order to create an image.
831 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
832 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
833 &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.
834 &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.
835 &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.
836 },
837 &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.
838 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
839 # - this property, or
840 # - the sourceImage property, or
841 # - the rawDisk.source property, or
842 # - the sourceDisk property in order to create an image.
843 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
844 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
845 &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.
846 &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.
847 &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.
848 },
849 &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.
850 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
851 &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.
852 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
853 &quot;A String&quot;,
854 ],
855}
John Asmuth614db982014-04-24 15:46:26 -0400856
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 forceCreate: boolean, Force image creation if true.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700858 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.
859
860For 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.
861
862The 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 -0400863
864Returns:
865 An object of the form:
866
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700867 { # Represents an Operation resource.
868 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700869 # Google Compute Engine has three Operation resources:
870 #
871 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
872 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700873 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
874 #
875 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700876 # - For global operations, use the `globalOperations` resource.
877 # - For regional operations, use the `regionOperations` resource.
878 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700880 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
882 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
883 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
884 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
885 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
886 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400887 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700888 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
889 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
890 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400891 },
892 ],
893 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &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`.
895 &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.
896 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
897 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
898 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
899 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
900 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
901 &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.
902 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
903 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
904 &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.
905 &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`.
906 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
907 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
908 &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.
909 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
910 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
911 {
912 &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.
913 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
914 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
915 {
916 &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).
917 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
918 },
919 ],
920 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
921 },
922 ],
923 &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.
John Asmuth614db982014-04-24 15:46:26 -0400924 }</pre>
925</div>
926
927<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700929 <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 -0400930
931Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000932 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700933 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 -0700934
Dan O'Mearadd494642020-05-01 07:42:23 -0700935For 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 -0700936
Dan O'Mearadd494642020-05-01 07:42:23 -0700937You 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 -0800938
Bu Sun Kim65020912020-05-20 12:08:20 -0700939To 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) ```
940 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`)
941 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
942
943You 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.
944
945Currently, only sorting by `name` or `creationTimestamp desc` is supported.
946 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.
John Asmuth614db982014-04-24 15:46:26 -0400947
948Returns:
949 An object of the form:
950
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800951 { # Contains a list of images.
Bu Sun Kim65020912020-05-20 12:08:20 -0700952 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
953 &quot;items&quot;: [ # A list of Image resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700954 { # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700955 #
956 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
957 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
958 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
959 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
960 &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.
961 &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.
962 &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.
963 &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.
964 &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 -0400965 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
967 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
968 &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.
969 &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.
970 { # Guest OS features.
971 &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.
972 },
973 ],
974 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
975 &quot;imageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
976 #
977 # 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).
978 #
979 # Customer-supplied encryption keys do not protect access to metadata of the disk.
980 #
981 # 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.
982 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
983 &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.
984 &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.
985 &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.
986 },
987 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
988 &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.
989 #
990 # To see the latest fingerprint, make a get() request to retrieve an image.
991 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
992 &quot;a_key&quot;: &quot;A String&quot;,
993 },
994 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
995 &quot;A String&quot;,
996 ],
997 &quot;licenses&quot;: [ # Any applicable license URI.
998 &quot;A String&quot;,
999 ],
1000 &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.
1001 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
1002 &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.
1003 &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.
1004 &quot;source&quot;: &quot;A String&quot;, # The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.
1005 },
1006 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1007 &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.
1008 &quot;dbs&quot;: [ # The Key Database (db).
1009 {
1010 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1011 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1012 },
1013 ],
1014 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1015 {
1016 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1017 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1018 },
1019 ],
1020 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1021 {
1022 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1023 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1024 },
1025 ],
1026 &quot;pk&quot;: { # The Platform Key (PK).
1027 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1028 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1029 },
1030 },
1031 &quot;sourceDisk&quot;: &quot;A String&quot;, # URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
1032 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1033 # - projects/project/zones/zone/disks/disk
1034 # - zones/zone/disks/disk
1035 &quot;sourceDiskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
1036 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1037 &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.
1038 &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.
1039 &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.
1040 },
1041 &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.
1042 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
1043 # - this property, or
1044 # - the rawDisk.source property, or
1045 # - the sourceDisk property in order to create an image.
1046 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1047 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1048 &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.
1049 &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.
1050 &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.
1051 },
1052 &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.
1053 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
1054 # - this property, or
1055 # - the sourceImage property, or
1056 # - the rawDisk.source property, or
1057 # - the sourceDisk property in order to create an image.
1058 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
1059 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1060 &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.
1061 &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.
1062 &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.
1063 },
1064 &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.
1065 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
1066 &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.
1067 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
1068 &quot;A String&quot;,
1069 ],
1070 },
John Asmuth614db982014-04-24 15:46:26 -04001071 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001072 &quot;kind&quot;: &quot;compute#imageList&quot;, # Type of resource.
1073 &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.
1074 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1075 &quot;warning&quot;: { # [Output Only] Informational warning message.
1076 &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.
1077 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1078 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001080 &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).
1081 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001082 },
1083 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001084 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085 },
John Asmuth614db982014-04-24 15:46:26 -04001086 }</pre>
1087</div>
1088
1089<div class="method">
1090 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1091 <pre>Retrieves the next page of results.
1092
1093Args:
1094 previous_request: The request for the previous page. (required)
1095 previous_response: The response from the request for the previous page. (required)
1096
1097Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001098 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04001099 page. Returns None if there are no more items in the collection.
1100 </pre>
1101</div>
1102
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001103<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001104 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001105 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001106
1107Args:
1108 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001109 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001110 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001111 The object takes the form of:
1112
1113{
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1115 { # Associates `members` with a `role`.
1116 &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.
1117 #
1118 # If the condition evaluates to `true`, then this binding applies to the current request.
1119 #
1120 # 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.
1121 #
1122 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1123 #
1124 # Example (Comparison):
1125 #
1126 # 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;
1127 #
1128 # Example (Equality):
1129 #
1130 # 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;
1131 #
1132 # Example (Logic):
1133 #
1134 # 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;
1135 #
1136 # Example (Data Manipulation):
1137 #
1138 # 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;
1139 #
1140 # 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.
1141 &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.
1142 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1143 &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.
1144 &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.
1145 },
1146 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1147 #
1148 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1149 #
1150 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1151 #
1152 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1153 #
1154 #
1155 #
1156 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1157 #
1158 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1159 #
1160 # * `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.
1161 #
1162 # * `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.
1163 #
1164 # * `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.
1165 #
1166 #
1167 #
1168 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1169 &quot;A String&quot;,
1170 ],
1171 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1172 },
1173 ],
1174 &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.
1175 &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 -07001176 #
1177 #
1178 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001179 # 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 -07001180 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001181 # 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 -07001182 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001183 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001184 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001185 # { &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 -07001186 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001187 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001188 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001189 # 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 -07001190 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001191 # 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 -07001192 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001193 { # 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.
1194 #
1195 # 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.
1196 #
1197 # Example Policy with multiple AuditConfigs:
1198 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001199 # { &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 -07001200 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001201 # 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 -07001202 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001203 { # Provides the configuration for logging a type of permissions. Example:
1204 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001205 # { &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 -07001206 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001207 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1208 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1209 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001210 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001211 &quot;ignoreChildExemptions&quot;: True or False,
1212 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001213 },
1214 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001215 &quot;exemptedMembers&quot;: [
1216 &quot;A String&quot;,
1217 ],
1218 &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 -07001219 },
1220 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 &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 -07001222 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001223 &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.
1224 #
1225 # If the condition evaluates to `true`, then this binding applies to the current request.
1226 #
1227 # 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.
1228 #
1229 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1230 #
1231 # Example (Comparison):
1232 #
1233 # 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;
1234 #
1235 # Example (Equality):
1236 #
1237 # 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;
1238 #
1239 # Example (Logic):
1240 #
1241 # 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;
1242 #
1243 # Example (Data Manipulation):
1244 #
1245 # 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;
1246 #
1247 # 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.
1248 &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.
1249 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1250 &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.
1251 &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.
1252 },
1253 &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 -07001254 #
1255 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1256 #
1257 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1258 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001259 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001260 #
1261 #
1262 #
1263 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1264 #
1265 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1266 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001267 # * `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.
1268 #
1269 # * `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.
1270 #
1271 # * `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.
1272 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001273 #
1274 #
1275 # * `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 -07001276 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001277 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001278 &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 -07001279 },
1280 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001281 &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.
1282 #
1283 # **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.
1284 &quot;iamOwned&quot;: True or False,
1285 &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.
1286 { # A rule to be applied in a Policy.
1287 &quot;action&quot;: &quot;A String&quot;, # Required
1288 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1289 { # A condition to be met.
1290 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1291 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1292 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1293 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1294 &quot;values&quot;: [ # The objects of the condition.
1295 &quot;A String&quot;,
1296 ],
1297 },
1298 ],
1299 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1300 &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.
1301 &quot;A String&quot;,
1302 ],
1303 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1304 { # Specifies what kind of log the caller must write
1305 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1306 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1307 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1308 },
1309 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1310 },
1311 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1312 #
1313 # 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.
1314 #
1315 # Field names correspond to IAM request parameters and field values are their respective values.
1316 #
1317 # 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.
1318 #
1319 # 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]}
1320 &quot;customFields&quot;: [ # Custom fields.
1321 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1322 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1323 &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.
1324 },
1325 ],
1326 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1327 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1328 },
1329 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1330 &quot;logMode&quot;: &quot;A String&quot;,
1331 },
1332 },
1333 ],
1334 &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.
1335 &quot;A String&quot;,
1336 ],
1337 &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.
1338 &quot;A String&quot;,
1339 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001340 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001341 ],
1342 &quot;version&quot;: 42, # Specifies the format of the policy.
1343 #
1344 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1345 #
1346 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1347 #
1348 # * 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
1349 #
1350 # **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.
1351 #
1352 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1353 #
1354 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1355 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 }
1357
1358
1359Returns:
1360 An object of the form:
1361
Dan O'Mearadd494642020-05-01 07:42:23 -07001362 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001363 #
1364 #
1365 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001366 # 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 -07001367 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001368 # 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 -07001369 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001370 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001371 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001372 # { &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 -07001373 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001374 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001375 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001376 # 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 -07001377 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001378 # 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 -07001379 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001380 { # 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.
1381 #
1382 # 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.
1383 #
1384 # Example Policy with multiple AuditConfigs:
1385 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001386 # { &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 -07001387 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001388 # 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 -07001389 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001390 { # Provides the configuration for logging a type of permissions. Example:
1391 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001392 # { &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 -07001393 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001394 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1395 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1396 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001397 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001398 &quot;ignoreChildExemptions&quot;: True or False,
1399 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001400 },
1401 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 &quot;exemptedMembers&quot;: [
1403 &quot;A String&quot;,
1404 ],
1405 &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 -07001406 },
1407 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001408 &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 -07001409 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &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.
1411 #
1412 # If the condition evaluates to `true`, then this binding applies to the current request.
1413 #
1414 # 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.
1415 #
1416 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1417 #
1418 # Example (Comparison):
1419 #
1420 # 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;
1421 #
1422 # Example (Equality):
1423 #
1424 # 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;
1425 #
1426 # Example (Logic):
1427 #
1428 # 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;
1429 #
1430 # Example (Data Manipulation):
1431 #
1432 # 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;
1433 #
1434 # 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.
1435 &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.
1436 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1437 &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.
1438 &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.
1439 },
1440 &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 -07001441 #
1442 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1443 #
1444 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1445 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001446 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001447 #
1448 #
1449 #
1450 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1451 #
1452 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1453 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001454 # * `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.
1455 #
1456 # * `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.
1457 #
1458 # * `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.
1459 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 #
1461 #
1462 # * `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 -07001463 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001464 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 &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 -07001466 },
1467 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001468 &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.
1469 #
1470 # **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.
1471 &quot;iamOwned&quot;: True or False,
1472 &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.
1473 { # A rule to be applied in a Policy.
1474 &quot;action&quot;: &quot;A String&quot;, # Required
1475 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1476 { # A condition to be met.
1477 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1478 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1479 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1480 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1481 &quot;values&quot;: [ # The objects of the condition.
1482 &quot;A String&quot;,
1483 ],
1484 },
1485 ],
1486 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1487 &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.
1488 &quot;A String&quot;,
1489 ],
1490 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1491 { # Specifies what kind of log the caller must write
1492 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1493 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1494 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1495 },
1496 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1497 },
1498 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1499 #
1500 # 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.
1501 #
1502 # Field names correspond to IAM request parameters and field values are their respective values.
1503 #
1504 # 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.
1505 #
1506 # 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]}
1507 &quot;customFields&quot;: [ # Custom fields.
1508 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1509 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1510 &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.
1511 },
1512 ],
1513 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1514 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1515 },
1516 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1517 &quot;logMode&quot;: &quot;A String&quot;,
1518 },
1519 },
1520 ],
1521 &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.
1522 &quot;A String&quot;,
1523 ],
1524 &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.
1525 &quot;A String&quot;,
1526 ],
1527 },
1528 ],
1529 &quot;version&quot;: 42, # Specifies the format of the policy.
1530 #
1531 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1532 #
1533 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1534 #
1535 # * 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
1536 #
1537 # **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.
1538 #
1539 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1540 #
1541 # 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 -07001542 }</pre>
1543</div>
1544
1545<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001546 <code class="details" id="setLabels">setLabels(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001547 <pre>Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
1548
1549Args:
1550 project: string, Project ID for this request. (required)
1551 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001552 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001553 The object takes the form of:
1554
1555{
Bu Sun Kim65020912020-05-20 12:08:20 -07001556 &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.
1557 &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;).
1558 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001559 },
1560 }
1561
1562
1563Returns:
1564 An object of the form:
1565
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001566 { # Represents an Operation resource.
1567 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001568 # Google Compute Engine has three Operation resources:
1569 #
1570 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1571 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001572 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1573 #
1574 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001575 # - For global operations, use the `globalOperations` resource.
1576 # - For regional operations, use the `regionOperations` resource.
1577 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001578 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001579 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001580 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1581 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1582 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1583 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1584 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1585 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001586 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001587 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1588 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1589 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001590 },
1591 ],
1592 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001593 &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`.
1594 &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.
1595 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1596 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1597 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1598 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1599 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1600 &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.
1601 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1602 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1603 &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.
1604 &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`.
1605 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1606 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1607 &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.
1608 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1609 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1610 {
1611 &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.
1612 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1613 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1614 {
1615 &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).
1616 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1617 },
1618 ],
1619 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1620 },
1621 ],
1622 &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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001623 }</pre>
1624</div>
1625
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001626<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001627 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001628 <pre>Returns permissions that a caller has on the specified resource.
1629
1630Args:
1631 project: string, Project ID for this request. (required)
1632 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001633 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001634 The object takes the form of:
1635
1636{
Bu Sun Kim65020912020-05-20 12:08:20 -07001637 &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.
1638 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001639 ],
1640 }
1641
1642
1643Returns:
1644 An object of the form:
1645
1646 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001647 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1648 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001649 ],
1650 }</pre>
1651</div>
1652
John Asmuth614db982014-04-24 15:46:26 -04001653</body></html>