blob: a57af9059c5cc8acbf6f98b9cec9bc9e1009962a [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.images.html">images</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#delete">delete(project, 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>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040091<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">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, body=None, requestId=None, forceCreate=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">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=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">
Dan O'Mearadd494642020-05-01 07:42:23 -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">
105 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400106<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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400115 <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 ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700144 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400146 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700149 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
151 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700152 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700155 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700156 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
157 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
158 {
159 "message": "A String", # [Output Only] A human-readable description of the warning code.
160 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
161 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
162 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
163 {
164 "value": "A String", # [Output Only] A warning data value corresponding to the key.
165 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
166 },
167 ],
168 },
169 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700170 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
174 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700176 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
177 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
178 {
179 "message": "A String", # [Output Only] An optional, human-readable error message.
180 "code": "A String", # [Output Only] The error type identifier for this error.
181 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
182 },
183 ],
184 },
185 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
186 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800187 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700188 }</pre>
189</div>
190
191<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 <code class="details" id="deprecate">deprecate(project, image, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700193 <pre>Sets the deprecation status of an image.
194
195If an empty request body is given, clears the deprecation status instead.
196
197Args:
198 project: string, Project ID for this request. (required)
199 image: string, Image name. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700200 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700201 The object takes the form of:
202
203{ # Deprecation status for a public resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800204 "deleted": "A String", # 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.
205 "deprecated": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206 "state": "A String", # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800207 "obsolete": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700208 "replacement": "A String", # 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.
209}
210
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 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.
212
213For 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.
214
215The 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 -0700216
217Returns:
218 An object of the form:
219
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 { # Represents an Operation resource.
221 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 # Google Compute Engine has three Operation resources:
223 #
224 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
225 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
227 #
228 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700229 # - For global operations, use the `globalOperations` resource.
230 # - For regional operations, use the `regionOperations` resource.
231 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700235 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400236 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700237 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700239 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
241 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700242 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700244 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700245 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700246 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
247 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
248 {
249 "message": "A String", # [Output Only] A human-readable description of the warning code.
250 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
251 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
252 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
253 {
254 "value": "A String", # [Output Only] A warning data value corresponding to the key.
255 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
256 },
257 ],
258 },
259 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700261 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700262 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
264 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700265 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700266 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
267 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
268 {
269 "message": "A String", # [Output Only] An optional, human-readable error message.
270 "code": "A String", # [Output Only] The error type identifier for this error.
271 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
272 },
273 ],
274 },
275 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
276 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800277 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700278 }</pre>
279</div>
280
281<div class="method">
282 <code class="details" id="get">get(project, image)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 <pre>Returns the specified image. Gets a list of available images by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700284
285Args:
286 project: string, Project ID for this request. (required)
287 image: string, Name of the image resource to return. (required)
288
289Returns:
290 An object of the form:
291
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 { # Represents an Image resource.
293 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700294 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400295 "sourceImageEncryptionKey": { # 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.
296 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400298 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
299 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
300 #
301 # The key must meet the following requirements before you can provide it to Compute Engine:
302 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400304 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
305 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
306 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700307 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
308 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700310 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
311 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
312 #
313 # The key must meet the following requirements before you can provide it to Compute Engine:
314 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700316 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400317 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700318 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700319 "family": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400320 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700321 "a_key": "A String",
322 },
323 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 "guestOsFeatures": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700325 { # Guest OS features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700327 },
328 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400329 "licenses": [ # Any applicable license URI.
330 "A String",
331 ],
332 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
333 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this image.
335 "A String",
336 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400337 "sourceDisk": "A String", # 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:
338 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
339 # - projects/project/zones/zone/disks/disk
340 # - zones/zone/disks/disk
Dan O'Mearadd494642020-05-01 07:42:23 -0700341 "storageLocations": [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 "A String",
343 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700344 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
345 #
346 # 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).
347 #
348 # Customer-supplied encryption keys do not protect access to metadata of the disk.
349 #
350 # 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.
351 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700353 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
354 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
355 #
356 # The key must meet the following requirements before you can provide it to Compute Engine:
357 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700359 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400360 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700361 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400362 "status": "A String", # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 "sourceSnapshot": "A String", # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
364 # - this property, or
365 # - the sourceImage property, or
366 # - the rawDisk.source property, or
367 # - the sourceDisk property in order to create an image.
368 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
369 "dbxs": [ # The forbidden key database (dbx).
370 {
371 "content": "A String", # The raw content in the secure keys file.
372 "fileType": "A String",
373 },
374 ],
375 "dbs": [ # The Key Database (db).
376 {
377 "content": "A String", # The raw content in the secure keys file.
378 "fileType": "A String",
379 },
380 ],
381 "keks": [ # The Key Exchange Key (KEK).
382 {
383 "content": "A String", # The raw content in the secure keys file.
384 "fileType": "A String",
385 },
386 ],
387 "pk": { # The Platform Key (PK).
388 "content": "A String", # The raw content in the secure keys file.
389 "fileType": "A String",
390 },
391 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400392 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700393 "rawDisk": { # The parameters of the raw disk image.
394 "containerType": "A String", # 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.
395 "source": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700396 "sha1Checksum": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700397 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700398 "labelFingerprint": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400399 #
400 # To see the latest fingerprint, make a get() request to retrieve an image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 "sourceDiskId": "A String", # [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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400402 "sourceImageId": "A String", # [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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400403 "sourceImage": "A String", # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
404 # - this property, or
405 # - the rawDisk.source property, or
406 # - the sourceDisk property in order to create an image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700407 "sourceSnapshotId": "A String", # [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.
408 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
409 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400410 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400412 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
413 "deleted": "A String", # 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.
414 "deprecated": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 "state": "A String", # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400416 "obsolete": "A String", # 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.
417 "replacement": "A String", # 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.
418 },
419 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700420 "sourceSnapshotEncryptionKey": { # 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.
421 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700422 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
424 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
425 #
426 # The key must meet the following requirements before you can provide it to Compute Engine:
427 # - The key is wrapped using a RSA public key certificate provided by Google.
428 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
429 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
430 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
431 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400432 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700433 }</pre>
434</div>
435
436<div class="method">
437 <code class="details" id="getFromFamily">getFromFamily(project, family)</code>
438 <pre>Returns the latest image that is part of an image family and is not deprecated.
439
440Args:
441 project: string, Project ID for this request. (required)
442 family: string, Name of the image family to search for. (required)
443
444Returns:
445 An object of the form:
446
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 { # Represents an Image resource.
448 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700449 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400450 "sourceImageEncryptionKey": { # 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.
451 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700452 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400453 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
454 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
455 #
456 # The key must meet the following requirements before you can provide it to Compute Engine:
457 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400459 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
460 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
461 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700462 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
463 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700464 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700465 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
466 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
467 #
468 # The key must meet the following requirements before you can provide it to Compute Engine:
469 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700471 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400472 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700473 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 "family": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400475 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700476 "a_key": "A String",
477 },
478 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 "guestOsFeatures": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700480 { # Guest OS features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700482 },
483 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400484 "licenses": [ # Any applicable license URI.
485 "A String",
486 ],
487 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
488 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this image.
490 "A String",
491 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400492 "sourceDisk": "A String", # 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:
493 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
494 # - projects/project/zones/zone/disks/disk
495 # - zones/zone/disks/disk
Dan O'Mearadd494642020-05-01 07:42:23 -0700496 "storageLocations": [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 "A String",
498 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700499 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
500 #
501 # 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).
502 #
503 # Customer-supplied encryption keys do not protect access to metadata of the disk.
504 #
505 # 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.
506 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700507 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700508 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
509 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
510 #
511 # The key must meet the following requirements before you can provide it to Compute Engine:
512 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700513 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700514 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400515 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700516 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400517 "status": "A String", # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 "sourceSnapshot": "A String", # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
519 # - this property, or
520 # - the sourceImage property, or
521 # - the rawDisk.source property, or
522 # - the sourceDisk property in order to create an image.
523 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
524 "dbxs": [ # The forbidden key database (dbx).
525 {
526 "content": "A String", # The raw content in the secure keys file.
527 "fileType": "A String",
528 },
529 ],
530 "dbs": [ # The Key Database (db).
531 {
532 "content": "A String", # The raw content in the secure keys file.
533 "fileType": "A String",
534 },
535 ],
536 "keks": [ # The Key Exchange Key (KEK).
537 {
538 "content": "A String", # The raw content in the secure keys file.
539 "fileType": "A String",
540 },
541 ],
542 "pk": { # The Platform Key (PK).
543 "content": "A String", # The raw content in the secure keys file.
544 "fileType": "A String",
545 },
546 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400547 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700548 "rawDisk": { # The parameters of the raw disk image.
549 "containerType": "A String", # 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.
550 "source": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 "sha1Checksum": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700552 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 "labelFingerprint": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400554 #
555 # To see the latest fingerprint, make a get() request to retrieve an image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 "sourceDiskId": "A String", # [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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400557 "sourceImageId": "A String", # [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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400558 "sourceImage": "A String", # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
559 # - this property, or
560 # - the rawDisk.source property, or
561 # - the sourceDisk property in order to create an image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700562 "sourceSnapshotId": "A String", # [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.
563 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
564 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400565 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700566 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400567 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
568 "deleted": "A String", # 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.
569 "deprecated": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 "state": "A String", # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400571 "obsolete": "A String", # 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.
572 "replacement": "A String", # 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.
573 },
574 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700575 "sourceSnapshotEncryptionKey": { # 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.
576 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700577 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
579 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
580 #
581 # The key must meet the following requirements before you can provide it to Compute Engine:
582 # - The key is wrapped using a RSA public key certificate provided by Google.
583 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
584 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
585 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
586 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400587 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700588 }</pre>
589</div>
590
591<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400593 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
594
595Args:
596 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700598 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400599
600Returns:
601 An object of the form:
602
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400604 #
605 #
606 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700607 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400608 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700609 # Optionally, a `binding` can 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400610 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700611 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400612 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700613 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700617 # 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('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700618 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700619 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400620 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400621 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400622 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400624 #
625 # Example Policy with multiple AuditConfigs:
626 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700627 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400628 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400630 "exemptedMembers": [
631 "A String",
632 ],
633 "auditLogConfigs": [ # The configuration for logging of each type of permission.
634 { # Provides the configuration for logging a type of permissions. Example:
635 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700636 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400637 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700638 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400639 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
640 "A String",
641 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700642 "ignoreChildExemptions": True or False,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400643 "logType": "A String", # The log type that this config enables.
644 },
645 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400646 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400647 },
648 ],
649 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
650 { # A rule to be applied in a Policy.
651 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
652 { # Specifies what kind of log the caller must write
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700653 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
654 #
655 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
656 #
657 # Field names correspond to IAM request parameters and field values are their respective values.
658 #
659 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
660 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700661 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400662 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -0700663 "customFields": [ # Custom fields.
664 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
665 "name": "A String", # Name is the field name.
666 "value": "A String", # 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.
667 },
668 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400669 "metric": "A String", # The metric to update.
670 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700671 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -0700672 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700673 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400674 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
675 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
677 "permissionType": "A String", # The type of the permission that was checked.
678 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400679 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400680 },
681 ],
682 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
683 "A String",
684 ],
685 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
686 "A String",
687 ],
688 "action": "A String", # Required
689 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
690 "A String",
691 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700692 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400693 { # A condition to be met.
694 "iam": "A String", # Trusted attributes supplied by the IAM system.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400695 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700696 "values": [ # The objects of the condition.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400697 "A String",
698 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700699 "svc": "A String", # Trusted attributes discharged by the service.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400700 "op": "A String", # An operator to apply the subject with.
701 },
702 ],
703 "description": "A String", # Human-readable description of the rule.
704 },
705 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700706 "version": 42, # Specifies the format of the policy.
707 #
708 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
709 #
710 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
711 #
712 # * 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
713 #
714 # **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.
715 #
716 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400717 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
718 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 # **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 "bindings": [ # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400721 { # Associates `members` with a `role`.
722 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
723 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
724 #
725 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
726 #
727 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
728 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700729 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400730 #
731 #
732 #
733 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
734 #
735 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
736 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700737 # * `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.
738 #
739 # * `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.
740 #
741 # * `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.
742 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400743 #
744 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700745 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400746 "A String",
747 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700748 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700750 # Example (Comparison):
751 #
752 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
753 #
754 # Example (Equality):
755 #
756 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
757 #
758 # Example (Logic):
759 #
760 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
761 #
762 # Example (Data Manipulation):
763 #
764 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
765 #
766 # 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.
767 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700769 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
770 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400772 },
773 ],
774 "iamOwned": True or False,
775 }</pre>
776</div>
777
778<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700779 <code class="details" id="insert">insert(project, body=None, requestId=None, forceCreate=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700780 <pre>Creates an image in the specified project using the data included in the request.
781
782Args:
783 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700784 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700785 The object takes the form of:
786
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700787{ # Represents an Image resource.
788 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700789 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400790 "sourceImageEncryptionKey": { # 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.
791 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700792 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400793 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
794 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
795 #
796 # The key must meet the following requirements before you can provide it to Compute Engine:
797 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400799 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
800 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
801 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700802 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
803 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700804 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700805 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
806 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
807 #
808 # The key must meet the following requirements before you can provide it to Compute Engine:
809 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700811 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400812 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700813 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700814 "family": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400815 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700816 "a_key": "A String",
817 },
818 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 "guestOsFeatures": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700820 { # Guest OS features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700821 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700822 },
823 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400824 "licenses": [ # Any applicable license URI.
825 "A String",
826 ],
827 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
828 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700829 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this image.
830 "A String",
831 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400832 "sourceDisk": "A String", # 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:
833 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
834 # - projects/project/zones/zone/disks/disk
835 # - zones/zone/disks/disk
Dan O'Mearadd494642020-05-01 07:42:23 -0700836 "storageLocations": [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700837 "A String",
838 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700839 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
840 #
841 # 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).
842 #
843 # Customer-supplied encryption keys do not protect access to metadata of the disk.
844 #
845 # 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.
846 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700847 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700848 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
849 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
850 #
851 # The key must meet the following requirements before you can provide it to Compute Engine:
852 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700853 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700854 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400855 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700856 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400857 "status": "A String", # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700858 "sourceSnapshot": "A String", # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
859 # - this property, or
860 # - the sourceImage property, or
861 # - the rawDisk.source property, or
862 # - the sourceDisk property in order to create an image.
863 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
864 "dbxs": [ # The forbidden key database (dbx).
865 {
866 "content": "A String", # The raw content in the secure keys file.
867 "fileType": "A String",
868 },
869 ],
870 "dbs": [ # The Key Database (db).
871 {
872 "content": "A String", # The raw content in the secure keys file.
873 "fileType": "A String",
874 },
875 ],
876 "keks": [ # The Key Exchange Key (KEK).
877 {
878 "content": "A String", # The raw content in the secure keys file.
879 "fileType": "A String",
880 },
881 ],
882 "pk": { # The Platform Key (PK).
883 "content": "A String", # The raw content in the secure keys file.
884 "fileType": "A String",
885 },
886 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400887 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700888 "rawDisk": { # The parameters of the raw disk image.
889 "containerType": "A String", # 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.
890 "source": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 "sha1Checksum": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700892 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893 "labelFingerprint": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400894 #
895 # To see the latest fingerprint, make a get() request to retrieve an image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 "sourceDiskId": "A String", # [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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400897 "sourceImageId": "A String", # [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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400898 "sourceImage": "A String", # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
899 # - this property, or
900 # - the rawDisk.source property, or
901 # - the sourceDisk property in order to create an image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 "sourceSnapshotId": "A String", # [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.
903 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
904 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400905 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700906 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400907 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
908 "deleted": "A String", # 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.
909 "deprecated": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700910 "state": "A String", # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400911 "obsolete": "A String", # 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.
912 "replacement": "A String", # 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.
913 },
914 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 "sourceSnapshotEncryptionKey": { # 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.
916 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700917 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
919 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
920 #
921 # The key must meet the following requirements before you can provide it to Compute Engine:
922 # - The key is wrapped using a RSA public key certificate provided by Google.
923 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
924 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
925 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
926 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400927 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700928 }
929
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 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.
931
932For 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.
933
934The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400935 forceCreate: boolean, Force image creation if true.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700936
937Returns:
938 An object of the form:
939
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700940 { # Represents an Operation resource.
941 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700942 # Google Compute Engine has three Operation resources:
943 #
944 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
945 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700946 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
947 #
948 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700949 # - For global operations, use the `globalOperations` resource.
950 # - For regional operations, use the `regionOperations` resource.
951 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700952 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700953 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700954 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700955 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400956 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700957 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700959 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700960 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
961 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700962 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700963 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700964 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700965 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700966 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
967 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
968 {
969 "message": "A String", # [Output Only] A human-readable description of the warning code.
970 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
971 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
972 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
973 {
974 "value": "A String", # [Output Only] A warning data value corresponding to the key.
975 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
976 },
977 ],
978 },
979 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700980 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700981 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700982 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700983 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
984 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700986 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
987 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
988 {
989 "message": "A String", # [Output Only] An optional, human-readable error message.
990 "code": "A String", # [Output Only] The error type identifier for this error.
991 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
992 },
993 ],
994 },
995 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
996 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800997 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700998 }</pre>
999</div>
1000
1001<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001002 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001003 <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 -07001004
1005Args:
1006 project: string, Project ID for this request. (required)
1007 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1008
Dan O'Mearadd494642020-05-01 07:42:23 -07001009You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001010
Dan O'Mearadd494642020-05-01 07:42:23 -07001011Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1012 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`)
1013 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.
1014 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
1015 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 -07001016
Dan O'Mearadd494642020-05-01 07:42:23 -07001017For 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 -07001018
Dan O'Mearadd494642020-05-01 07:42:23 -07001019You 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 -07001020
Dan O'Mearadd494642020-05-01 07:42:23 -07001021To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001022
1023Returns:
1024 An object of the form:
1025
1026 { # Contains a list of images.
1027 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028 "kind": "compute#imageList", # Type of resource.
1029 "items": [ # A list of Image resources.
1030 { # Represents an Image resource.
1031 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001032 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001033 "sourceImageEncryptionKey": { # 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.
1034 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001035 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001036 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1037 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1038 #
1039 # The key must meet the following requirements before you can provide it to Compute Engine:
1040 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001041 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001042 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1043 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1044 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001045 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
1046 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001047 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001048 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1049 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1050 #
1051 # The key must meet the following requirements before you can provide it to Compute Engine:
1052 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001053 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001054 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001055 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001056 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001057 "family": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001058 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001059 "a_key": "A String",
1060 },
1061 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001062 "guestOsFeatures": [ # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001063 { # Guest OS features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001064 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001065 },
1066 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001067 "licenses": [ # Any applicable license URI.
1068 "A String",
1069 ],
1070 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1071 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001072 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this image.
1073 "A String",
1074 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001075 "sourceDisk": "A String", # 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:
1076 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1077 # - projects/project/zones/zone/disks/disk
1078 # - zones/zone/disks/disk
Dan O'Mearadd494642020-05-01 07:42:23 -07001079 "storageLocations": [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 "A String",
1081 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001082 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
1083 #
1084 # 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).
1085 #
1086 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1087 #
1088 # 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.
1089 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001090 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001091 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1092 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1093 #
1094 # The key must meet the following requirements before you can provide it to Compute Engine:
1095 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001096 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001097 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001098 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001099 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001100 "status": "A String", # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001101 "sourceSnapshot": "A String", # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
1102 # - this property, or
1103 # - the sourceImage property, or
1104 # - the rawDisk.source property, or
1105 # - the sourceDisk property in order to create an image.
1106 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
1107 "dbxs": [ # The forbidden key database (dbx).
1108 {
1109 "content": "A String", # The raw content in the secure keys file.
1110 "fileType": "A String",
1111 },
1112 ],
1113 "dbs": [ # The Key Database (db).
1114 {
1115 "content": "A String", # The raw content in the secure keys file.
1116 "fileType": "A String",
1117 },
1118 ],
1119 "keks": [ # The Key Exchange Key (KEK).
1120 {
1121 "content": "A String", # The raw content in the secure keys file.
1122 "fileType": "A String",
1123 },
1124 ],
1125 "pk": { # The Platform Key (PK).
1126 "content": "A String", # The raw content in the secure keys file.
1127 "fileType": "A String",
1128 },
1129 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001130 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001131 "rawDisk": { # The parameters of the raw disk image.
1132 "containerType": "A String", # 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.
1133 "source": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001134 "sha1Checksum": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001135 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001136 "labelFingerprint": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001137 #
1138 # To see the latest fingerprint, make a get() request to retrieve an image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001139 "sourceDiskId": "A String", # [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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001140 "sourceImageId": "A String", # [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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001141 "sourceImage": "A String", # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
1142 # - this property, or
1143 # - the rawDisk.source property, or
1144 # - the sourceDisk property in order to create an image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 "sourceSnapshotId": "A String", # [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.
1146 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
1147 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001148 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001149 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001150 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
1151 "deleted": "A String", # 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.
1152 "deprecated": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001153 "state": "A String", # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -04001154 "obsolete": "A String", # 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.
1155 "replacement": "A String", # 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.
1156 },
1157 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001158 "sourceSnapshotEncryptionKey": { # 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.
1159 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001160 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001161 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1162 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1163 #
1164 # The key must meet the following requirements before you can provide it to Compute Engine:
1165 # - The key is wrapped using a RSA public key certificate provided by Google.
1166 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1167 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1168 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1169 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001170 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001171 },
1172 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001173 "warning": { # [Output Only] Informational warning message.
1174 "message": "A String", # [Output Only] A human-readable description of the warning code.
1175 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1176 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1177 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1178 {
1179 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1180 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1181 },
1182 ],
1183 },
1184 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001185 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1186 }</pre>
1187</div>
1188
1189<div class="method">
1190 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1191 <pre>Retrieves the next page of results.
1192
1193Args:
1194 previous_request: The request for the previous page. (required)
1195 previous_response: The response from the request for the previous page. (required)
1196
1197Returns:
1198 A request object that you can call 'execute()' on to request the next
1199 page. Returns None if there are no more items in the collection.
1200 </pre>
1201</div>
1202
1203<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001204 <code class="details" id="patch">patch(project, image, body=None, requestId=None)</code>
1205 <pre>Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.
1206
1207Args:
1208 project: string, Project ID for this request. (required)
1209 image: string, Name of the image resource to patch. (required)
1210 body: object, The request body.
1211 The object takes the form of:
1212
1213{ # Represents an Image resource.
1214 #
1215 # You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
1216 "sourceImageEncryptionKey": { # 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.
1217 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1218 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1219 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1220 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1221 #
1222 # The key must meet the following requirements before you can provide it to Compute Engine:
1223 # - The key is wrapped using a RSA public key certificate provided by Google.
1224 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1225 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1226 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1227 },
1228 "sourceDiskEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
1229 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1230 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1231 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1232 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1233 #
1234 # The key must meet the following requirements before you can provide it to Compute Engine:
1235 # - The key is wrapped using a RSA public key certificate provided by Google.
1236 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1237 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1238 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1239 },
1240 "family": "A String", # 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.
1241 "labels": { # Labels to apply to this image. These can be later modified by the setLabels method.
1242 "a_key": "A String",
1243 },
1244 "archiveSizeBytes": "A String", # Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
1245 "guestOsFeatures": [ # 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.
1246 { # Guest OS features.
1247 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1248 },
1249 ],
1250 "licenses": [ # Any applicable license URI.
1251 "A String",
1252 ],
1253 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1254 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1255 "licenseCodes": [ # Integer license codes indicating which licenses are attached to this image.
1256 "A String",
1257 ],
1258 "sourceDisk": "A String", # 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:
1259 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1260 # - projects/project/zones/zone/disks/disk
1261 # - zones/zone/disks/disk
1262 "storageLocations": [ # Cloud Storage bucket storage location of the image (regional or multi-regional).
1263 "A String",
1264 ],
1265 "imageEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts the image using a customer-supplied encryption key.
1266 #
1267 # 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).
1268 #
1269 # Customer-supplied encryption keys do not protect access to metadata of the disk.
1270 #
1271 # 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.
1272 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1273 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1274 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1275 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1276 #
1277 # The key must meet the following requirements before you can provide it to Compute Engine:
1278 # - The key is wrapped using a RSA public key certificate provided by Google.
1279 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1280 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1281 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1282 },
1283 "status": "A String", # [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.
1284 "sourceSnapshot": "A String", # URL of the source snapshot used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
1285 # - this property, or
1286 # - the sourceImage property, or
1287 # - the rawDisk.source property, or
1288 # - the sourceDisk property in order to create an image.
1289 "shieldedInstanceInitialState": { # Initial State for shielded instance, these are public keys which are safe to store in public # Set the secure boot keys of shielded instance.
1290 "dbxs": [ # The forbidden key database (dbx).
1291 {
1292 "content": "A String", # The raw content in the secure keys file.
1293 "fileType": "A String",
1294 },
1295 ],
1296 "dbs": [ # The Key Database (db).
1297 {
1298 "content": "A String", # The raw content in the secure keys file.
1299 "fileType": "A String",
1300 },
1301 ],
1302 "keks": [ # The Key Exchange Key (KEK).
1303 {
1304 "content": "A String", # The raw content in the secure keys file.
1305 "fileType": "A String",
1306 },
1307 ],
1308 "pk": { # The Platform Key (PK).
1309 "content": "A String", # The raw content in the secure keys file.
1310 "fileType": "A String",
1311 },
1312 },
1313 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1314 "rawDisk": { # The parameters of the raw disk image.
1315 "containerType": "A String", # 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.
1316 "source": "A String", # 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.
1317 "sha1Checksum": "A String", # [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.
1318 },
1319 "labelFingerprint": "A String", # 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.
1320 #
1321 # To see the latest fingerprint, make a get() request to retrieve an image.
1322 "sourceDiskId": "A String", # [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.
1323 "sourceImageId": "A String", # [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.
1324 "sourceImage": "A String", # URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of:
1325 # - this property, or
1326 # - the rawDisk.source property, or
1327 # - the sourceDisk property in order to create an image.
1328 "sourceSnapshotId": "A String", # [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.
1329 "sourceType": "RAW", # The type of the image used to create this disk. The default and only value is RAW
1330 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource's resource id.
1331 "kind": "compute#image", # [Output Only] Type of the resource. Always compute#image for images.
1332 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1333 "deprecated": { # Deprecation status for a public resource. # The deprecation status associated with this image.
1334 "deleted": "A String", # 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.
1335 "deprecated": "A String", # 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.
1336 "state": "A String", # 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.
1337 "obsolete": "A String", # 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.
1338 "replacement": "A String", # 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.
1339 },
1340 "diskSizeGb": "A String", # Size of the image when restored onto a persistent disk (in GB).
1341 "sourceSnapshotEncryptionKey": { # 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.
1342 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1343 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1344 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1345 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1346 #
1347 # The key must meet the following requirements before you can provide it to Compute Engine:
1348 # - The key is wrapped using a RSA public key certificate provided by Google.
1349 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1350 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1351 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1352 },
1353 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1354 }
1355
1356 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.
1357
1358For 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.
1359
1360The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1361
1362Returns:
1363 An object of the form:
1364
1365 { # Represents an Operation resource.
1366 #
1367 # Google Compute Engine has three Operation resources:
1368 #
1369 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1370 #
1371 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1372 #
1373 # Operations can be global, regional or zonal.
1374 # - For global operations, use the `globalOperations` resource.
1375 # - For regional operations, use the `regionOperations` resource.
1376 # - For zonal operations, use the `zonalOperations` resource.
1377 #
1378 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1379 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1380 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1381 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1382 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1383 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1384 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1385 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1386 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1387 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1388 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1389 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1390 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1391 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1392 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1393 {
1394 "message": "A String", # [Output Only] A human-readable description of the warning code.
1395 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1396 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1397 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1398 {
1399 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1400 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1401 },
1402 ],
1403 },
1404 ],
1405 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1406 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
1407 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1408 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1409 "name": "A String", # [Output Only] Name of the operation.
1410 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1411 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1412 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1413 {
1414 "message": "A String", # [Output Only] An optional, human-readable error message.
1415 "code": "A String", # [Output Only] The error type identifier for this error.
1416 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1417 },
1418 ],
1419 },
1420 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1421 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1422 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1423 }</pre>
1424</div>
1425
1426<div class="method">
1427 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001428 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1429
1430Args:
1431 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001432 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001433 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001434 The object takes the form of:
1435
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001436{
Dan O'Mearadd494642020-05-01 07:42:23 -07001437 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001438 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001439 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001440 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001441 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001442 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001443 # Optionally, a `binding` can 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001445 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001447 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001448 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001449 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001450 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001451 # 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('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001452 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001453 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001454 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1455 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001456 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001457 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001458 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001459 # Example Policy with multiple AuditConfigs:
1460 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001461 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001463 # 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 Kim715bd7f2019-06-14 16:50:42 -07001464 "exemptedMembers": [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001465 "A String",
1466 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001467 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1468 { # Provides the configuration for logging a type of permissions. Example:
1469 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001470 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001471 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001472 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001473 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1474 "A String",
1475 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001476 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001477 "logType": "A String", # The log type that this config enables.
1478 },
1479 ],
1480 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001481 },
1482 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001483 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1484 { # A rule to be applied in a Policy.
1485 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1486 { # Specifies what kind of log the caller must write
1487 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1488 #
1489 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
1490 #
1491 # Field names correspond to IAM request parameters and field values are their respective values.
1492 #
1493 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
1494 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001495 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001496 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001497 "customFields": [ # Custom fields.
1498 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1499 "name": "A String", # Name is the field name.
1500 "value": "A String", # 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.
1501 },
1502 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001503 "metric": "A String", # The metric to update.
1504 },
1505 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001506 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001507 },
1508 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1509 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1510 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1511 "permissionType": "A String", # The type of the permission that was checked.
1512 },
1513 },
1514 },
1515 ],
1516 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1517 "A String",
1518 ],
1519 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1520 "A String",
1521 ],
1522 "action": "A String", # Required
1523 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1524 "A String",
1525 ],
1526 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1527 { # A condition to be met.
1528 "iam": "A String", # Trusted attributes supplied by the IAM system.
1529 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1530 "values": [ # The objects of the condition.
1531 "A String",
1532 ],
1533 "svc": "A String", # Trusted attributes discharged by the service.
1534 "op": "A String", # An operator to apply the subject with.
1535 },
1536 ],
1537 "description": "A String", # Human-readable description of the rule.
1538 },
1539 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001540 "version": 42, # Specifies the format of the policy.
1541 #
1542 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1543 #
1544 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1545 #
1546 # * 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
1547 #
1548 # **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.
1549 #
1550 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001551 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1552 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001553 # **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.
1554 "bindings": [ # 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 -07001555 { # Associates `members` with a `role`.
1556 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1557 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1558 #
1559 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1560 #
1561 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1562 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001563 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001564 #
1565 #
1566 #
1567 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1568 #
1569 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1570 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001571 # * `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.
1572 #
1573 # * `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.
1574 #
1575 # * `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.
1576 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001577 #
1578 #
1579 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1580 "A String",
1581 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001582 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001583 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001584 # Example (Comparison):
1585 #
1586 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1587 #
1588 # Example (Equality):
1589 #
1590 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1591 #
1592 # Example (Logic):
1593 #
1594 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1595 #
1596 # Example (Data Manipulation):
1597 #
1598 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1599 #
1600 # 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.
1601 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001603 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1604 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001605 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001606 },
1607 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001608 "iamOwned": True or False,
1609 },
1610 "bindings": [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify bindings.
1611 { # Associates `members` with a `role`.
1612 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1613 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1614 #
1615 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1616 #
1617 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1618 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001619 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001620 #
1621 #
1622 #
1623 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1624 #
1625 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1626 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001627 # * `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.
1628 #
1629 # * `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.
1630 #
1631 # * `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.
1632 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001633 #
1634 #
1635 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1636 "A String",
1637 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001638 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001639 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001640 # Example (Comparison):
1641 #
1642 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1643 #
1644 # Example (Equality):
1645 #
1646 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1647 #
1648 # Example (Logic):
1649 #
1650 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1651 #
1652 # Example (Data Manipulation):
1653 #
1654 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1655 #
1656 # 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.
1657 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001658 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001659 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1660 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001661 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001662 },
1663 ],
1664 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
1665 }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001666
1667
1668Returns:
1669 An object of the form:
1670
Dan O'Mearadd494642020-05-01 07:42:23 -07001671 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001672 #
1673 #
1674 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001675 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001676 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001677 # Optionally, a `binding` can 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001678 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001679 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001680 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001681 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001682 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001683 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001684 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001685 # 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('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001686 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001687 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001688 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001689 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001690 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001691 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001692 #
1693 # Example Policy with multiple AuditConfigs:
1694 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001695 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001696 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001697 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001698 "exemptedMembers": [
1699 "A String",
1700 ],
1701 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1702 { # Provides the configuration for logging a type of permissions. Example:
1703 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001704 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001705 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001706 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001707 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1708 "A String",
1709 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001710 "ignoreChildExemptions": True or False,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001711 "logType": "A String", # The log type that this config enables.
1712 },
1713 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001714 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001715 },
1716 ],
1717 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1718 { # A rule to be applied in a Policy.
1719 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1720 { # Specifies what kind of log the caller must write
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001721 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1722 #
1723 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
1724 #
1725 # Field names correspond to IAM request parameters and field values are their respective values.
1726 #
1727 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
1728 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001729 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001730 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001731 "customFields": [ # Custom fields.
1732 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1733 "name": "A String", # Name is the field name.
1734 "value": "A String", # 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.
1735 },
1736 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001737 "metric": "A String", # The metric to update.
1738 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001739 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001740 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001741 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001742 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1743 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001744 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1745 "permissionType": "A String", # The type of the permission that was checked.
1746 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001747 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001748 },
1749 ],
1750 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1751 "A String",
1752 ],
1753 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1754 "A String",
1755 ],
1756 "action": "A String", # Required
1757 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1758 "A String",
1759 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001760 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001761 { # A condition to be met.
1762 "iam": "A String", # Trusted attributes supplied by the IAM system.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001763 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001764 "values": [ # The objects of the condition.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001765 "A String",
1766 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001767 "svc": "A String", # Trusted attributes discharged by the service.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001768 "op": "A String", # An operator to apply the subject with.
1769 },
1770 ],
1771 "description": "A String", # Human-readable description of the rule.
1772 },
1773 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001774 "version": 42, # Specifies the format of the policy.
1775 #
1776 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1777 #
1778 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1779 #
1780 # * 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
1781 #
1782 # **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.
1783 #
1784 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001785 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1786 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001787 # **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.
1788 "bindings": [ # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001789 { # Associates `members` with a `role`.
1790 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1791 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1792 #
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` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001798 #
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 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001811 #
1812 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001813 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001814 "A String",
1815 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001816 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001817 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001818 # Example (Comparison):
1819 #
1820 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1821 #
1822 # Example (Equality):
1823 #
1824 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1825 #
1826 # Example (Logic):
1827 #
1828 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1829 #
1830 # Example (Data Manipulation):
1831 #
1832 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1833 #
1834 # 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.
1835 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001836 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001837 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1838 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001839 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001840 },
1841 ],
1842 "iamOwned": True or False,
1843 }</pre>
1844</div>
1845
1846<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001847 <code class="details" id="setLabels">setLabels(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001848 <pre>Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001849
1850Args:
1851 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001852 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001853 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001854 The object takes the form of:
1855
1856{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001857 "labelFingerprint": "A String", # The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.
Dan O'Mearadd494642020-05-01 07:42:23 -07001858 "labels": { # 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, "webserver-frontend": "images". A label value can also be empty (e.g. "my-label": "").
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001859 "a_key": "A String",
1860 },
1861 }
1862
1863
1864Returns:
1865 An object of the form:
1866
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001867 { # Represents an Operation resource.
1868 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001869 # Google Compute Engine has three Operation resources:
1870 #
1871 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1872 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001873 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1874 #
1875 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001876 # - For global operations, use the `globalOperations` resource.
1877 # - For regional operations, use the `regionOperations` resource.
1878 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001879 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001880 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001881 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001882 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001883 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001884 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001885 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001886 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001887 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1888 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001889 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -07001890 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001891 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001892 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001893 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1894 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1895 {
1896 "message": "A String", # [Output Only] A human-readable description of the warning code.
1897 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1898 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1899 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1900 {
1901 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1902 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1903 },
1904 ],
1905 },
1906 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001907 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001908 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001909 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001910 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1911 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001912 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001913 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1914 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1915 {
1916 "message": "A String", # [Output Only] An optional, human-readable error message.
1917 "code": "A String", # [Output Only] The error type identifier for this error.
1918 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1919 },
1920 ],
1921 },
1922 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1923 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001924 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001925 }</pre>
1926</div>
1927
1928<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001929 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001930 <pre>Returns permissions that a caller has on the specified resource.
1931
1932Args:
1933 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001934 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001935 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001936 The object takes the form of:
1937
1938{
1939 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
1940 "A String",
1941 ],
1942 }
1943
1944
1945Returns:
1946 An object of the form:
1947
1948 {
1949 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1950 "A String",
1951 ],
1952 }</pre>
1953</div>
1954
1955</body></html>