Skip to main content

oci_rust_sdk/core/models/
launch_instance_details.rs

1use serde::{Deserialize, Serialize};
2use std::collections::HashMap;
3
4#[allow(unused_imports)]
5use super::*;
6/// Instance launch details. Use the {@code sourceDetails} parameter to specify whether a boot volume or an image should be used to launch a new instance.
7#[derive(Debug, Clone, Serialize, Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct LaunchInstanceDetails {
10    /// The availability domain of the instance. <p> Example: {@code Uocm:PHX-AD-1}
11    pub availability_domain: String,
12
13    /// The OCID of the compartment.
14    pub compartment_id: String,
15
16    /// The OCID of the compute capacity reservation this instance is launched under. You can opt out of all default reservations by specifying an empty string as input for this field. For more information, see [Capacity Reservations](https://docs.oracle.com/iaas/Content/Compute/Tasks/reserve-capacity.htm#default).
17    #[serde(skip_serializing_if = "Option::is_none")]
18    pub capacity_reservation_id: Option<String>,
19
20    #[serde(skip_serializing_if = "Option::is_none")]
21    pub create_vnic_details: Option<CreateVnicDetails>,
22
23    /// The OCID of the dedicated virtual machine host to place the instance on.
24    #[serde(skip_serializing_if = "Option::is_none")]
25    pub dedicated_vm_host_id: Option<String>,
26
27    /// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). <p> Example: {@code {\"Operations\": {\"CostCenter\": \"42\"}}}
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub defined_tags: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
30
31    /// [Security attributes](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/zpr-artifacts.htm#security-attributes) are labels for a resource that can be referenced in a [Zero Trust Packet Routing](https://docs.oracle.com/iaas/Content/zero-trust-packet-routing/overview.htm) (ZPR) policy to control access to ZPR-supported resources. <p> Example: {@code {\"Oracle-DataSecurity-ZPR\": {\"MaxEgressCount\": {\"value\":\"42\",\"mode\":\"audit\"}}}}
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub security_attributes: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
34
35    /// A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
36    #[serde(skip_serializing_if = "Option::is_none")]
37    pub display_name: Option<String>,
38
39    /// Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the {@code metadata} object. <p> They are distinguished from {@code metadata} fields in that these can be nested JSON objects (whereas {@code metadata} fields are string/string maps only). <p> The combined size of the {@code metadata} and {@code extendedMetadata} objects can be a maximum of 32,000 bytes.
40    #[serde(skip_serializing_if = "Option::is_none")]
41    pub extended_metadata: Option<HashMap<String, serde_json::Value>>,
42
43    /// A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains. <p> If you do not specify the fault domain, the system selects one for you. <p> To get a list of fault domains, use the {@link #listFaultDomains(ListFaultDomainsRequest) listFaultDomains} operation in the Identity and Access Management Service API. <p> Example: {@code FAULT-DOMAIN-1}
44    #[serde(skip_serializing_if = "Option::is_none")]
45    pub fault_domain: Option<String>,
46
47    /// The OCID of the cluster placement group of the instance.
48    #[serde(skip_serializing_if = "Option::is_none")]
49    pub cluster_placement_group_id: Option<String>,
50
51    /// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). <p> Example: {@code {\"Department\": \"Finance\"}}
52    #[serde(skip_serializing_if = "Option::is_none")]
53    pub freeform_tags: Option<HashMap<String, String>>,
54
55    /// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the [compute cluster](https://docs.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) that the instance will be created in.
56    #[serde(skip_serializing_if = "Option::is_none")]
57    pub compute_cluster_id: Option<String>,
58
59    /// Deprecated. Instead use {@code hostnameLabel} in {@link CreateVnicDetails}. If you provide both, the values must match.
60    #[serde(skip_serializing_if = "Option::is_none")]
61    pub hostname_label: Option<String>,
62
63    /// Deprecated. Use {@code sourceDetails} with {@link #instanceSourceViaImageDetails(InstanceSourceViaImageDetailsRequest) instanceSourceViaImageDetails} source type instead. If you specify values for both, the values must match.
64    #[serde(skip_serializing_if = "Option::is_none")]
65    pub image_id: Option<String>,
66
67    /// This is an advanced option. <p> When a bare metal or virtual machine instance boots, the iPXE firmware that runs on the instance is configured to run an iPXE script to continue the boot process. <p> If you want more control over the boot process, you can provide your own custom iPXE script that will run when the instance boots. Be aware that the same iPXE script will run every time an instance boots, not only after the initial LaunchInstance call. <p> The default iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot. <p> If your instance boot volume attachment type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume attachment type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive. <p> For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see [Bring Your Own Image](https://docs.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm). <p> For more information about iPXE, see http://ipxe.org.
68    #[serde(skip_serializing_if = "Option::is_none")]
69    pub ipxe_script: Option<String>,
70
71    #[serde(skip_serializing_if = "Option::is_none")]
72    pub launch_options: Option<LaunchOptions>,
73
74    #[serde(skip_serializing_if = "Option::is_none")]
75    pub instance_options: Option<InstanceOptions>,
76
77    #[serde(skip_serializing_if = "Option::is_none")]
78    pub availability_config: Option<LaunchInstanceAvailabilityConfigDetails>,
79
80    #[serde(skip_serializing_if = "Option::is_none")]
81    pub preemptible_instance_config: Option<PreemptibleInstanceConfigDetails>,
82
83    /// Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance. <p> A metadata service runs on every launched instance. The service is an HTTP endpoint listening on 169.254.169.254. You can use the service to: <p> Provide information to [Cloud-Init](https://cloudinit.readthedocs.org/en/latest/) to be used for various system initialization tasks. <p> Get information about the instance, including the custom metadata that you provide when you launch the instance. <p> *Providing Cloud-Init Metadata** <p> You can use the following metadata key names to provide information to Cloud-Init: <p> *\"ssh_authorized_keys\"** - Provide one or more public SSH keys to be included in the {@code ~/.ssh/authorized_keys} file for the default user on the instance. Use a newline character to separate multiple keys. The SSH keys must be in the format necessary for the {@code authorized_keys} file, as shown in the example below. <p> *\"user_data\"** - Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For information about how to take advantage of user data, see the [Cloud-Init Documentation](http://cloudinit.readthedocs.org/en/latest/topics/format.html). <p> *Metadata Example** <p> \"metadata\" : { \"quake_bot_level\" : \"Severe\", \"ssh_authorized_keys\" : \"ssh-rsa <your_public_SSH_key>== rsa-key-20160227\", \"user_data\" : \"<your_public_SSH_key>==\" } **Getting Metadata on the Instance** <p> To get information about your instance, connect to the instance using SSH and issue any of the following GET requests: <p> curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/ curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/metadata/ curl -H \"Authorization: Bearer Oracle\" http://169.254.169.254/opc/v2/instance/metadata/<any-key-name> <p> You'll get back a response that includes all the instance information; only the metadata information; or the metadata information for the specified key name, respectively. <p> The combined size of the {@code metadata} and {@code extendedMetadata} objects can be a maximum of 32,000 bytes.
84    #[serde(skip_serializing_if = "Option::is_none")]
85    pub metadata: Option<HashMap<String, String>>,
86
87    #[serde(skip_serializing_if = "Option::is_none")]
88    pub agent_config: Option<LaunchInstanceAgentConfigDetails>,
89
90    /// The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance. <p> You can enumerate all available shapes by calling {@link #listShapes(ListShapesRequest) listShapes}.
91    #[serde(skip_serializing_if = "Option::is_none")]
92    pub shape: Option<String>,
93
94    #[serde(skip_serializing_if = "Option::is_none")]
95    pub shape_config: Option<LaunchInstanceShapeConfigDetails>,
96
97    #[serde(skip_serializing_if = "Option::is_none")]
98    pub source_details: Option<InstanceSourceViaImageDetails>,
99
100    /// Deprecated. Instead use {@code subnetId} in {@link CreateVnicDetails}. At least one of them is required; if you provide both, the values must match.
101    #[serde(skip_serializing_if = "Option::is_none")]
102    pub subnet_id: Option<String>,
103
104    /// Volume attachments to create as part of the launch instance operation.
105    #[serde(skip_serializing_if = "Option::is_none")]
106    pub launch_volume_attachments: Option<Vec<LaunchAttachVolumeDetails>>,
107
108    /// Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. The default value is false.
109    #[serde(skip_serializing_if = "Option::is_none")]
110    pub is_pv_encryption_in_transit_enabled: Option<bool>,
111
112    #[serde(skip_serializing_if = "Option::is_none")]
113    pub platform_config: Option<AmdRomeBmGpuLaunchInstancePlatformConfig>,
114
115    #[serde(skip_serializing_if = "Option::is_none")]
116    pub placement_constraint_details: Option<HostGroupPlacementConstraintDetails>,
117
118    /// Whether to enable AI enterprise on the instance.
119    #[serde(skip_serializing_if = "Option::is_none")]
120    pub is_aienterprise_enabled: Option<bool>,
121
122    /// The OCID of the Instance Configuration containing instance launch details. Any other fields supplied in this instance launch request will override the details stored in the Instance Configuration for this instance launch.
123    #[serde(skip_serializing_if = "Option::is_none")]
124    pub instance_configuration_id: Option<String>,
125
126    /// List of licensing configurations associated with target launch values.
127    #[serde(skip_serializing_if = "Option::is_none")]
128    pub licensing_configs: Option<Vec<LaunchInstanceLicensingConfig>>,
129}
130
131/// Required fields for LaunchInstanceDetails
132pub struct LaunchInstanceDetailsRequired {
133    /// The availability domain of the instance. <p> Example: {@code Uocm:PHX-AD-1}
134    pub availability_domain: String,
135
136    /// The OCID of the compartment.
137    pub compartment_id: String,
138}
139
140impl LaunchInstanceDetails {
141    /// Create a new LaunchInstanceDetails with required fields
142    pub fn new(required: LaunchInstanceDetailsRequired) -> Self {
143        Self {
144            availability_domain: required.availability_domain,
145
146            compartment_id: required.compartment_id,
147
148            capacity_reservation_id: None,
149
150            create_vnic_details: None,
151
152            dedicated_vm_host_id: None,
153
154            defined_tags: None,
155
156            security_attributes: None,
157
158            display_name: None,
159
160            extended_metadata: None,
161
162            fault_domain: None,
163
164            cluster_placement_group_id: None,
165
166            freeform_tags: None,
167
168            compute_cluster_id: None,
169
170            hostname_label: None,
171
172            image_id: None,
173
174            ipxe_script: None,
175
176            launch_options: None,
177
178            instance_options: None,
179
180            availability_config: None,
181
182            preemptible_instance_config: None,
183
184            metadata: None,
185
186            agent_config: None,
187
188            shape: None,
189
190            shape_config: None,
191
192            source_details: None,
193
194            subnet_id: None,
195
196            launch_volume_attachments: None,
197
198            is_pv_encryption_in_transit_enabled: None,
199
200            platform_config: None,
201
202            placement_constraint_details: None,
203
204            is_aienterprise_enabled: None,
205
206            instance_configuration_id: None,
207
208            licensing_configs: None,
209        }
210    }
211
212    /// Set availability_domain
213    pub fn set_availability_domain(mut self, value: String) -> Self {
214        self.availability_domain = value;
215        self
216    }
217
218    /// Set capacity_reservation_id
219    pub fn set_capacity_reservation_id(mut self, value: Option<String>) -> Self {
220        self.capacity_reservation_id = value;
221        self
222    }
223
224    /// Set compartment_id
225    pub fn set_compartment_id(mut self, value: String) -> Self {
226        self.compartment_id = value;
227        self
228    }
229
230    /// Set create_vnic_details
231    pub fn set_create_vnic_details(mut self, value: Option<CreateVnicDetails>) -> Self {
232        self.create_vnic_details = value;
233        self
234    }
235
236    /// Set dedicated_vm_host_id
237    pub fn set_dedicated_vm_host_id(mut self, value: Option<String>) -> Self {
238        self.dedicated_vm_host_id = value;
239        self
240    }
241
242    /// Set defined_tags
243    pub fn set_defined_tags(
244        mut self,
245        value: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
246    ) -> Self {
247        self.defined_tags = value;
248        self
249    }
250
251    /// Set security_attributes
252    pub fn set_security_attributes(
253        mut self,
254        value: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
255    ) -> Self {
256        self.security_attributes = value;
257        self
258    }
259
260    /// Set display_name
261    pub fn set_display_name(mut self, value: Option<String>) -> Self {
262        self.display_name = value;
263        self
264    }
265
266    /// Set extended_metadata
267    pub fn set_extended_metadata(
268        mut self,
269        value: Option<HashMap<String, serde_json::Value>>,
270    ) -> Self {
271        self.extended_metadata = value;
272        self
273    }
274
275    /// Set fault_domain
276    pub fn set_fault_domain(mut self, value: Option<String>) -> Self {
277        self.fault_domain = value;
278        self
279    }
280
281    /// Set cluster_placement_group_id
282    pub fn set_cluster_placement_group_id(mut self, value: Option<String>) -> Self {
283        self.cluster_placement_group_id = value;
284        self
285    }
286
287    /// Set freeform_tags
288    pub fn set_freeform_tags(mut self, value: Option<HashMap<String, String>>) -> Self {
289        self.freeform_tags = value;
290        self
291    }
292
293    /// Set compute_cluster_id
294    pub fn set_compute_cluster_id(mut self, value: Option<String>) -> Self {
295        self.compute_cluster_id = value;
296        self
297    }
298
299    /// Set hostname_label
300    pub fn set_hostname_label(mut self, value: Option<String>) -> Self {
301        self.hostname_label = value;
302        self
303    }
304
305    /// Set image_id
306    pub fn set_image_id(mut self, value: Option<String>) -> Self {
307        self.image_id = value;
308        self
309    }
310
311    /// Set ipxe_script
312    pub fn set_ipxe_script(mut self, value: Option<String>) -> Self {
313        self.ipxe_script = value;
314        self
315    }
316
317    /// Set launch_options
318    pub fn set_launch_options(mut self, value: Option<LaunchOptions>) -> Self {
319        self.launch_options = value;
320        self
321    }
322
323    /// Set instance_options
324    pub fn set_instance_options(mut self, value: Option<InstanceOptions>) -> Self {
325        self.instance_options = value;
326        self
327    }
328
329    /// Set availability_config
330    pub fn set_availability_config(
331        mut self,
332        value: Option<LaunchInstanceAvailabilityConfigDetails>,
333    ) -> Self {
334        self.availability_config = value;
335        self
336    }
337
338    /// Set preemptible_instance_config
339    pub fn set_preemptible_instance_config(
340        mut self,
341        value: Option<PreemptibleInstanceConfigDetails>,
342    ) -> Self {
343        self.preemptible_instance_config = value;
344        self
345    }
346
347    /// Set metadata
348    pub fn set_metadata(mut self, value: Option<HashMap<String, String>>) -> Self {
349        self.metadata = value;
350        self
351    }
352
353    /// Set agent_config
354    pub fn set_agent_config(mut self, value: Option<LaunchInstanceAgentConfigDetails>) -> Self {
355        self.agent_config = value;
356        self
357    }
358
359    /// Set shape
360    pub fn set_shape(mut self, value: Option<String>) -> Self {
361        self.shape = value;
362        self
363    }
364
365    /// Set shape_config
366    pub fn set_shape_config(mut self, value: Option<LaunchInstanceShapeConfigDetails>) -> Self {
367        self.shape_config = value;
368        self
369    }
370
371    /// Set source_details
372    pub fn set_source_details(mut self, value: Option<InstanceSourceViaImageDetails>) -> Self {
373        self.source_details = value;
374        self
375    }
376
377    /// Set subnet_id
378    pub fn set_subnet_id(mut self, value: Option<String>) -> Self {
379        self.subnet_id = value;
380        self
381    }
382
383    /// Set launch_volume_attachments
384    pub fn set_launch_volume_attachments(
385        mut self,
386        value: Option<Vec<LaunchAttachVolumeDetails>>,
387    ) -> Self {
388        self.launch_volume_attachments = value;
389        self
390    }
391
392    /// Set is_pv_encryption_in_transit_enabled
393    pub fn set_is_pv_encryption_in_transit_enabled(mut self, value: Option<bool>) -> Self {
394        self.is_pv_encryption_in_transit_enabled = value;
395        self
396    }
397
398    /// Set platform_config
399    pub fn set_platform_config(
400        mut self,
401        value: Option<AmdRomeBmGpuLaunchInstancePlatformConfig>,
402    ) -> Self {
403        self.platform_config = value;
404        self
405    }
406
407    /// Set placement_constraint_details
408    pub fn set_placement_constraint_details(
409        mut self,
410        value: Option<HostGroupPlacementConstraintDetails>,
411    ) -> Self {
412        self.placement_constraint_details = value;
413        self
414    }
415
416    /// Set is_aienterprise_enabled
417    pub fn set_is_aienterprise_enabled(mut self, value: Option<bool>) -> Self {
418        self.is_aienterprise_enabled = value;
419        self
420    }
421
422    /// Set instance_configuration_id
423    pub fn set_instance_configuration_id(mut self, value: Option<String>) -> Self {
424        self.instance_configuration_id = value;
425        self
426    }
427
428    /// Set licensing_configs
429    pub fn set_licensing_configs(
430        mut self,
431        value: Option<Vec<LaunchInstanceLicensingConfig>>,
432    ) -> Self {
433        self.licensing_configs = value;
434        self
435    }
436
437    /// Set capacity_reservation_id (unwraps Option)
438    pub fn with_capacity_reservation_id(mut self, value: impl Into<String>) -> Self {
439        self.capacity_reservation_id = Some(value.into());
440        self
441    }
442
443    /// Set create_vnic_details (unwraps Option)
444    pub fn with_create_vnic_details(mut self, value: CreateVnicDetails) -> Self {
445        self.create_vnic_details = Some(value);
446        self
447    }
448
449    /// Set dedicated_vm_host_id (unwraps Option)
450    pub fn with_dedicated_vm_host_id(mut self, value: impl Into<String>) -> Self {
451        self.dedicated_vm_host_id = Some(value.into());
452        self
453    }
454
455    /// Set defined_tags (unwraps Option)
456    pub fn with_defined_tags(
457        mut self,
458        value: HashMap<String, HashMap<String, serde_json::Value>>,
459    ) -> Self {
460        self.defined_tags = Some(value);
461        self
462    }
463
464    /// Set security_attributes (unwraps Option)
465    pub fn with_security_attributes(
466        mut self,
467        value: HashMap<String, HashMap<String, serde_json::Value>>,
468    ) -> Self {
469        self.security_attributes = Some(value);
470        self
471    }
472
473    /// Set display_name (unwraps Option)
474    pub fn with_display_name(mut self, value: impl Into<String>) -> Self {
475        self.display_name = Some(value.into());
476        self
477    }
478
479    /// Set extended_metadata (unwraps Option)
480    pub fn with_extended_metadata(mut self, value: HashMap<String, serde_json::Value>) -> Self {
481        self.extended_metadata = Some(value);
482        self
483    }
484
485    /// Set fault_domain (unwraps Option)
486    pub fn with_fault_domain(mut self, value: impl Into<String>) -> Self {
487        self.fault_domain = Some(value.into());
488        self
489    }
490
491    /// Set cluster_placement_group_id (unwraps Option)
492    pub fn with_cluster_placement_group_id(mut self, value: impl Into<String>) -> Self {
493        self.cluster_placement_group_id = Some(value.into());
494        self
495    }
496
497    /// Set freeform_tags (unwraps Option)
498    pub fn with_freeform_tags(mut self, value: HashMap<String, String>) -> Self {
499        self.freeform_tags = Some(value);
500        self
501    }
502
503    /// Set compute_cluster_id (unwraps Option)
504    pub fn with_compute_cluster_id(mut self, value: impl Into<String>) -> Self {
505        self.compute_cluster_id = Some(value.into());
506        self
507    }
508
509    /// Set hostname_label (unwraps Option)
510    pub fn with_hostname_label(mut self, value: impl Into<String>) -> Self {
511        self.hostname_label = Some(value.into());
512        self
513    }
514
515    /// Set image_id (unwraps Option)
516    pub fn with_image_id(mut self, value: impl Into<String>) -> Self {
517        self.image_id = Some(value.into());
518        self
519    }
520
521    /// Set ipxe_script (unwraps Option)
522    pub fn with_ipxe_script(mut self, value: impl Into<String>) -> Self {
523        self.ipxe_script = Some(value.into());
524        self
525    }
526
527    /// Set launch_options (unwraps Option)
528    pub fn with_launch_options(mut self, value: LaunchOptions) -> Self {
529        self.launch_options = Some(value);
530        self
531    }
532
533    /// Set instance_options (unwraps Option)
534    pub fn with_instance_options(mut self, value: InstanceOptions) -> Self {
535        self.instance_options = Some(value);
536        self
537    }
538
539    /// Set availability_config (unwraps Option)
540    pub fn with_availability_config(
541        mut self,
542        value: LaunchInstanceAvailabilityConfigDetails,
543    ) -> Self {
544        self.availability_config = Some(value);
545        self
546    }
547
548    /// Set preemptible_instance_config (unwraps Option)
549    pub fn with_preemptible_instance_config(
550        mut self,
551        value: PreemptibleInstanceConfigDetails,
552    ) -> Self {
553        self.preemptible_instance_config = Some(value);
554        self
555    }
556
557    /// Set metadata (unwraps Option)
558    pub fn with_metadata(mut self, value: HashMap<String, String>) -> Self {
559        self.metadata = Some(value);
560        self
561    }
562
563    /// Set agent_config (unwraps Option)
564    pub fn with_agent_config(mut self, value: LaunchInstanceAgentConfigDetails) -> Self {
565        self.agent_config = Some(value);
566        self
567    }
568
569    /// Set shape (unwraps Option)
570    pub fn with_shape(mut self, value: impl Into<String>) -> Self {
571        self.shape = Some(value.into());
572        self
573    }
574
575    /// Set shape_config (unwraps Option)
576    pub fn with_shape_config(mut self, value: LaunchInstanceShapeConfigDetails) -> Self {
577        self.shape_config = Some(value);
578        self
579    }
580
581    /// Set source_details (unwraps Option)
582    pub fn with_source_details(mut self, value: InstanceSourceViaImageDetails) -> Self {
583        self.source_details = Some(value);
584        self
585    }
586
587    /// Set subnet_id (unwraps Option)
588    pub fn with_subnet_id(mut self, value: impl Into<String>) -> Self {
589        self.subnet_id = Some(value.into());
590        self
591    }
592
593    /// Set launch_volume_attachments (unwraps Option)
594    pub fn with_launch_volume_attachments(mut self, value: Vec<LaunchAttachVolumeDetails>) -> Self {
595        self.launch_volume_attachments = Some(value);
596        self
597    }
598
599    /// Set is_pv_encryption_in_transit_enabled (unwraps Option)
600    pub fn with_is_pv_encryption_in_transit_enabled(mut self, value: bool) -> Self {
601        self.is_pv_encryption_in_transit_enabled = Some(value);
602        self
603    }
604
605    /// Set platform_config (unwraps Option)
606    pub fn with_platform_config(mut self, value: AmdRomeBmGpuLaunchInstancePlatformConfig) -> Self {
607        self.platform_config = Some(value);
608        self
609    }
610
611    /// Set placement_constraint_details (unwraps Option)
612    pub fn with_placement_constraint_details(
613        mut self,
614        value: HostGroupPlacementConstraintDetails,
615    ) -> Self {
616        self.placement_constraint_details = Some(value);
617        self
618    }
619
620    /// Set is_aienterprise_enabled (unwraps Option)
621    pub fn with_is_aienterprise_enabled(mut self, value: bool) -> Self {
622        self.is_aienterprise_enabled = Some(value);
623        self
624    }
625
626    /// Set instance_configuration_id (unwraps Option)
627    pub fn with_instance_configuration_id(mut self, value: impl Into<String>) -> Self {
628        self.instance_configuration_id = Some(value.into());
629        self
630    }
631
632    /// Set licensing_configs (unwraps Option)
633    pub fn with_licensing_configs(mut self, value: Vec<LaunchInstanceLicensingConfig>) -> Self {
634        self.licensing_configs = Some(value);
635        self
636    }
637}