blob: 2d90625ea6bf76449804540021b7e2f89b79b689 [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.instanceTemplates.html">instanceTemplates</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040081 <code><a href="#delete">delete(project, instanceTemplate, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070083<p class="toc_element">
84 <code><a href="#get">get(project, instanceTemplate)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Returns the specified instance template. Gets a list of available instance templates by making a list() request.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.</p>
92<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Retrieves a list of instance templates that are contained within the specified project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
104<h3>Method Details</h3>
105<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400111 <code class="details" id="delete">delete(project, instanceTemplate, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 <pre>Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700113
114Args:
115 project: string, Project ID for this request. (required)
116 instanceTemplate: string, The name of the instance template to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 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.
118
119For 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.
120
121The 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 -0700122
123Returns:
124 An object of the form:
125
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800127 #
128 # Google Compute Engine has three Operation resources:
129 #
130 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
131 #
132 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
133 #
134 # Operations can be global, regional or zonal.
135 # - For global operations, use the `globalOperations` resource.
136 # - For regional operations, use the `regionOperations` resource.
137 # - For zonal operations, use the `zonalOperations` resource.
138 #
139 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
140 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
141 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
142 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
143 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
144 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
145 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800147 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
148 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 },
151 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800152 },
153 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
154 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
155 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
156 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
157 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800158 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
159 #
160 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
161 #
162 # Example 1: Pack and unpack a message in C++.
163 #
164 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
165 #
166 # Example 2: Pack and unpack a message in Java.
167 #
168 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
169 #
170 # Example 3: Pack and unpack a message in Python.
171 #
172 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
173 #
174 # Example 4: Pack and unpack a message in Go
175 #
176 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
177 #
178 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
179 #
180 #
181 #
182 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
183 #
184 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
185 #
186 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
187 #
188 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
189 #
190 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
191 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
192 #
193 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
194 #
195 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
196 #
197 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
198 #
199 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
200 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
201 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800202 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800203 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800204 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
205 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
206 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
207 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
208 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
209 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
210 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
211 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
212 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
213 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
214 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
215 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
216 {
217 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
218 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
219 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
220 {
221 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
222 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
223 },
224 ],
225 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
226 },
227 ],
228 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
229}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700230</div>
231
232<div class="method">
233 <code class="details" id="get">get(project, instanceTemplate)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 <pre>Returns the specified instance template. Gets a list of available instance templates by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700235
236Args:
237 project: string, Project ID for this request. (required)
238 instanceTemplate: string, The name of the instance template. (required)
239
240Returns:
241 An object of the form:
242
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 { # Represents an Instance Template resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 #
245 # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for {$api_version}.instanceTemplates ==)
246 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
247 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
248 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance template. The server defines this identifier.
249 &quot;kind&quot;: &quot;compute#instanceTemplate&quot;, # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
250 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
251 &quot;properties&quot;: { # The instance properties for this instance template.
252 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
253 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
254 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700255 &quot;visibleCoreCount&quot;: 42, # The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance&#x27;s nominal CPU count and the underlying platform&#x27;s SMT width.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800256 },
257 &quot;canIpForward&quot;: True or False, # Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.
258 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options. # Specifies the Confidential Instance options.
259 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
260 },
261 &quot;description&quot;: &quot;A String&quot;, # An optional text description for the instances that are created from these properties.
262 &quot;disks&quot;: [ # An array of disks that are associated with the instances that are created from these properties.
263 { # An instance-attached disk resource.
264 &quot;autoDelete&quot;: True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
265 &quot;boot&quot;: True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
266 &quot;deviceName&quot;: &quot;A String&quot;, # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
267 #
268 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
269 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
270 #
271 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
272 #
273 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
274 #
275 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
276 #
277 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
278 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
279 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
280 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
281 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700282 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800283 # The key must meet the following requirements before you can provide it to Compute Engine:
284 # - The key is wrapped using a RSA public key certificate provided by Google.
285 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
286 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
287 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
288 },
289 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
290 &quot;forceAttach&quot;: True or False, # [Input Only] Whether to force attach the regional disk even if it&#x27;s currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
291 &quot;guestOsFeatures&quot;: [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
292 { # Guest OS features.
293 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
294 },
295 ],
296 &quot;index&quot;: 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
297 &quot;initializeParams&quot;: { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
298 #
299 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
300 #
301 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
302 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
303 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
304 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
305 &quot;diskType&quot;: &quot;A String&quot;, # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
306 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800309 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
310 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
311 # - projects/project/zones/zone/diskTypes/diskType
312 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
313 &quot;guestOsFeatures&quot;: [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800315 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
316 { # Guest OS features.
317 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
318 },
319 ],
320 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
321 &quot;a_key&quot;: &quot;A String&quot;,
322 },
323 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
324 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
325 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
326 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
327 &quot;A String&quot;,
328 ],
329 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
330 &quot;A String&quot;,
331 ],
332 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800334 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
335 # projects/debian-cloud/global/images/family/debian-9
336 #
337 #
338 # Alternatively, use a specific version of a public operating system image:
339 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
340 #
341 #
342 # To create a disk with a custom image that you created, specify the image name in the following format:
343 # global/images/my-custom-image
344 #
345 #
346 # You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
347 # global/images/family/my-image-family
348 #
349 #
350 # If the source image is deleted later, this field will not be set.
351 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
352 #
353 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
Bu Sun Kim65020912020-05-20 12:08:20 -0700354 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
355 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
356 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
357 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700358 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 # The key must meet the following requirements before you can provide it to Compute Engine:
360 # - The key is wrapped using a RSA public key certificate provided by Google.
361 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
362 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
363 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
364 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800365 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800367 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
368 # global/snapshots/my-backup
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800370 #
371 # If the source snapshot is deleted later, this field will not be set.
372 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
373 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
374 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
375 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
376 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700377 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800378 # The key must meet the following requirements before you can provide it to Compute Engine:
379 # - The key is wrapped using a RSA public key certificate provided by Google.
380 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
381 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
382 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700383 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800384 },
385 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
386 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
387 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
388 &quot;A String&quot;,
389 ],
390 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
391 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
392 &quot;shieldedInstanceInitialState&quot;: { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
393 &quot;dbs&quot;: [ # The Key Database (db).
394 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700395 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
396 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700397 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700398 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800399 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
400 {
401 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
402 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
403 },
404 ],
405 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
406 {
407 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
408 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
409 },
410 ],
411 &quot;pk&quot;: { # The Platform Key (PK).
412 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
413 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
414 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700415 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800416 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800418 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
419 #
420 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
421 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
422 &quot;userLicenses&quot;: [ # [Output Only] A list of user provided licenses. It represents a list of URLs to the license resource. Unlike regular licenses, user provided licenses can be modified after the disk is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 &quot;A String&quot;,
424 ],
425 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800426 ],
427 &quot;displayDevice&quot;: { # A set of Display Device options # Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer
428 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
429 },
430 &quot;guestAccelerators&quot;: [ # A list of guest accelerator cards&#x27; type and count to use for instances created from these properties.
431 { # A specification of the type and number of accelerator cards attached to the instance.
432 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
433 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
434 },
435 ],
436 &quot;labels&quot;: { # Labels to apply to instances that are created from these properties.
437 &quot;a_key&quot;: &quot;A String&quot;,
438 },
439 &quot;machineType&quot;: &quot;A String&quot;, # The machine type to use for instances that are created from these properties.
440 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
441 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
442 #
443 # To see the latest fingerprint, make a get() request to retrieve the resource.
444 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
445 {
446 &quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
447 &quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
448 },
449 ],
450 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
451 },
452 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;. For more information, read Specifying a Minimum CPU Platform.
453 &quot;networkInterfaces&quot;: [ # An array of network access configurations for this interface.
454 { # A network interface resource attached to an instance.
455 &quot;accessConfigs&quot;: [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
456 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
457 &quot;externalIpv6&quot;: &quot;A String&quot;, # [Output Only] The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. The field is output only, an IPv6 address from a subnetwork associated with the instance will be allocated dynamically.
458 &quot;externalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the external IPv6 range.
459 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
460 &quot;name&quot;: &quot;A String&quot;, # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
461 &quot;natIP&quot;: &quot;A String&quot;, # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
462 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
463 #
464 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
465 #
466 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
467 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
468 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
469 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
470 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
471 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
472 },
473 ],
474 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
475 { # An alias IP range attached to an instance&#x27;s network interface.
476 &quot;ipCidrRange&quot;: &quot;A String&quot;, # The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
477 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
478 },
479 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700480 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800481 &quot;internalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the primary internal IPv6 range.
482 &quot;ipv6AccessConfigs&quot;: [ # An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access.
483 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
484 &quot;externalIpv6&quot;: &quot;A String&quot;, # [Output Only] The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. The field is output only, an IPv6 address from a subnetwork associated with the instance will be allocated dynamically.
485 &quot;externalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the external IPv6 range.
486 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
487 &quot;name&quot;: &quot;A String&quot;, # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
488 &quot;natIP&quot;: &quot;A String&quot;, # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
489 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
490 #
491 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
492 #
493 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
494 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
495 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
496 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
497 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
498 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
499 },
500 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800501 &quot;ipv6AccessType&quot;: &quot;A String&quot;, # [Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork.
502 #
503 # Valid only if stackType is IPV4_IPV6.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800504 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
505 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
506 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
507 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
508 #
509 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
510 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
511 # - projects/project/global/networks/network
512 # - global/networks/default
513 &quot;networkIP&quot;: &quot;A String&quot;, # An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
514 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
515 &quot;queueCount&quot;: 42, # The networking queue count that&#x27;s specified by users for the network interface. Both Rx and Tx queues will be set to this number. It&#x27;ll be empty if not specified by the users.
516 &quot;stackType&quot;: &quot;A String&quot;, # The stack type for this network interface to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used.
517 #
518 # This field can be both set at instance creation and update network interface operations.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800519 &quot;subinterfaces&quot;: [ # SubInterfaces help enable L2 communication for the instance over subnetworks that support L2. Every network interface will get a default untagged (vlan not specified) subinterface. Users can specify additional tagged subinterfaces which are sub-fields to the Network Interface.
520 {
521 &quot;ipAddress&quot;: &quot;A String&quot;, # An IPv4 internal IP address to assign to the instance for this subinterface.
522 &quot;subnetwork&quot;: &quot;A String&quot;, # If specified, this subnetwork must belong to the same network as that of the network interface. If not specified the subnet of network interface will be used. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
523 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
524 # - regions/region/subnetworks/subnetwork
525 &quot;vlan&quot;: 42, # VLAN tag. Should match the VLAN(s) supported by the subnetwork to which this subinterface is connecting.
526 },
527 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800528 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
529 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
530 # - regions/region/subnetworks/subnetwork
531 },
532 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800533 &quot;networkPerformanceConfig&quot;: {
534 &quot;externalIpEgressBandwidthTier&quot;: &quot;A String&quot;,
535 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
536 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800537 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
538 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default.
539 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that instances can consume from.
540 &quot;consumeReservationType&quot;: &quot;A String&quot;, # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
541 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
542 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;A String&quot;,
544 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800545 },
546 &quot;resourcePolicies&quot;: [ # Resource policies (names, not ULRs) applied to instances created from these properties.
547 &quot;A String&quot;,
548 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700549 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Specifies the scheduling options for the instances that are created from these properties.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800550 &quot;automaticRestart&quot;: True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
551 #
552 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800553 &quot;availabilityDomain&quot;: 42, # Specifies the availability domain (AD), which this instance should be scheduled on. The AD belongs to the spread GroupPlacementPolicy resource policy that has been assigned to the instance. Specify a value between 1-max count of availability domains in your GroupPlacementPolicy. See go/placement-policy-extension for more details.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800554 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
555 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
556 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
557 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
558 #
559 # See go/stable-fleet-ug for more details.
560 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
561 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
562 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
563 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
564 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
565 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 &quot;A String&quot;,
567 ],
568 },
569 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800570 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
571 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
572 },
573 &quot;serviceAccounts&quot;: [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.
574 { # A service account.
575 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
576 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
Bu Sun Kim65020912020-05-20 12:08:20 -0700577 &quot;A String&quot;,
578 ],
579 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800580 ],
581 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
582 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
583 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
584 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
Bu Sun Kim65020912020-05-20 12:08:20 -0700585 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800586 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Specifies the Shielded VM options for the instances that are created from these properties.
587 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
588 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
589 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
590 },
591 &quot;tags&quot;: { # A set of instance tags. # A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
592 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
593 #
594 # To see the latest fingerprint, make get() request to the instance.
595 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
596 &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700597 ],
598 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800599 },
600 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance template. The server defines this URL.
601 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
602 &quot;sourceInstance&quot;: &quot;A String&quot;, # The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
603 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
604 # - projects/project/zones/zone/instances/instance
605 &quot;sourceInstanceParams&quot;: { # A specification of the parameters to use when creating the instance template from a source instance. # The source instance params to use to create this instance template.
606 &quot;diskConfigs&quot;: [ # Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, new custom images will be created from each disk. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
607 { # A specification of the desired way to instantiate a disk in the instance template when its created from a source instance.
608 &quot;autoDelete&quot;: True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
609 &quot;customImage&quot;: &quot;A String&quot;, # The custom source image to be used to restore this disk when instantiating this instance template.
610 &quot;deviceName&quot;: &quot;A String&quot;, # Specifies the device name of the disk to which the configurations apply to.
611 &quot;instantiateFrom&quot;: &quot;A String&quot;, # Specifies whether to include the disk and what image to use. Possible values are:
612 # - source-image: to use the same image that was used to create the source instance&#x27;s corresponding disk. Applicable to the boot disk and additional read-write disks.
613 # - source-image-family: to use the same image family that was used to create the source instance&#x27;s corresponding disk. Applicable to the boot disk and additional read-write disks.
614 # - custom-image: to use a user-provided image url for disk creation. Applicable to the boot disk and additional read-write disks.
615 # - attach-read-only: to attach a read-only disk. Applicable to read-only disks.
616 # - do-not-include: to exclude a disk from the template. Applicable to additional read-write disks, local SSDs, and read-only disks.
617 },
618 ],
619 },
620}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700621</div>
622
623<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700624 <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700625 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
626
627Args:
628 project: string, Project ID for this request. (required)
629 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700630 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631
632Returns:
633 An object of the form:
634
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800636 #
637 #
638 #
639 # 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.
640 #
641 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
642 #
643 # **JSON example:**
644 #
645 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
646 #
647 # **YAML example:**
648 #
649 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
650 #
651 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
652 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
653 { # 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.
654 #
655 # 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.
656 #
657 # Example Policy with multiple AuditConfigs:
658 #
659 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
660 #
661 # 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.
662 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
663 { # Provides the configuration for logging a type of permissions. Example:
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800665 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim65020912020-05-20 12:08:20 -0700666 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800667 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
668 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
669 &quot;A String&quot;,
670 ],
671 &quot;ignoreChildExemptions&quot;: True or False,
672 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800674 ],
675 &quot;exemptedMembers&quot;: [
676 &quot;A String&quot;,
677 ],
678 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
679 },
680 ],
681 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
682 { # Associates `members` with a `role`.
683 &quot;bindingId&quot;: &quot;A String&quot;,
684 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
685 #
686 # If the condition evaluates to `true`, then this binding applies to the current request.
687 #
688 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
689 #
690 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
691 #
692 # Example (Comparison):
693 #
694 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
695 #
696 # Example (Equality):
697 #
698 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
699 #
700 # Example (Logic):
701 #
702 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
703 #
704 # Example (Data Manipulation):
705 #
706 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
707 #
708 # 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.
709 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
710 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
711 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
712 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800714 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
715 #
716 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
717 #
718 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
719 #
720 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
721 #
722 #
723 #
724 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
725 #
726 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
727 #
728 # * `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.
729 #
730 # * `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.
731 #
732 # * `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.
733 #
734 #
735 #
736 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
737 &quot;A String&quot;,
738 ],
739 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
740 },
741 ],
742 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
743 #
744 # **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.
745 &quot;iamOwned&quot;: True or False,
746 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
747 { # A rule to be applied in a Policy.
748 &quot;action&quot;: &quot;A String&quot;, # Required
749 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
750 { # A condition to be met.
751 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
752 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
753 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
754 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
755 &quot;values&quot;: [ # The objects of the condition.
756 &quot;A String&quot;,
757 ],
758 },
759 ],
760 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
761 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
762 &quot;A String&quot;,
763 ],
764 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
765 { # Specifies what kind of log the caller must write
766 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
767 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
768 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
769 },
770 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim65020912020-05-20 12:08:20 -0700771 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800772 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
773 #
774 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
775 #
776 # Field names correspond to IAM request parameters and field values are their respective values.
777 #
778 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
779 #
780 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
781 &quot;customFields&quot;: [ # Custom fields.
782 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
783 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
784 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800786 ],
787 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
788 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
Bu Sun Kim65020912020-05-20 12:08:20 -0700789 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800790 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
791 &quot;logMode&quot;: &quot;A String&quot;,
792 },
793 },
794 ],
795 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
796 &quot;A String&quot;,
797 ],
798 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
799 &quot;A String&quot;,
800 ],
801 },
802 ],
803 &quot;version&quot;: 42, # Specifies the format of the policy.
804 #
805 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
806 #
807 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
808 #
809 # * 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
810 #
811 # **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.
812 #
813 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
814 #
815 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
816}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817</div>
818
819<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700820 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700821 <pre>Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.
822
823Args:
824 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700825 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700826 The object takes the form of:
827
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828{ # Represents an Instance Template resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700829 #
830 # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for {$api_version}.instanceTemplates ==)
831 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
832 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
833 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance template. The server defines this identifier.
834 &quot;kind&quot;: &quot;compute#instanceTemplate&quot;, # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
835 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
836 &quot;properties&quot;: { # The instance properties for this instance template.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700837 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
838 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
839 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700840 &quot;visibleCoreCount&quot;: 42, # The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance&#x27;s nominal CPU count and the underlying platform&#x27;s SMT width.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700841 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700842 &quot;canIpForward&quot;: True or False, # Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options. # Specifies the Confidential Instance options.
844 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700846 &quot;description&quot;: &quot;A String&quot;, # An optional text description for the instances that are created from these properties.
847 &quot;disks&quot;: [ # An array of disks that are associated with the instances that are created from these properties.
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 { # An instance-attached disk resource.
849 &quot;autoDelete&quot;: True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
850 &quot;boot&quot;: True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
851 &quot;deviceName&quot;: &quot;A String&quot;, # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700852 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700853 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700854 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700855 #
856 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
857 #
858 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
859 #
860 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
861 #
862 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
863 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
864 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
865 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
866 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700867 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 # The key must meet the following requirements before you can provide it to Compute Engine:
869 # - The key is wrapped using a RSA public key certificate provided by Google.
870 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
871 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
872 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
873 },
874 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700875 &quot;forceAttach&quot;: True or False, # [Input Only] Whether to force attach the regional disk even if it&#x27;s currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 &quot;guestOsFeatures&quot;: [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
877 { # Guest OS features.
878 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
879 },
880 ],
881 &quot;index&quot;: 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
882 &quot;initializeParams&quot;: { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
883 #
884 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
885 #
886 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
887 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
888 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
889 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
890 &quot;diskType&quot;: &quot;A String&quot;, # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
891 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700892 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700893 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
895 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
896 # - projects/project/zones/zone/diskTypes/diskType
897 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
898 &quot;guestOsFeatures&quot;: [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700899 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
901 { # Guest OS features.
902 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
903 },
904 ],
905 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
906 &quot;a_key&quot;: &quot;A String&quot;,
907 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700908 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700909 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700910 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
912 &quot;A String&quot;,
913 ],
914 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
915 &quot;A String&quot;,
916 ],
917 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
918 #
919 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
920 # projects/debian-cloud/global/images/family/debian-9
921 #
922 #
923 # Alternatively, use a specific version of a public operating system image:
924 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
925 #
926 #
927 # To create a disk with a custom image that you created, specify the image name in the following format:
928 # global/images/my-custom-image
929 #
930 #
931 # You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
932 # global/images/family/my-image-family
933 #
934 #
935 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700936 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 #
938 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
939 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
940 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
941 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
942 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700943 #
944 # The key must meet the following requirements before you can provide it to Compute Engine:
945 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700946 # - 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 -0700947 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700949 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700950 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700951 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700952 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
953 # global/snapshots/my-backup
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700954 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700955 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700957 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
959 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
960 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
961 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700963 # The key must meet the following requirements before you can provide it to Compute Engine:
964 # - The key is wrapped using a RSA public key certificate provided by Google.
965 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
966 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
967 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700968 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700969 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700970 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
971 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
972 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
973 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700974 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
976 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
977 &quot;shieldedInstanceInitialState&quot;: { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
978 &quot;dbs&quot;: [ # The Key Database (db).
979 {
980 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
981 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
982 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400983 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
985 {
986 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
987 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
988 },
989 ],
990 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
991 {
992 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
993 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
994 },
995 ],
996 &quot;pk&quot;: { # The Platform Key (PK).
997 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
998 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700999 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001000 },
1001 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001002 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1004 #
1005 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
1006 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001007 &quot;userLicenses&quot;: [ # [Output Only] A list of user provided licenses. It represents a list of URLs to the license resource. Unlike regular licenses, user provided licenses can be modified after the disk is created.
1008 &quot;A String&quot;,
1009 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001010 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001011 ],
1012 &quot;displayDevice&quot;: { # A set of Display Device options # Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer
1013 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001014 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001015 &quot;guestAccelerators&quot;: [ # A list of guest accelerator cards&#x27; type and count to use for instances created from these properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 { # A specification of the type and number of accelerator cards attached to the instance.
1017 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1018 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
1019 },
1020 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001021 &quot;labels&quot;: { # Labels to apply to instances that are created from these properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;a_key&quot;: &quot;A String&quot;,
1023 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001024 &quot;machineType&quot;: &quot;A String&quot;, # The machine type to use for instances that are created from these properties.
1025 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
1027 #
1028 # To see the latest fingerprint, make a get() request to retrieve the resource.
1029 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1030 {
1031 &quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
1032 &quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
1033 },
1034 ],
1035 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1036 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001037 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;. For more information, read Specifying a Minimum CPU Platform.
Bu Sun Kim65020912020-05-20 12:08:20 -07001038 &quot;networkInterfaces&quot;: [ # An array of network access configurations for this interface.
1039 { # A network interface resource attached to an instance.
1040 &quot;accessConfigs&quot;: [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
1041 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001042 &quot;externalIpv6&quot;: &quot;A String&quot;, # [Output Only] The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. The field is output only, an IPv6 address from a subnetwork associated with the instance will be allocated dynamically.
1043 &quot;externalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the external IPv6 range.
Bu Sun Kim65020912020-05-20 12:08:20 -07001044 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1045 &quot;name&quot;: &quot;A String&quot;, # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
1046 &quot;natIP&quot;: &quot;A String&quot;, # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
1047 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1048 #
1049 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1050 #
1051 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
1052 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
1053 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1054 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
1055 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
1056 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1057 },
1058 ],
1059 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
1060 { # An alias IP range attached to an instance&#x27;s network interface.
1061 &quot;ipCidrRange&quot;: &quot;A String&quot;, # The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
1062 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
1063 },
1064 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001065 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001066 &quot;internalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the primary internal IPv6 range.
1067 &quot;ipv6AccessConfigs&quot;: [ # An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access.
1068 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1069 &quot;externalIpv6&quot;: &quot;A String&quot;, # [Output Only] The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. The field is output only, an IPv6 address from a subnetwork associated with the instance will be allocated dynamically.
1070 &quot;externalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the external IPv6 range.
1071 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1072 &quot;name&quot;: &quot;A String&quot;, # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
1073 &quot;natIP&quot;: &quot;A String&quot;, # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
1074 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1075 #
1076 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1077 #
1078 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
1079 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
1080 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1081 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
1082 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
1083 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1084 },
1085 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001086 &quot;ipv6AccessType&quot;: &quot;A String&quot;, # [Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork.
1087 #
1088 # Valid only if stackType is IPV4_IPV6.
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1090 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1091 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
1092 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
1093 #
1094 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1095 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1096 # - projects/project/global/networks/network
1097 # - global/networks/default
1098 &quot;networkIP&quot;: &quot;A String&quot;, # An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001099 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
1100 &quot;queueCount&quot;: 42, # The networking queue count that&#x27;s specified by users for the network interface. Both Rx and Tx queues will be set to this number. It&#x27;ll be empty if not specified by the users.
1101 &quot;stackType&quot;: &quot;A String&quot;, # The stack type for this network interface to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used.
1102 #
1103 # This field can be both set at instance creation and update network interface operations.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001104 &quot;subinterfaces&quot;: [ # SubInterfaces help enable L2 communication for the instance over subnetworks that support L2. Every network interface will get a default untagged (vlan not specified) subinterface. Users can specify additional tagged subinterfaces which are sub-fields to the Network Interface.
1105 {
1106 &quot;ipAddress&quot;: &quot;A String&quot;, # An IPv4 internal IP address to assign to the instance for this subinterface.
1107 &quot;subnetwork&quot;: &quot;A String&quot;, # If specified, this subnetwork must belong to the same network as that of the network interface. If not specified the subnet of network interface will be used. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
1108 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1109 # - regions/region/subnetworks/subnetwork
1110 &quot;vlan&quot;: 42, # VLAN tag. Should match the VLAN(s) supported by the subnetwork to which this subinterface is connecting.
1111 },
1112 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001113 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
1114 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1115 # - regions/region/subnetworks/subnetwork
1116 },
1117 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001118 &quot;networkPerformanceConfig&quot;: {
1119 &quot;externalIpEgressBandwidthTier&quot;: &quot;A String&quot;,
1120 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
1121 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001122 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001123 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default.
1124 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that instances can consume from.
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &quot;consumeReservationType&quot;: &quot;A String&quot;, # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
1126 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1127 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1128 &quot;A String&quot;,
1129 ],
1130 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001131 &quot;resourcePolicies&quot;: [ # Resource policies (names, not ULRs) applied to instances created from these properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 &quot;A String&quot;,
1133 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001134 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Specifies the scheduling options for the instances that are created from these properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07001135 &quot;automaticRestart&quot;: True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
1136 #
1137 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001138 &quot;availabilityDomain&quot;: 42, # Specifies the availability domain (AD), which this instance should be scheduled on. The AD belongs to the spread GroupPlacementPolicy resource policy that has been assigned to the instance. Specify a value between 1-max count of availability domains in your GroupPlacementPolicy. See go/placement-policy-extension for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -07001139 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
1140 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001141 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001142 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
1143 #
1144 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1146 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1147 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1148 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1149 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
1150 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1151 &quot;A String&quot;,
1152 ],
1153 },
1154 ],
1155 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001156 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001158 &quot;serviceAccounts&quot;: [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07001159 { # A service account.
1160 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1161 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1162 &quot;A String&quot;,
1163 ],
1164 },
1165 ],
1166 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1167 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1168 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1169 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1170 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001171 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Specifies the Shielded VM options for the instances that are created from these properties.
Bu Sun Kim65020912020-05-20 12:08:20 -07001172 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
1173 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
1174 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
1175 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001176 &quot;tags&quot;: { # A set of instance tags. # A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
Bu Sun Kim65020912020-05-20 12:08:20 -07001177 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
1178 #
1179 # To see the latest fingerprint, make get() request to the instance.
1180 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1181 &quot;A String&quot;,
1182 ],
1183 },
1184 },
1185 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance template. The server defines this URL.
1186 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1187 &quot;sourceInstance&quot;: &quot;A String&quot;, # The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
1188 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
1189 # - projects/project/zones/zone/instances/instance
1190 &quot;sourceInstanceParams&quot;: { # A specification of the parameters to use when creating the instance template from a source instance. # The source instance params to use to create this instance template.
1191 &quot;diskConfigs&quot;: [ # Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, new custom images will be created from each disk. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
1192 { # A specification of the desired way to instantiate a disk in the instance template when its created from a source instance.
1193 &quot;autoDelete&quot;: True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
1194 &quot;customImage&quot;: &quot;A String&quot;, # The custom source image to be used to restore this disk when instantiating this instance template.
1195 &quot;deviceName&quot;: &quot;A String&quot;, # Specifies the device name of the disk to which the configurations apply to.
1196 &quot;instantiateFrom&quot;: &quot;A String&quot;, # Specifies whether to include the disk and what image to use. Possible values are:
1197 # - source-image: to use the same image that was used to create the source instance&#x27;s corresponding disk. Applicable to the boot disk and additional read-write disks.
1198 # - source-image-family: to use the same image family that was used to create the source instance&#x27;s corresponding disk. Applicable to the boot disk and additional read-write disks.
1199 # - custom-image: to use a user-provided image url for disk creation. Applicable to the boot disk and additional read-write disks.
1200 # - attach-read-only: to attach a read-only disk. Applicable to read-only disks.
1201 # - do-not-include: to exclude a disk from the template. Applicable to additional read-write disks, local SSDs, and read-only disks.
1202 },
1203 ],
1204 },
1205}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001206
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 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.
1208
1209For 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.
1210
1211The 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 -07001212
1213Returns:
1214 An object of the form:
1215
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001216 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001217 #
1218 # Google Compute Engine has three Operation resources:
1219 #
1220 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1221 #
1222 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1223 #
1224 # Operations can be global, regional or zonal.
1225 # - For global operations, use the `globalOperations` resource.
1226 # - For regional operations, use the `regionOperations` resource.
1227 # - For zonal operations, use the `zonalOperations` resource.
1228 #
1229 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1230 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1231 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1232 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1233 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1234 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1235 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001236 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001237 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1238 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1239 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001240 },
1241 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001242 },
1243 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1244 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1245 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1246 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1247 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001248 &quot;metadata&quot;: { # `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. # [Output Only] Service-specific metadata attached to this operation.
1249 #
1250 # Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.
1251 #
1252 # Example 1: Pack and unpack a message in C++.
1253 #
1254 # Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&amp;foo)) { ... }
1255 #
1256 # Example 2: Pack and unpack a message in Java.
1257 #
1258 # Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); }
1259 #
1260 # Example 3: Pack and unpack a message in Python.
1261 #
1262 # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
1263 #
1264 # Example 4: Pack and unpack a message in Go
1265 #
1266 # foo := &amp;pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &amp;pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }
1267 #
1268 # The pack methods provided by protobuf library will by default use &#x27;type.googleapis.com/full.type.name&#x27; as the type URL and the unpack methods only use the fully qualified type name after the last &#x27;/&#x27; in the type URL, for example &quot;foo.bar.com/x/y.z&quot; will yield type name &quot;y.z&quot;.
1269 #
1270 #
1271 #
1272 # JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example:
1273 #
1274 # package google.profile; message Person { string first_name = 1; string last_name = 2; }
1275 #
1276 # { &quot;@type&quot;: &quot;type.googleapis.com/google.profile.Person&quot;, &quot;firstName&quot;: , &quot;lastName&quot;: }
1277 #
1278 # If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]):
1279 #
1280 # { &quot;@type&quot;: &quot;type.googleapis.com/google.protobuf.Duration&quot;, &quot;value&quot;: &quot;1.212s&quot; }
1281 &quot;typeUrl&quot;: &quot;A String&quot;, # A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one &quot;/&quot; character. The last segment of the URL&#x27;s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading &quot;.&quot; is not accepted).
1282 #
1283 # In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
1284 #
1285 # * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
1286 #
1287 # Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
1288 #
1289 # Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
1290 &quot;value&quot;: &quot;A String&quot;, # Must be a valid serialized protocol buffer of the above specified type.
1291 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001292 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001293 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001294 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1295 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1296 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1297 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1298 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1299 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1300 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1301 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1302 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1303 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1304 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1305 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1306 {
1307 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1308 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1309 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1310 {
1311 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1312 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1313 },
1314 ],
1315 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1316 },
1317 ],
1318 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1319}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001320</div>
1321
1322<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001323 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001324 <pre>Retrieves a list of instance templates that are contained within the specified project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001325
1326Args:
1327 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001328 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 -07001329
Dan O'Mearadd494642020-05-01 07:42:23 -07001330For 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 -07001331
Dan O'Mearadd494642020-05-01 07:42:23 -07001332You 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 -07001333
Bu Sun Kim65020912020-05-20 12:08:20 -07001334To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1335 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`)
1336 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1337
1338You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1339
1340Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1341 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001342 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001343
1344Returns:
1345 An object of the form:
1346
1347 { # A list of instance templates.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001348 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1349 &quot;items&quot;: [ # A list of InstanceTemplate resources.
1350 { # Represents an Instance Template resource.
1351 #
1352 # You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates. (== resource_for {$api_version}.instanceTemplates ==)
1353 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this instance template in RFC3339 text format.
1354 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1355 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this instance template. The server defines this identifier.
1356 &quot;kind&quot;: &quot;compute#instanceTemplate&quot;, # [Output Only] The resource type, which is always compute#instanceTemplate for instance templates.
1357 &quot;name&quot;: &quot;A String&quot;, # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1358 &quot;properties&quot;: { # The instance properties for this instance template.
1359 &quot;advancedMachineFeatures&quot;: { # Specifies options for controlling advanced machine features. Options that would traditionally be configured in a BIOS belong here. Features that require operating system support may have corresponding entries in the GuestOsFeatures of an Image (e.g., whether or not the OS in the Image supports nested virtualization being enabled or disabled). # Controls for advanced machine-related behavior features.
1360 &quot;enableNestedVirtualization&quot;: True or False, # Whether to enable nested virtualization or not (default is false).
1361 &quot;threadsPerCore&quot;: 42, # The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001362 &quot;visibleCoreCount&quot;: 42, # The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance&#x27;s nominal CPU count and the underlying platform&#x27;s SMT width.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001363 },
1364 &quot;canIpForward&quot;: True or False, # Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.
1365 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options. # Specifies the Confidential Instance options.
1366 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
1367 },
1368 &quot;description&quot;: &quot;A String&quot;, # An optional text description for the instances that are created from these properties.
1369 &quot;disks&quot;: [ # An array of disks that are associated with the instances that are created from these properties.
1370 { # An instance-attached disk resource.
1371 &quot;autoDelete&quot;: True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
1372 &quot;boot&quot;: True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
1373 &quot;deviceName&quot;: &quot;A String&quot;, # Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.
1374 #
1375 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
1376 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
1377 #
1378 # If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
1379 #
1380 # If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
1381 #
1382 # If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
1383 #
1384 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1385 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1386 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1387 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1388 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001389 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001390 # The key must meet the following requirements before you can provide it to Compute Engine:
1391 # - The key is wrapped using a RSA public key certificate provided by Google.
1392 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1393 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1394 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1395 },
1396 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1397 &quot;forceAttach&quot;: True or False, # [Input Only] Whether to force attach the regional disk even if it&#x27;s currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
1398 &quot;guestOsFeatures&quot;: [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
1399 { # Guest OS features.
1400 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1401 },
1402 ],
1403 &quot;index&quot;: 42, # [Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.
1404 &quot;initializeParams&quot;: { # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. # [Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.
1405 #
1406 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1407 #
1408 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1409 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1410 &quot;diskName&quot;: &quot;A String&quot;, # Specifies the disk name. If not specified, the default is to use the name of the instance. If a disk with the same name already exists in the given region, the existing disk is attached to the new instance and the new disk is not created.
1411 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB. The size must be at least 10 GB. If you specify a sourceImage, which is required for boot disks, the default size is the size of the sourceImage. If you do not specify a sourceImage, the default disk size is 500 GB.
1412 &quot;diskType&quot;: &quot;A String&quot;, # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
1413 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001415 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001416 # Other values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values:
1417 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1418 # - projects/project/zones/zone/diskTypes/diskType
1419 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
1420 &quot;guestOsFeatures&quot;: [ # A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
Bu Sun Kim65020912020-05-20 12:08:20 -07001421 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001422 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1423 { # Guest OS features.
1424 &quot;type&quot;: &quot;A String&quot;, # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1425 },
1426 ],
1427 &quot;labels&quot;: { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
1428 &quot;a_key&quot;: &quot;A String&quot;,
1429 },
1430 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
1431 &quot;onUpdateAction&quot;: &quot;A String&quot;, # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
1432 &quot;provisionedIops&quot;: &quot;A String&quot;, # Indicates how many IOPS must be provisioned for the disk.
1433 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1434 &quot;A String&quot;,
1435 ],
1436 &quot;resourcePolicies&quot;: [ # Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.
1437 &quot;A String&quot;,
1438 ],
1439 &quot;sourceImage&quot;: &quot;A String&quot;, # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Bu Sun Kim65020912020-05-20 12:08:20 -07001440 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001441 # To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image:
1442 # projects/debian-cloud/global/images/family/debian-9
1443 #
1444 #
1445 # Alternatively, use a specific version of a public operating system image:
1446 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1447 #
1448 #
1449 # To create a disk with a custom image that you created, specify the image name in the following format:
1450 # global/images/my-custom-image
1451 #
1452 #
1453 # You can also specify a custom image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name:
1454 # global/images/family/my-image-family
1455 #
1456 #
1457 # If the source image is deleted later, this field will not be set.
1458 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1459 #
1460 # Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys.
Bu Sun Kim65020912020-05-20 12:08:20 -07001461 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1462 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1463 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1464 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001465 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001466 # The key must meet the following requirements before you can provide it to Compute Engine:
1467 # - The key is wrapped using a RSA public key certificate provided by Google.
1468 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1469 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1470 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1471 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001472 &quot;sourceSnapshot&quot;: &quot;A String&quot;, # The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD.
Bu Sun Kim65020912020-05-20 12:08:20 -07001473 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001474 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1475 # global/snapshots/my-backup
Bu Sun Kim65020912020-05-20 12:08:20 -07001476 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001477 #
1478 # If the source snapshot is deleted later, this field will not be set.
1479 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
1480 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1481 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1482 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1483 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001484 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001485 # The key must meet the following requirements before you can provide it to Compute Engine:
1486 # - The key is wrapped using a RSA public key certificate provided by Google.
1487 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1488 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1489 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001490 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001491 },
1492 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
1493 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1494 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1495 &quot;A String&quot;,
1496 ],
1497 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1498 &quot;savedState&quot;: &quot;A String&quot;, # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
1499 &quot;shieldedInstanceInitialState&quot;: { # Initial State for shielded instance, these are public keys which are safe to store in public # [Output Only] shielded vm initial state stored on disk
1500 &quot;dbs&quot;: [ # The Key Database (db).
1501 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1503 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001504 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001505 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001506 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1507 {
1508 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1509 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1510 },
1511 ],
1512 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1513 {
1514 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1515 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1516 },
1517 ],
1518 &quot;pk&quot;: { # The Platform Key (PK).
1519 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1520 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1521 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001522 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001523 &quot;source&quot;: &quot;A String&quot;, # Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Bu Sun Kim65020912020-05-20 12:08:20 -07001524 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001525 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1526 #
1527 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
1528 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
1529 &quot;userLicenses&quot;: [ # [Output Only] A list of user provided licenses. It represents a list of URLs to the license resource. Unlike regular licenses, user provided licenses can be modified after the disk is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001530 &quot;A String&quot;,
1531 ],
1532 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001533 ],
1534 &quot;displayDevice&quot;: { # A set of Display Device options # Display Device properties to enable support for remote display products like: Teradici, VNC and TeamViewer
1535 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1536 },
1537 &quot;guestAccelerators&quot;: [ # A list of guest accelerator cards&#x27; type and count to use for instances created from these properties.
1538 { # A specification of the type and number of accelerator cards attached to the instance.
1539 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1540 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
1541 },
1542 ],
1543 &quot;labels&quot;: { # Labels to apply to instances that are created from these properties.
1544 &quot;a_key&quot;: &quot;A String&quot;,
1545 },
1546 &quot;machineType&quot;: &quot;A String&quot;, # The machine type to use for instances that are created from these properties.
1547 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.
1548 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
1549 #
1550 # To see the latest fingerprint, make a get() request to retrieve the resource.
1551 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1552 {
1553 &quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
1554 &quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
1555 },
1556 ],
1557 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1558 },
1559 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;. For more information, read Specifying a Minimum CPU Platform.
1560 &quot;networkInterfaces&quot;: [ # An array of network access configurations for this interface.
1561 { # A network interface resource attached to an instance.
1562 &quot;accessConfigs&quot;: [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
1563 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1564 &quot;externalIpv6&quot;: &quot;A String&quot;, # [Output Only] The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. The field is output only, an IPv6 address from a subnetwork associated with the instance will be allocated dynamically.
1565 &quot;externalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the external IPv6 range.
1566 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1567 &quot;name&quot;: &quot;A String&quot;, # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
1568 &quot;natIP&quot;: &quot;A String&quot;, # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
1569 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1570 #
1571 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1572 #
1573 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
1574 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
1575 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1576 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
1577 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
1578 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1579 },
1580 ],
1581 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
1582 { # An alias IP range attached to an instance&#x27;s network interface.
1583 &quot;ipCidrRange&quot;: &quot;A String&quot;, # The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
1584 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
1585 },
1586 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001587 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface. The request will fail with error 400 Bad Request if the fingerprint is not provided, or 412 Precondition Failed if the fingerprint is out of date.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001588 &quot;internalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the primary internal IPv6 range.
1589 &quot;ipv6AccessConfigs&quot;: [ # An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access.
1590 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1591 &quot;externalIpv6&quot;: &quot;A String&quot;, # [Output Only] The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength in ipv6AccessConfig. The field is output only, an IPv6 address from a subnetwork associated with the instance will be allocated dynamically.
1592 &quot;externalIpv6PrefixLength&quot;: 42, # [Output Only] The prefix length of the external IPv6 range.
1593 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1594 &quot;name&quot;: &quot;A String&quot;, # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
1595 &quot;natIP&quot;: &quot;A String&quot;, # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
1596 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1597 #
1598 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1599 #
1600 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
1601 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
1602 &quot;publicPtrDomainName&quot;: &quot;A String&quot;, # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1603 &quot;setPublicDns&quot;: True or False, # Specifies whether a public DNS &#x27;A&#x27; record should be created for the external IP address of this access configuration.
1604 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
1605 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1606 },
1607 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001608 &quot;ipv6AccessType&quot;: &quot;A String&quot;, # [Output Only] One of EXTERNAL, INTERNAL to indicate whether the IP can be accessed from the Internet. This field is always inherited from its subnetwork.
1609 #
1610 # Valid only if stackType is IPV4_IPV6.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001611 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1612 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1613 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
1614 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
1615 #
1616 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1617 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1618 # - projects/project/global/networks/network
1619 # - global/networks/default
1620 &quot;networkIP&quot;: &quot;A String&quot;, # An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
1621 &quot;nicType&quot;: &quot;A String&quot;, # The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
1622 &quot;queueCount&quot;: 42, # The networking queue count that&#x27;s specified by users for the network interface. Both Rx and Tx queues will be set to this number. It&#x27;ll be empty if not specified by the users.
1623 &quot;stackType&quot;: &quot;A String&quot;, # The stack type for this network interface to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used.
1624 #
1625 # This field can be both set at instance creation and update network interface operations.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001626 &quot;subinterfaces&quot;: [ # SubInterfaces help enable L2 communication for the instance over subnetworks that support L2. Every network interface will get a default untagged (vlan not specified) subinterface. Users can specify additional tagged subinterfaces which are sub-fields to the Network Interface.
1627 {
1628 &quot;ipAddress&quot;: &quot;A String&quot;, # An IPv4 internal IP address to assign to the instance for this subinterface.
1629 &quot;subnetwork&quot;: &quot;A String&quot;, # If specified, this subnetwork must belong to the same network as that of the network interface. If not specified the subnet of network interface will be used. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
1630 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1631 # - regions/region/subnetworks/subnetwork
1632 &quot;vlan&quot;: 42, # VLAN tag. Should match the VLAN(s) supported by the subnetwork to which this subinterface is connecting.
1633 },
1634 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001635 &quot;subnetwork&quot;: &quot;A String&quot;, # The URL of the Subnetwork resource for this instance. If the network resource is in legacy mode, do not specify this field. If the network is in auto subnet mode, specifying the subnetwork is optional. If the network is in custom subnet mode, specifying the subnetwork is required. If you specify this field, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs:
1636 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1637 # - regions/region/subnetworks/subnetwork
1638 },
1639 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001640 &quot;networkPerformanceConfig&quot;: {
1641 &quot;externalIpEgressBandwidthTier&quot;: &quot;A String&quot;,
1642 &quot;totalEgressBandwidthTier&quot;: &quot;A String&quot;,
1643 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001644 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # PostKeyRevocationActionType of the instance.
1645 &quot;privateIpv6GoogleAccess&quot;: &quot;A String&quot;, # The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default.
1646 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that instances can consume from.
1647 &quot;consumeReservationType&quot;: &quot;A String&quot;, # Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
1648 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1649 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001650 &quot;A String&quot;,
1651 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001652 },
1653 &quot;resourcePolicies&quot;: [ # Resource policies (names, not ULRs) applied to instances created from these properties.
1654 &quot;A String&quot;,
1655 ],
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001656 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 20 # Specifies the scheduling options for the instances that are created from these properties.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001657 &quot;automaticRestart&quot;: True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
1658 #
1659 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001660 &quot;availabilityDomain&quot;: 42, # Specifies the availability domain (AD), which this instance should be scheduled on. The AD belongs to the spread GroupPlacementPolicy resource policy that has been assigned to the instance. Specify a value between 1-max count of availability domains in your GroupPlacementPolicy. See go/placement-policy-extension for more details.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001661 &quot;latencyTolerant&quot;: True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
1662 &quot;locationHint&quot;: &quot;A String&quot;, # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
1663 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
1664 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
1665 #
1666 # See go/stable-fleet-ug for more details.
1667 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1668 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1669 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1670 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1671 &quot;operator&quot;: &quot;A String&quot;, # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
1672 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001673 &quot;A String&quot;,
1674 ],
1675 },
1676 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001677 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
1678 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
1679 },
1680 &quot;serviceAccounts&quot;: [ # A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.
1681 { # A service account.
1682 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1683 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
Bu Sun Kim65020912020-05-20 12:08:20 -07001684 &quot;A String&quot;,
1685 ],
1686 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001687 ],
1688 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1689 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1690 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1691 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001692 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001693 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options. # Specifies the Shielded VM options for the instances that are created from these properties.
1694 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
1695 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
1696 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
1697 },
1698 &quot;tags&quot;: { # A set of instance tags. # A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.
1699 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the tags&#x27; contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
1700 #
1701 # To see the latest fingerprint, make get() request to the instance.
1702 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1703 &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001704 ],
1705 },
1706 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001707 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this instance template. The server defines this URL.
1708 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1709 &quot;sourceInstance&quot;: &quot;A String&quot;, # The source instance used to create the template. You can provide this as a partial or full URL to the resource. For example, the following are valid values:
1710 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
1711 # - projects/project/zones/zone/instances/instance
1712 &quot;sourceInstanceParams&quot;: { # A specification of the parameters to use when creating the instance template from a source instance. # The source instance params to use to create this instance template.
1713 &quot;diskConfigs&quot;: [ # Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, new custom images will be created from each disk. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
1714 { # A specification of the desired way to instantiate a disk in the instance template when its created from a source instance.
1715 &quot;autoDelete&quot;: True or False, # Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
1716 &quot;customImage&quot;: &quot;A String&quot;, # The custom source image to be used to restore this disk when instantiating this instance template.
1717 &quot;deviceName&quot;: &quot;A String&quot;, # Specifies the device name of the disk to which the configurations apply to.
1718 &quot;instantiateFrom&quot;: &quot;A String&quot;, # Specifies whether to include the disk and what image to use. Possible values are:
1719 # - source-image: to use the same image that was used to create the source instance&#x27;s corresponding disk. Applicable to the boot disk and additional read-write disks.
1720 # - source-image-family: to use the same image family that was used to create the source instance&#x27;s corresponding disk. Applicable to the boot disk and additional read-write disks.
1721 # - custom-image: to use a user-provided image url for disk creation. Applicable to the boot disk and additional read-write disks.
1722 # - attach-read-only: to attach a read-only disk. Applicable to read-only disks.
1723 # - do-not-include: to exclude a disk from the template. Applicable to additional read-write disks, local SSDs, and read-only disks.
1724 },
1725 ],
1726 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001727 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001728 ],
1729 &quot;kind&quot;: &quot;compute#instanceTemplateList&quot;, # [Output Only] The resource type, which is always compute#instanceTemplatesListResponse for instance template lists.
1730 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1731 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1732 &quot;warning&quot;: { # [Output Only] Informational warning message.
1733 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1734 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1735 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1736 {
1737 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1738 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1739 },
1740 ],
1741 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1742 },
1743}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001744</div>
1745
1746<div class="method">
1747 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1748 <pre>Retrieves the next page of results.
1749
1750Args:
1751 previous_request: The request for the previous page. (required)
1752 previous_response: The response from the request for the previous page. (required)
1753
1754Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001755 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001756 page. Returns None if there are no more items in the collection.
1757 </pre>
1758</div>
1759
1760<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001761 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001762 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
1763
1764Args:
1765 project: string, Project ID for this request. (required)
1766 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001767 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001768 The object takes the form of:
1769
1770{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001771 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
1772 { # Associates `members` with a `role`.
1773 &quot;bindingId&quot;: &quot;A String&quot;,
1774 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
Bu Sun Kim65020912020-05-20 12:08:20 -07001775 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001776 # If the condition evaluates to `true`, then this binding applies to the current request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001777 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001778 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
Bu Sun Kim65020912020-05-20 12:08:20 -07001779 #
1780 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001781 #
1782 # Example (Comparison):
1783 #
1784 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1785 #
1786 # Example (Equality):
1787 #
1788 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1789 #
1790 # Example (Logic):
1791 #
1792 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1793 #
1794 # Example (Data Manipulation):
1795 #
1796 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1797 #
1798 # 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.
1799 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1800 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1801 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1802 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1803 },
1804 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1805 #
1806 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1807 #
1808 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1809 #
1810 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1811 #
1812 #
1813 #
1814 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1815 #
1816 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1817 #
1818 # * `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.
1819 #
1820 # * `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.
1821 #
1822 # * `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.
1823 #
1824 #
1825 #
1826 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1827 &quot;A String&quot;,
1828 ],
1829 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001830 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001831 ],
1832 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
1833 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001834 #
1835 #
1836 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001837 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001838 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001839 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001840 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001841 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001842 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001843 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001844 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001845 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001846 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001847 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001848 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001849 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001850 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001851 { # 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.
1852 #
1853 # 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.
1854 #
1855 # Example Policy with multiple AuditConfigs:
1856 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001857 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001858 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001859 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001860 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001861 { # Provides the configuration for logging a type of permissions. Example:
1862 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001863 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001864 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1866 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1867 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001868 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001869 &quot;ignoreChildExemptions&quot;: True or False,
1870 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001871 },
1872 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001873 &quot;exemptedMembers&quot;: [
1874 &quot;A String&quot;,
1875 ],
1876 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001877 },
1878 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001879 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001880 { # Associates `members` with a `role`.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -08001881 &quot;bindingId&quot;: &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -07001882 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1883 #
1884 # If the condition evaluates to `true`, then this binding applies to the current request.
1885 #
1886 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1887 #
1888 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1889 #
1890 # Example (Comparison):
1891 #
1892 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1893 #
1894 # Example (Equality):
1895 #
1896 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1897 #
1898 # Example (Logic):
1899 #
1900 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1901 #
1902 # Example (Data Manipulation):
1903 #
1904 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1905 #
1906 # 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.
1907 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1908 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1909 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1910 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1911 },
1912 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001913 #
1914 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1915 #
1916 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1917 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001918 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001919 #
1920 #
1921 #
1922 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1923 #
1924 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1925 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001926 # * `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.
1927 #
1928 # * `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.
1929 #
1930 # * `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.
1931 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001932 #
1933 #
1934 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001935 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001936 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001937 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001938 },
1939 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001940 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1941 #
1942 # **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.
1943 &quot;iamOwned&quot;: True or False,
1944 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1945 { # A rule to be applied in a Policy.
1946 &quot;action&quot;: &quot;A String&quot;, # Required
1947 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1948 { # A condition to be met.
1949 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1950 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1951 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1952 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1953 &quot;values&quot;: [ # The objects of the condition.
1954 &quot;A String&quot;,
1955 ],
1956 },
1957 ],
1958 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1959 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1960 &quot;A String&quot;,
1961 ],
1962 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1963 { # Specifies what kind of log the caller must write
1964 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1965 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1966 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1967 },
1968 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1969 },
1970 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1971 #
1972 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1973 #
1974 # Field names correspond to IAM request parameters and field values are their respective values.
1975 #
1976 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1977 #
1978 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1979 &quot;customFields&quot;: [ # Custom fields.
1980 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1981 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1982 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1983 },
1984 ],
1985 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1986 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1987 },
1988 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1989 &quot;logMode&quot;: &quot;A String&quot;,
1990 },
1991 },
1992 ],
1993 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1994 &quot;A String&quot;,
1995 ],
1996 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1997 &quot;A String&quot;,
1998 ],
1999 },
2000 ],
2001 &quot;version&quot;: 42, # Specifies the format of the policy.
2002 #
2003 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2004 #
2005 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2006 #
2007 # * 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
2008 #
2009 # **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.
2010 #
2011 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2012 #
2013 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002014 },
2015}
2016
2017
2018Returns:
2019 An object of the form:
2020
2021 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
2022 #
2023 #
2024 #
2025 # 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.
2026 #
2027 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2028 #
2029 # **JSON example:**
2030 #
2031 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
2032 #
2033 # **YAML example:**
2034 #
2035 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
2036 #
2037 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
2038 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2039 { # 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.
2040 #
2041 # 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.
2042 #
2043 # Example Policy with multiple AuditConfigs:
2044 #
2045 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
2046 #
2047 # 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.
2048 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2049 { # Provides the configuration for logging a type of permissions. Example:
2050 #
2051 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
2052 #
2053 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2054 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2055 &quot;A String&quot;,
2056 ],
2057 &quot;ignoreChildExemptions&quot;: True or False,
2058 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2059 },
2060 ],
2061 &quot;exemptedMembers&quot;: [
2062 &quot;A String&quot;,
2063 ],
2064 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
2065 },
2066 ],
2067 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
2068 { # Associates `members` with a `role`.
2069 &quot;bindingId&quot;: &quot;A String&quot;,
2070 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
2071 #
2072 # If the condition evaluates to `true`, then this binding applies to the current request.
2073 #
2074 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
2075 #
2076 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2077 #
2078 # Example (Comparison):
2079 #
2080 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
2081 #
2082 # Example (Equality):
2083 #
2084 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
2085 #
2086 # Example (Logic):
2087 #
2088 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2089 #
2090 # Example (Data Manipulation):
2091 #
2092 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2093 #
2094 # 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.
2095 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2096 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2097 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2098 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
2099 },
2100 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2101 #
2102 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2103 #
2104 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2105 #
2106 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2107 #
2108 #
2109 #
2110 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2111 #
2112 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2113 #
2114 # * `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.
2115 #
2116 # * `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.
2117 #
2118 # * `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.
2119 #
2120 #
2121 #
2122 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2123 &quot;A String&quot;,
2124 ],
2125 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2126 },
2127 ],
2128 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
2129 #
2130 # **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.
2131 &quot;iamOwned&quot;: True or False,
2132 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
2133 { # A rule to be applied in a Policy.
2134 &quot;action&quot;: &quot;A String&quot;, # Required
2135 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2136 { # A condition to be met.
2137 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
2138 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
2139 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
2140 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2141 &quot;values&quot;: [ # The objects of the condition.
2142 &quot;A String&quot;,
2143 ],
2144 },
2145 ],
2146 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
2147 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
2148 &quot;A String&quot;,
2149 ],
2150 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2151 { # Specifies what kind of log the caller must write
2152 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
2153 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2154 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
2155 },
2156 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
2157 },
2158 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
2159 #
2160 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
2161 #
2162 # Field names correspond to IAM request parameters and field values are their respective values.
2163 #
2164 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
2165 #
2166 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
2167 &quot;customFields&quot;: [ # Custom fields.
2168 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2169 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2170 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
2171 },
2172 ],
2173 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2174 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
2175 },
2176 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2177 &quot;logMode&quot;: &quot;A String&quot;,
2178 },
2179 },
2180 ],
2181 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2182 &quot;A String&quot;,
2183 ],
2184 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
2185 &quot;A String&quot;,
2186 ],
2187 },
2188 ],
2189 &quot;version&quot;: 42, # Specifies the format of the policy.
2190 #
2191 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2192 #
2193 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2194 #
2195 # * 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
2196 #
2197 # **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.
2198 #
2199 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2200 #
2201 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2202}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002203</div>
2204
2205<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002206 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002207 <pre>Returns permissions that a caller has on the specified resource.
2208
2209Args:
2210 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002211 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002212 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002213 The object takes the form of:
2214
2215{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002216 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
2217 &quot;A String&quot;,
2218 ],
2219}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002220
2221
2222Returns:
2223 An object of the form:
2224
2225 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002226 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2227 &quot;A String&quot;,
2228 ],
2229}</pre>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002230</div>
2231
2232</body></html>