blob: 3021b4407aa03361963abb35e1ec3078259e47dc [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.images.html">images</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#delete">delete(project, image, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Deletes the specified image.</p>
80<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Sets the deprecation status of an image.</p>
83<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -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>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Creates an image in the specified project using the data included in the request.</p>
95<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098<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>
101<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700102 <code><a href="#patch">patch(project, image, body=None, requestId=None)</a></code></p>
103<p class="firstline">Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#setLabels">setLabels(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
113<h3>Method Details</h3>
114<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115 <code class="details" id="delete">delete(project, image, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116 <pre>Deletes the specified image.
117
118Args:
119 project: string, Project ID for this request. (required)
120 image: string, Name of the image resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 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.
122
123For 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.
124
125The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700126
127Returns:
128 An object of the form:
129
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130 { # Represents an Operation resource.
131 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 # Google Compute Engine has three Operation resources:
133 #
134 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
135 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
137 #
138 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700139 # - For global operations, use the `globalOperations` resource.
140 # - For regional operations, use the `regionOperations` resource.
141 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 # 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 -0700144 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
145 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
146 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
147 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
148 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
149 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700150 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
152 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
153 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154 },
155 ],
156 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &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`.
158 &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.
159 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
160 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
161 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
162 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
163 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
164 &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.
165 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
166 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
167 &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.
168 &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`.
169 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
170 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
171 &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.
172 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
173 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
174 {
175 &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.
176 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
177 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
178 {
179 &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).
180 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
181 },
182 ],
183 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
184 },
185 ],
186 &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 Cheemalapatidf613972016-10-21 13:59:49 -0700187 }</pre>
188</div>
189
190<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 <code class="details" id="deprecate">deprecate(project, image, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700192 <pre>Sets the deprecation status of an image.
193
194If an empty request body is given, clears the deprecation status instead.
195
196Args:
197 project: string, Project ID for this request. (required)
198 image: string, Image name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700200 The object takes the form of:
201
202{ # Deprecation status for a public resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 &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.
204 &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.
205 &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.
206 &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.
207 &quot;state&quot;: &quot;A String&quot;, # The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700208}
209
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 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.
211
212For 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.
213
214The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700215
216Returns:
217 An object of the form:
218
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 { # Represents an Operation resource.
220 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 # Google Compute Engine has three Operation resources:
222 #
223 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
224 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
226 #
227 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 # - For global operations, use the `globalOperations` resource.
229 # - For regional operations, use the `regionOperations` resource.
230 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 # 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 -0700233 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
234 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
235 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
236 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
237 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
238 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700239 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
241 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
242 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700243 },
244 ],
245 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 &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`.
247 &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.
248 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
249 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
250 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
251 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
252 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
253 &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.
254 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
255 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
256 &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.
257 &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`.
258 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
259 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
260 &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.
261 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
262 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
263 {
264 &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.
265 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
266 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
267 {
268 &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).
269 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
270 },
271 ],
272 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
273 },
274 ],
275 &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 Cheemalapatidf613972016-10-21 13:59:49 -0700276 }</pre>
277</div>
278
279<div class="method">
280 <code class="details" id="get">get(project, image)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700281 <pre>Returns the specified image. Gets a list of available images by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700282
283Args:
284 project: string, Project ID for this request. (required)
285 image: string, Name of the image resource to return. (required)
286
287Returns:
288 An object of the form:
289
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 { # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 #
292 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
293 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
294 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
295 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
296 &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.
297 &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.
298 &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.
299 &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.
300 &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.
301 },
302 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
303 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
304 &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.
305 &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.
306 { # Guest OS features.
307 &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.
308 },
309 ],
310 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
311 &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 -0700312 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 # 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).
314 #
315 # Customer-supplied encryption keys do not protect access to metadata of the disk.
316 #
317 # 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.
318 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
319 &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.
320 &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.
321 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
322 #
323 # The key must meet the following requirements before you can provide it to Compute Engine:
324 # - The key is wrapped using a RSA public key certificate provided by Google.
325 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
326 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
327 &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.
328 },
329 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
330 &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.
331 #
332 # To see the latest fingerprint, make a get() request to retrieve an image.
333 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
334 &quot;a_key&quot;: &quot;A String&quot;,
335 },
336 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
337 &quot;A String&quot;,
338 ],
339 &quot;licenses&quot;: [ # Any applicable license URI.
340 &quot;A String&quot;,
341 ],
342 &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.
343 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
344 &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.
345 &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.
346 &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.
347 },
348 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
349 &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.
350 &quot;dbs&quot;: [ # The Key Database (db).
351 {
352 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
353 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700354 },
355 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
357 {
358 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
359 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700360 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 ],
362 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
363 {
364 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
365 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
366 },
367 ],
368 &quot;pk&quot;: { # The Platform Key (PK).
369 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
370 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700371 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 },
373 &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:
374 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
375 # - projects/project/zones/zone/disks/disk
376 # - zones/zone/disks/disk
377 &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.
378 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
379 &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.
380 &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.
381 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700383 # The key must meet the following requirements before you can provide it to Compute Engine:
384 # - The key is wrapped using a RSA public key certificate provided by Google.
385 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
386 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
387 &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.
388 },
389 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700390 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
391 #
392 # In order to create an image, you must provide the full or partial URL of one of the following:
393 # - The selfLink URL
394 # - This property
395 # - The rawDisk.source URL
396 # - The sourceDisk URL
Bu Sun Kim65020912020-05-20 12:08:20 -0700397 &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.
398 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
399 &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.
400 &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.
401 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
402 #
403 # The key must meet the following requirements before you can provide it to Compute Engine:
404 # - The key is wrapped using a RSA public key certificate provided by Google.
405 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
406 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
407 &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.
408 },
409 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700410 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
411 #
412 # In order to create an image, you must provide the full or partial URL of one of the following:
413 # - The selfLink URL
414 # - This property
415 # - The sourceImage URL
416 # - The rawDisk.source URL
417 # - The sourceDisk URL
Bu Sun Kim65020912020-05-20 12:08:20 -0700418 &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.
419 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
420 &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.
421 &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.
422 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
423 #
424 # The key must meet the following requirements before you can provide it to Compute Engine:
425 # - The key is wrapped using a RSA public key certificate provided by Google.
426 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
427 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
428 &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.
429 },
430 &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.
431 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
432 &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.
433 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
434 &quot;A String&quot;,
435 ],
436 }</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700437</div>
438
439<div class="method">
440 <code class="details" id="getFromFamily">getFromFamily(project, family)</code>
441 <pre>Returns the latest image that is part of an image family and is not deprecated.
442
443Args:
444 project: string, Project ID for this request. (required)
445 family: string, Name of the image family to search for. (required)
446
447Returns:
448 An object of the form:
449
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 { # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 #
452 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
453 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
454 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
455 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
456 &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.
457 &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.
458 &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.
459 &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.
460 &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.
461 },
462 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
463 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
464 &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.
465 &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.
466 { # Guest OS features.
467 &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.
468 },
469 ],
470 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
471 &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 -0700472 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 # 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).
474 #
475 # Customer-supplied encryption keys do not protect access to metadata of the disk.
476 #
477 # 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.
478 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
479 &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.
480 &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.
481 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
482 #
483 # The key must meet the following requirements before you can provide it to Compute Engine:
484 # - The key is wrapped using a RSA public key certificate provided by Google.
485 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
486 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
487 &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.
488 },
489 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
490 &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.
491 #
492 # To see the latest fingerprint, make a get() request to retrieve an image.
493 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
494 &quot;a_key&quot;: &quot;A String&quot;,
495 },
496 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
497 &quot;A String&quot;,
498 ],
499 &quot;licenses&quot;: [ # Any applicable license URI.
500 &quot;A String&quot;,
501 ],
502 &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.
503 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
504 &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.
505 &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.
506 &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.
507 },
508 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
509 &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.
510 &quot;dbs&quot;: [ # The Key Database (db).
511 {
512 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
513 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700514 },
515 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700516 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
517 {
518 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
519 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700520 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700521 ],
522 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
523 {
524 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
525 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
526 },
527 ],
528 &quot;pk&quot;: { # The Platform Key (PK).
529 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
530 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700531 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 },
533 &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:
534 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
535 # - projects/project/zones/zone/disks/disk
536 # - zones/zone/disks/disk
537 &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.
538 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
539 &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.
540 &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.
541 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 # The key must meet the following requirements before you can provide it to Compute Engine:
544 # - The key is wrapped using a RSA public key certificate provided by Google.
545 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
546 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
547 &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.
548 },
549 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700550 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
551 #
552 # In order to create an image, you must provide the full or partial URL of one of the following:
553 # - The selfLink URL
554 # - This property
555 # - The rawDisk.source URL
556 # - The sourceDisk URL
Bu Sun Kim65020912020-05-20 12:08:20 -0700557 &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.
558 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
559 &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.
560 &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.
561 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
562 #
563 # The key must meet the following requirements before you can provide it to Compute Engine:
564 # - The key is wrapped using a RSA public key certificate provided by Google.
565 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
566 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
567 &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.
568 },
569 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700570 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
571 #
572 # In order to create an image, you must provide the full or partial URL of one of the following:
573 # - The selfLink URL
574 # - This property
575 # - The sourceImage URL
576 # - The rawDisk.source URL
577 # - The sourceDisk URL
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 &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.
579 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
580 &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.
581 &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.
582 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
583 #
584 # The key must meet the following requirements before you can provide it to Compute Engine:
585 # - The key is wrapped using a RSA public key certificate provided by Google.
586 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
587 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
588 &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.
589 },
590 &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.
591 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
592 &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.
593 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
594 &quot;A String&quot;,
595 ],
596 }</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700597</div>
598
599<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700600 <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700601 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
602
603Args:
604 project: string, Project ID for this request. (required)
605 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700606 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607
608Returns:
609 An object of the form:
610
Dan O'Mearadd494642020-05-01 07:42:23 -0700611 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700612 #
613 #
614 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 # 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 -0700616 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700617 # 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 -0700618 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700619 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700620 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 # { &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 -0700622 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 # 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 -0700626 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 # 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 -0700628 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 { # 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.
630 #
631 # 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.
632 #
633 # Example Policy with multiple AuditConfigs:
634 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700635 # { &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 -0700636 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700637 # 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 -0700638 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700639 { # Provides the configuration for logging a type of permissions. Example:
640 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700641 # { &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 -0700642 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
644 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
645 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700646 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700647 &quot;ignoreChildExemptions&quot;: True or False,
648 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 },
650 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700651 &quot;exemptedMembers&quot;: [
652 &quot;A String&quot;,
653 ],
654 &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 -0700655 },
656 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 &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 -0700658 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &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.
660 #
661 # If the condition evaluates to `true`, then this binding applies to the current request.
662 #
663 # 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.
664 #
665 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
666 #
667 # Example (Comparison):
668 #
669 # 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;
670 #
671 # Example (Equality):
672 #
673 # 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;
674 #
675 # Example (Logic):
676 #
677 # 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;
678 #
679 # Example (Data Manipulation):
680 #
681 # 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;
682 #
683 # 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.
684 &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.
685 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
686 &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.
687 &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.
688 },
689 &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 -0700690 #
691 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
692 #
693 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
694 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700695 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700696 #
697 #
698 #
699 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
700 #
701 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
702 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700703 # * `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.
704 #
705 # * `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.
706 #
707 # * `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.
708 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 #
710 #
711 # * `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 -0700712 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 &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 -0700715 },
716 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &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.
718 #
719 # **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.
720 &quot;iamOwned&quot;: True or False,
721 &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.
722 { # A rule to be applied in a Policy.
723 &quot;action&quot;: &quot;A String&quot;, # Required
724 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
725 { # A condition to be met.
726 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
727 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
728 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
729 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
730 &quot;values&quot;: [ # The objects of the condition.
731 &quot;A String&quot;,
732 ],
733 },
734 ],
735 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
736 &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.
737 &quot;A String&quot;,
738 ],
739 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
740 { # Specifies what kind of log the caller must write
741 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
742 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
743 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
744 },
745 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
746 },
747 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
748 #
749 # 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.
750 #
751 # Field names correspond to IAM request parameters and field values are their respective values.
752 #
753 # 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.
754 #
755 # 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]}
756 &quot;customFields&quot;: [ # Custom fields.
757 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
758 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
759 &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.
760 },
761 ],
762 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
763 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
764 },
765 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
766 &quot;logMode&quot;: &quot;A String&quot;,
767 },
768 },
769 ],
770 &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.
771 &quot;A String&quot;,
772 ],
773 &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.
774 &quot;A String&quot;,
775 ],
776 },
777 ],
778 &quot;version&quot;: 42, # Specifies the format of the policy.
779 #
780 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
781 #
782 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
783 #
784 # * 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
785 #
786 # **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.
787 #
788 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
789 #
790 # 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 -0700791 }</pre>
792</div>
793
794<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 <code class="details" id="insert">insert(project, body=None, forceCreate=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700796 <pre>Creates an image in the specified project using the data included in the request.
797
798Args:
799 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700800 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700801 The object takes the form of:
802
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803{ # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700804 #
805 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
806 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
807 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
808 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
809 &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.
810 &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.
811 &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.
812 &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.
813 &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.
814 },
815 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
816 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
817 &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.
818 &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.
819 { # Guest OS features.
820 &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.
821 },
822 ],
823 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
824 &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 -0700825 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700826 # 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).
827 #
828 # Customer-supplied encryption keys do not protect access to metadata of the disk.
829 #
830 # 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.
831 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
832 &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.
833 &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.
834 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
835 #
836 # The key must meet the following requirements before you can provide it to Compute Engine:
837 # - The key is wrapped using a RSA public key certificate provided by Google.
838 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
839 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
840 &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.
841 },
842 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
843 &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.
844 #
845 # To see the latest fingerprint, make a get() request to retrieve an image.
846 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
847 &quot;a_key&quot;: &quot;A String&quot;,
848 },
849 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
850 &quot;A String&quot;,
851 ],
852 &quot;licenses&quot;: [ # Any applicable license URI.
853 &quot;A String&quot;,
854 ],
855 &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.
856 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
857 &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.
858 &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.
859 &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.
860 },
861 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
862 &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.
863 &quot;dbs&quot;: [ # The Key Database (db).
864 {
865 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
866 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700867 },
868 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
870 {
871 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
872 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700873 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 ],
875 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
876 {
877 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
878 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
879 },
880 ],
881 &quot;pk&quot;: { # The Platform Key (PK).
882 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
883 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700884 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 },
886 &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:
887 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
888 # - projects/project/zones/zone/disks/disk
889 # - zones/zone/disks/disk
890 &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.
891 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
892 &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.
893 &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.
894 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
895 #
896 # The key must meet the following requirements before you can provide it to Compute Engine:
897 # - The key is wrapped using a RSA public key certificate provided by Google.
898 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
899 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
900 &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.
901 },
902 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700903 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
904 #
905 # In order to create an image, you must provide the full or partial URL of one of the following:
906 # - The selfLink URL
907 # - This property
908 # - The rawDisk.source URL
909 # - The sourceDisk URL
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 &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.
911 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
912 &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.
913 &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.
914 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
915 #
916 # The key must meet the following requirements before you can provide it to Compute Engine:
917 # - The key is wrapped using a RSA public key certificate provided by Google.
918 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
919 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
920 &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.
921 },
922 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700923 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
924 #
925 # In order to create an image, you must provide the full or partial URL of one of the following:
926 # - The selfLink URL
927 # - This property
928 # - The sourceImage URL
929 # - The rawDisk.source URL
930 # - The sourceDisk URL
Bu Sun Kim65020912020-05-20 12:08:20 -0700931 &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.
932 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
933 &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.
934 &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.
935 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
936 #
937 # The key must meet the following requirements before you can provide it to Compute Engine:
938 # - The key is wrapped using a RSA public key certificate provided by Google.
939 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
940 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
941 &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.
942 },
943 &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.
944 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
945 &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.
946 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
947 &quot;A String&quot;,
948 ],
949}
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700950
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 forceCreate: boolean, Force image creation if true.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700952 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.
953
954For 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.
955
956The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700957
958Returns:
959 An object of the form:
960
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700961 { # Represents an Operation resource.
962 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700963 # Google Compute Engine has three Operation resources:
964 #
965 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
966 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
968 #
969 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700970 # - For global operations, use the `globalOperations` resource.
971 # - For regional operations, use the `regionOperations` resource.
972 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700974 # 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 -0700975 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
976 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
977 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
978 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
979 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
980 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700981 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
983 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
984 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700985 },
986 ],
987 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &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`.
989 &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.
990 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
991 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
992 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
993 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
994 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
995 &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.
996 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
997 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
998 &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.
999 &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`.
1000 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1001 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1002 &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.
1003 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1004 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1005 {
1006 &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.
1007 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1008 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1009 {
1010 &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).
1011 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1012 },
1013 ],
1014 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1015 },
1016 ],
1017 &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 Cheemalapatidf613972016-10-21 13:59:49 -07001018 }</pre>
1019</div>
1020
1021<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001023 <pre>Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001024
1025Args:
1026 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001027 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001028
Dan O'Mearadd494642020-05-01 07:42:23 -07001029For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001030
Dan O'Mearadd494642020-05-01 07:42:23 -07001031You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001032
Bu Sun Kim65020912020-05-20 12:08:20 -07001033To 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) ```
1034 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`)
1035 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1036
1037You 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.
1038
1039Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1040 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001041
1042Returns:
1043 An object of the form:
1044
1045 { # Contains a list of images.
Bu Sun Kim65020912020-05-20 12:08:20 -07001046 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1047 &quot;items&quot;: [ # A list of Image resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001048 { # Represents an Image resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001049 #
1050 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
1051 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
1052 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1053 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
1054 &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.
1055 &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.
1056 &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.
1057 &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.
1058 &quot;state&quot;: &quot;A String&quot;, # The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. Operations which communicate the end of life date for an image, can use ACTIVE. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001059 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001060 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1061 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
1062 &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.
1063 &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.
1064 { # Guest OS features.
1065 &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.
1066 },
1067 ],
1068 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1069 &quot;imageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
1070 #
1071 # 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).
1072 #
1073 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1074 #
1075 # 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.
1076 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1077 &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.
1078 &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.
1079 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1080 #
1081 # The key must meet the following requirements before you can provide it to Compute Engine:
1082 # - The key is wrapped using a RSA public key certificate provided by Google.
1083 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1084 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1085 &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.
1086 },
1087 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
1088 &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.
1089 #
1090 # To see the latest fingerprint, make a get() request to retrieve an image.
1091 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
1092 &quot;a_key&quot;: &quot;A String&quot;,
1093 },
1094 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
1095 &quot;A String&quot;,
1096 ],
1097 &quot;licenses&quot;: [ # Any applicable license URI.
1098 &quot;A String&quot;,
1099 ],
1100 &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.
1101 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
1102 &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.
1103 &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.
1104 &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.
1105 },
1106 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1107 &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.
1108 &quot;dbs&quot;: [ # The Key Database (db).
1109 {
1110 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1111 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1112 },
1113 ],
1114 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1115 {
1116 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1117 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1118 },
1119 ],
1120 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1121 {
1122 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1123 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1124 },
1125 ],
1126 &quot;pk&quot;: { # The Platform Key (PK).
1127 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1128 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1129 },
1130 },
1131 &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:
1132 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1133 # - projects/project/zones/zone/disks/disk
1134 # - zones/zone/disks/disk
1135 &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.
1136 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1137 &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.
1138 &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.
1139 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1140 #
1141 # The key must meet the following requirements before you can provide it to Compute Engine:
1142 # - The key is wrapped using a RSA public key certificate provided by Google.
1143 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1144 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1145 &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.
1146 },
1147 &quot;sourceDiskId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001148 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
1149 #
1150 # In order to create an image, you must provide the full or partial URL of one of the following:
1151 # - The selfLink URL
1152 # - This property
1153 # - The rawDisk.source URL
1154 # - The sourceDisk URL
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 &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.
1156 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1157 &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.
1158 &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.
1159 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1160 #
1161 # The key must meet the following requirements before you can provide it to Compute Engine:
1162 # - The key is wrapped using a RSA public key certificate provided by Google.
1163 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1164 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1165 &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.
1166 },
1167 &quot;sourceImageId&quot;: &quot;A String&quot;, # [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001168 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
1169 #
1170 # In order to create an image, you must provide the full or partial URL of one of the following:
1171 # - The selfLink URL
1172 # - This property
1173 # - The sourceImage URL
1174 # - The rawDisk.source URL
1175 # - The sourceDisk URL
Bu Sun Kim65020912020-05-20 12:08:20 -07001176 &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.
1177 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1178 &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.
1179 &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.
1180 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1181 #
1182 # The key must meet the following requirements before you can provide it to Compute Engine:
1183 # - The key is wrapped using a RSA public key certificate provided by Google.
1184 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1185 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1186 &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.
1187 },
1188 &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.
1189 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
1190 &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.
1191 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
1192 &quot;A String&quot;,
1193 ],
1194 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001195 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001196 &quot;kind&quot;: &quot;compute#imageList&quot;, # Type of resource.
1197 &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.
1198 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1199 &quot;warning&quot;: { # [Output Only] Informational warning message.
1200 &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.
1201 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1202 # &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 -07001203 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001204 &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).
1205 &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 -07001206 },
1207 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &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 -07001209 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001210 }</pre>
1211</div>
1212
1213<div class="method">
1214 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1215 <pre>Retrieves the next page of results.
1216
1217Args:
1218 previous_request: The request for the previous page. (required)
1219 previous_response: The response from the request for the previous page. (required)
1220
1221Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001222 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001223 page. Returns None if there are no more items in the collection.
1224 </pre>
1225</div>
1226
1227<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001228 <code class="details" id="patch">patch(project, image, body=None, requestId=None)</code>
1229 <pre>Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.
1230
1231Args:
1232 project: string, Project ID for this request. (required)
1233 image: string, Name of the image resource to patch. (required)
1234 body: object, The request body.
1235 The object takes the form of:
1236
1237{ # Represents an Image resource.
1238 #
1239 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
1240 &quot;archiveSizeBytes&quot;: &quot;A String&quot;, # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
1241 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1242 &quot;deprecated&quot;: { # Deprecation status for a public resource. # The deprecation status associated with this image.
1243 &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.
1244 &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.
1245 &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.
1246 &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.
1247 &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.
1248 },
1249 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1250 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Size of the image when restored onto a persistent disk (in GB).
1251 &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.
1252 &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.
1253 { # Guest OS features.
1254 &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.
1255 },
1256 ],
1257 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1258 &quot;imageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
1259 #
1260 # 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).
1261 #
1262 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1263 #
1264 # 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.
1265 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1266 &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.
1267 &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.
1268 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1269 #
1270 # The key must meet the following requirements before you can provide it to Compute Engine:
1271 # - The key is wrapped using a RSA public key certificate provided by Google.
1272 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1273 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1274 &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.
1275 },
1276 &quot;kind&quot;: &quot;compute#image&quot;, # [Output Only] Type of the resource. Always compute#image for images.
1277 &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.
1278 #
1279 # To see the latest fingerprint, make a get() request to retrieve an image.
1280 &quot;labels&quot;: { # Labels to apply to this image. These can be later modified by the setLabels method.
1281 &quot;a_key&quot;: &quot;A String&quot;,
1282 },
1283 &quot;licenseCodes&quot;: [ # Integer license codes indicating which licenses are attached to this image.
1284 &quot;A String&quot;,
1285 ],
1286 &quot;licenses&quot;: [ # Any applicable license URI.
1287 &quot;A String&quot;,
1288 ],
1289 &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.
1290 &quot;rawDisk&quot;: { # The parameters of the raw disk image.
1291 &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.
1292 &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.
1293 &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.
1294 },
1295 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1296 &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.
1297 &quot;dbs&quot;: [ # The Key Database (db).
1298 {
1299 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1300 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1301 },
1302 ],
1303 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1304 {
1305 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1306 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1307 },
1308 ],
1309 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1310 {
1311 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1312 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1313 },
1314 ],
1315 &quot;pk&quot;: { # The Platform Key (PK).
1316 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1317 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1318 },
1319 },
1320 &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:
1321 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1322 # - projects/project/zones/zone/disks/disk
1323 # - zones/zone/disks/disk
1324 &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.
1325 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1326 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1327 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1328 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1329 #
1330 # The key must meet the following requirements before you can provide it to Compute Engine:
1331 # - The key is wrapped using a RSA public key certificate provided by Google.
1332 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1333 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1334 &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.
1335 },
1336 &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.
1337 &quot;sourceImage&quot;: &quot;A String&quot;, # URL of the source image used to create this image.
1338 #
1339 # In order to create an image, you must provide the full or partial URL of one of the following:
1340 # - The selfLink URL
1341 # - This property
1342 # - The rawDisk.source URL
1343 # - The sourceDisk URL
1344 &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.
1345 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1346 &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.
1347 &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.
1348 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1349 #
1350 # The key must meet the following requirements before you can provide it to Compute Engine:
1351 # - The key is wrapped using a RSA public key certificate provided by Google.
1352 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1353 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1354 &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.
1355 },
1356 &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.
1357 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # URL of the source snapshot used to create this image.
1358 #
1359 # In order to create an image, you must provide the full or partial URL of one of the following:
1360 # - The selfLink URL
1361 # - This property
1362 # - The sourceImage URL
1363 # - The rawDisk.source URL
1364 # - The sourceDisk URL
1365 &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.
1366 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1367 &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.
1368 &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.
1369 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1370 #
1371 # The key must meet the following requirements before you can provide it to Compute Engine:
1372 # - The key is wrapped using a RSA public key certificate provided by Google.
1373 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1374 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1375 &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.
1376 },
1377 &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.
1378 &quot;sourceType&quot;: &quot;RAW&quot;, # The type of the image used to create this disk. The default and only value is RAW
1379 &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.
1380 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
1381 &quot;A String&quot;,
1382 ],
1383}
1384
1385 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.
1386
1387For 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.
1388
1389The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1390
1391Returns:
1392 An object of the form:
1393
1394 { # Represents an Operation resource.
1395 #
1396 # Google Compute Engine has three Operation resources:
1397 #
1398 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1399 #
1400 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1401 #
1402 # Operations can be global, regional or zonal.
1403 # - For global operations, use the `globalOperations` resource.
1404 # - For regional operations, use the `regionOperations` resource.
1405 # - For zonal operations, use the `zonalOperations` resource.
1406 #
1407 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1408 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1409 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1410 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1411 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1412 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1413 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1414 {
1415 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1416 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1417 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1418 },
1419 ],
1420 },
1421 &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`.
1422 &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.
1423 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1424 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1425 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1426 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1427 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1428 &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.
1429 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1430 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1431 &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.
1432 &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`.
1433 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1434 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1435 &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.
1436 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1437 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1438 {
1439 &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.
1440 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1441 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1442 {
1443 &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).
1444 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1445 },
1446 ],
1447 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1448 },
1449 ],
1450 &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.
1451 }</pre>
1452</div>
1453
1454<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001455 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001456 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001457
1458Args:
1459 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001461 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001462 The object takes the form of:
1463
1464{
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1466 { # Associates `members` with a `role`.
1467 &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.
1468 #
1469 # If the condition evaluates to `true`, then this binding applies to the current request.
1470 #
1471 # 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.
1472 #
1473 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1474 #
1475 # Example (Comparison):
1476 #
1477 # 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;
1478 #
1479 # Example (Equality):
1480 #
1481 # 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;
1482 #
1483 # Example (Logic):
1484 #
1485 # 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;
1486 #
1487 # Example (Data Manipulation):
1488 #
1489 # 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;
1490 #
1491 # 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.
1492 &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.
1493 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1494 &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.
1495 &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.
1496 },
1497 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1498 #
1499 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1500 #
1501 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1502 #
1503 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1504 #
1505 #
1506 #
1507 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1508 #
1509 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1510 #
1511 # * `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.
1512 #
1513 # * `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.
1514 #
1515 # * `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.
1516 #
1517 #
1518 #
1519 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1520 &quot;A String&quot;,
1521 ],
1522 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1523 },
1524 ],
1525 &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.
1526 &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 -07001527 #
1528 #
1529 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001530 # 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 -07001531 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001532 # 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 -07001533 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001534 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001535 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001536 # { &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 -07001537 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001539 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001540 # 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 -07001541 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001542 # 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 -07001543 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001544 { # 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.
1545 #
1546 # 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.
1547 #
1548 # Example Policy with multiple AuditConfigs:
1549 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001550 # { &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 -07001551 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001552 # 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 -07001553 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001554 { # Provides the configuration for logging a type of permissions. Example:
1555 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001556 # { &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 -07001557 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001558 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1559 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1560 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001561 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001562 &quot;ignoreChildExemptions&quot;: True or False,
1563 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001564 },
1565 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001566 &quot;exemptedMembers&quot;: [
1567 &quot;A String&quot;,
1568 ],
1569 &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 -07001570 },
1571 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001572 &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 -07001573 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001574 &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.
1575 #
1576 # If the condition evaluates to `true`, then this binding applies to the current request.
1577 #
1578 # 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.
1579 #
1580 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1581 #
1582 # Example (Comparison):
1583 #
1584 # 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;
1585 #
1586 # Example (Equality):
1587 #
1588 # 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;
1589 #
1590 # Example (Logic):
1591 #
1592 # 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;
1593 #
1594 # Example (Data Manipulation):
1595 #
1596 # 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;
1597 #
1598 # 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.
1599 &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.
1600 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1601 &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.
1602 &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.
1603 },
1604 &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 -07001605 #
1606 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1607 #
1608 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1609 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001610 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001611 #
1612 #
1613 #
1614 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1615 #
1616 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1617 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001618 # * `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.
1619 #
1620 # * `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.
1621 #
1622 # * `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.
1623 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001624 #
1625 #
1626 # * `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 -07001627 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001628 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001629 &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 -07001630 },
1631 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001632 &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.
1633 #
1634 # **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.
1635 &quot;iamOwned&quot;: True or False,
1636 &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.
1637 { # A rule to be applied in a Policy.
1638 &quot;action&quot;: &quot;A String&quot;, # Required
1639 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1640 { # A condition to be met.
1641 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1642 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1643 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1644 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1645 &quot;values&quot;: [ # The objects of the condition.
1646 &quot;A String&quot;,
1647 ],
1648 },
1649 ],
1650 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1651 &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.
1652 &quot;A String&quot;,
1653 ],
1654 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1655 { # Specifies what kind of log the caller must write
1656 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1657 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1658 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1659 },
1660 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1661 },
1662 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1663 #
1664 # 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.
1665 #
1666 # Field names correspond to IAM request parameters and field values are their respective values.
1667 #
1668 # 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.
1669 #
1670 # 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]}
1671 &quot;customFields&quot;: [ # Custom fields.
1672 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1673 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1674 &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.
1675 },
1676 ],
1677 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1678 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1679 },
1680 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1681 &quot;logMode&quot;: &quot;A String&quot;,
1682 },
1683 },
1684 ],
1685 &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.
1686 &quot;A String&quot;,
1687 ],
1688 &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.
1689 &quot;A String&quot;,
1690 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001691 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001692 ],
1693 &quot;version&quot;: 42, # Specifies the format of the policy.
1694 #
1695 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1696 #
1697 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1698 #
1699 # * 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
1700 #
1701 # **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.
1702 #
1703 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1704 #
1705 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1706 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001707 }
1708
1709
1710Returns:
1711 An object of the form:
1712
Dan O'Mearadd494642020-05-01 07:42:23 -07001713 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001714 #
1715 #
1716 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001717 # 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 -07001718 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001719 # 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 -07001720 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001721 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001722 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001723 # { &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 -07001724 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001725 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001726 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001727 # 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 -07001728 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001729 # 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 -07001730 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001731 { # 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.
1732 #
1733 # 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.
1734 #
1735 # Example Policy with multiple AuditConfigs:
1736 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001737 # { &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 -07001738 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001739 # 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 -07001740 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001741 { # Provides the configuration for logging a type of permissions. Example:
1742 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001743 # { &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 -07001744 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001745 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1746 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1747 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001748 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001749 &quot;ignoreChildExemptions&quot;: True or False,
1750 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001751 },
1752 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001753 &quot;exemptedMembers&quot;: [
1754 &quot;A String&quot;,
1755 ],
1756 &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 -07001757 },
1758 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001759 &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 -07001760 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001761 &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.
1762 #
1763 # If the condition evaluates to `true`, then this binding applies to the current request.
1764 #
1765 # 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.
1766 #
1767 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1768 #
1769 # Example (Comparison):
1770 #
1771 # 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;
1772 #
1773 # Example (Equality):
1774 #
1775 # 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;
1776 #
1777 # Example (Logic):
1778 #
1779 # 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;
1780 #
1781 # Example (Data Manipulation):
1782 #
1783 # 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;
1784 #
1785 # 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.
1786 &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.
1787 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1788 &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.
1789 &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.
1790 },
1791 &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 -07001792 #
1793 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1794 #
1795 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1796 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001797 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001798 #
1799 #
1800 #
1801 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1802 #
1803 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1804 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001805 # * `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.
1806 #
1807 # * `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.
1808 #
1809 # * `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.
1810 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001811 #
1812 #
1813 # * `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 -07001814 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001815 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001816 &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 -07001817 },
1818 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001819 &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.
1820 #
1821 # **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.
1822 &quot;iamOwned&quot;: True or False,
1823 &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.
1824 { # A rule to be applied in a Policy.
1825 &quot;action&quot;: &quot;A String&quot;, # Required
1826 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1827 { # A condition to be met.
1828 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1829 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1830 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1831 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1832 &quot;values&quot;: [ # The objects of the condition.
1833 &quot;A String&quot;,
1834 ],
1835 },
1836 ],
1837 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1838 &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.
1839 &quot;A String&quot;,
1840 ],
1841 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1842 { # Specifies what kind of log the caller must write
1843 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1844 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1845 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1846 },
1847 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1848 },
1849 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1850 #
1851 # 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.
1852 #
1853 # Field names correspond to IAM request parameters and field values are their respective values.
1854 #
1855 # 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.
1856 #
1857 # 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]}
1858 &quot;customFields&quot;: [ # Custom fields.
1859 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1860 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1861 &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.
1862 },
1863 ],
1864 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1865 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1866 },
1867 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1868 &quot;logMode&quot;: &quot;A String&quot;,
1869 },
1870 },
1871 ],
1872 &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.
1873 &quot;A String&quot;,
1874 ],
1875 &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.
1876 &quot;A String&quot;,
1877 ],
1878 },
1879 ],
1880 &quot;version&quot;: 42, # Specifies the format of the policy.
1881 #
1882 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1883 #
1884 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1885 #
1886 # * 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
1887 #
1888 # **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.
1889 #
1890 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1891 #
1892 # 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 -07001893 }</pre>
1894</div>
1895
1896<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001897 <code class="details" id="setLabels">setLabels(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001898 <pre>Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
1899
1900Args:
1901 project: string, Project ID for this request. (required)
1902 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001903 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001904 The object takes the form of:
1905
1906{
Bu Sun Kim65020912020-05-20 12:08:20 -07001907 &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.
1908 &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;).
1909 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001910 },
1911 }
1912
1913
1914Returns:
1915 An object of the form:
1916
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001917 { # Represents an Operation resource.
1918 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001919 # Google Compute Engine has three Operation resources:
1920 #
1921 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1922 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001923 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1924 #
1925 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001926 # - For global operations, use the `globalOperations` resource.
1927 # - For regional operations, use the `regionOperations` resource.
1928 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001929 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001930 # 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 -07001931 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1932 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1933 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1934 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1935 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1936 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001937 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001938 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1939 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1940 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001941 },
1942 ],
1943 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001944 &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`.
1945 &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.
1946 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1947 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1948 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1949 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1950 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1951 &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.
1952 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1953 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1954 &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.
1955 &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`.
1956 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1957 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1958 &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.
1959 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1960 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1961 {
1962 &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.
1963 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1964 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1965 {
1966 &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).
1967 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1968 },
1969 ],
1970 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1971 },
1972 ],
1973 &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 Cheemalapatidf613972016-10-21 13:59:49 -07001974 }</pre>
1975</div>
1976
1977<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001978 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001979 <pre>Returns permissions that a caller has on the specified resource.
1980
1981Args:
1982 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001983 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001984 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001985 The object takes the form of:
1986
1987{
Bu Sun Kim65020912020-05-20 12:08:20 -07001988 &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.
1989 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001990 ],
1991 }
1992
1993
1994Returns:
1995 An object of the form:
1996
1997 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001998 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1999 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002000 ],
2001 }</pre>
2002</div>
2003
2004</body></html>