Class LaunchInstanceDetails.Builder
- java.lang.Object
-
- com.oracle.bmc.core.model.LaunchInstanceDetails.Builder
-
- Enclosing class:
- LaunchInstanceDetails
public static class LaunchInstanceDetails.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
availabilityDomain
public LaunchInstanceDetails.Builder availabilityDomain(String availabilityDomain)
The availability domain of the instance.Example: Uocm:PHX-AD-1
- Parameters:
availabilityDomain
- the value to set- Returns:
- this builder
-
capacityReservationId
public LaunchInstanceDetails.Builder capacityReservationId(String capacityReservationId)
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.
- Parameters:
capacityReservationId
- the value to set- Returns:
- this builder
-
compartmentId
public LaunchInstanceDetails.Builder compartmentId(String compartmentId)
The OCID of the compartment.- Parameters:
compartmentId
- the value to set- Returns:
- this builder
-
createVnicDetails
public LaunchInstanceDetails.Builder createVnicDetails(CreateVnicDetails createVnicDetails)
-
dedicatedVmHostId
public LaunchInstanceDetails.Builder dedicatedVmHostId(String dedicatedVmHostId)
The OCID of the dedicated virtual machine host to place the instance on.- Parameters:
dedicatedVmHostId
- the value to set- Returns:
- this builder
-
definedTags
public LaunchInstanceDetails.Builder definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {"Operations": {"CostCenter": "42"}}
- Parameters:
definedTags
- the value to set- Returns:
- this builder
-
securityAttributes
public LaunchInstanceDetails.Builder securityAttributes(Map<String,Map<String,Object>> securityAttributes)
Security attributes are labels for a resource that can be referenced in a Zero Trust Packet Routing (ZPR) policy to control access to ZPR-supported resources.Example: {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}
- Parameters:
securityAttributes
- the value to set- Returns:
- this builder
-
displayName
public LaunchInstanceDetails.Builder displayName(String displayName)
A user-friendly name.Does not have to be unique, and it’s changeable. Avoid entering confidential information.
- Parameters:
displayName
- the value to set- Returns:
- this builder
-
extendedMetadata
public LaunchInstanceDetails.Builder extendedMetadata(Map<String,Object> extendedMetadata)
Additional metadata key/value pairs that you provide.They serve the same purpose and functionality as fields in the metadata object.
They are distinguished from metadata fields in that these can be nested JSON objects (whereas metadata fields are string/string maps only).
The combined size of the metadata and extendedMetadata objects can be a maximum of 32,000 bytes.
- Parameters:
extendedMetadata
- the value to set- Returns:
- this builder
-
faultDomain
public LaunchInstanceDetails.Builder faultDomain(String faultDomain)
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.
If you do not specify the fault domain, the system selects one for you.
To get a list of fault domains, use the
listFaultDomains
operation in the Identity and Access Management Service API.Example: FAULT-DOMAIN-1
- Parameters:
faultDomain
- the value to set- Returns:
- this builder
-
clusterPlacementGroupId
public LaunchInstanceDetails.Builder clusterPlacementGroupId(String clusterPlacementGroupId)
The OCID of the cluster placement group of the instance.- Parameters:
clusterPlacementGroupId
- the value to set- Returns:
- this builder
-
freeformTags
public LaunchInstanceDetails.Builder freeformTags(Map<String,String> freeformTags)
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.
Example: {"Department": "Finance"}
- Parameters:
freeformTags
- the value to set- Returns:
- this builder
-
computeClusterId
public LaunchInstanceDetails.Builder computeClusterId(String computeClusterId)
The OCID of the compute cluster that the instance will be created in.- Parameters:
computeClusterId
- the value to set- Returns:
- this builder
-
hostnameLabel
public LaunchInstanceDetails.Builder hostnameLabel(String hostnameLabel)
Deprecated.Instead use hostnameLabel in
CreateVnicDetails
. If you provide both, the values must match.- Parameters:
hostnameLabel
- the value to set- Returns:
- this builder
-
imageId
public LaunchInstanceDetails.Builder imageId(String imageId)
Deprecated.Use sourceDetails with
instanceSourceViaImageDetails
source type instead. If you specify values for both, the values must match.- Parameters:
imageId
- the value to set- Returns:
- this builder
-
ipxeScript
public LaunchInstanceDetails.Builder ipxeScript(String ipxeScript)
This is an advanced option.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.
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.
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.
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.
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).
For more information about iPXE, see http://ipxe.org.
- Parameters:
ipxeScript
- the value to set- Returns:
- this builder
-
launchOptions
public LaunchInstanceDetails.Builder launchOptions(LaunchOptions launchOptions)
-
instanceOptions
public LaunchInstanceDetails.Builder instanceOptions(InstanceOptions instanceOptions)
-
availabilityConfig
public LaunchInstanceDetails.Builder availabilityConfig(LaunchInstanceAvailabilityConfigDetails availabilityConfig)
-
preemptibleInstanceConfig
public LaunchInstanceDetails.Builder preemptibleInstanceConfig(PreemptibleInstanceConfigDetails preemptibleInstanceConfig)
-
metadata
public LaunchInstanceDetails.Builder metadata(Map<String,String> metadata)
Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance.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:
Provide information to [Cloud-Init](https://cloudinit.readthedocs.org/en/latest/) to be used for various system initialization tasks.
Get information about the instance, including the custom metadata that you provide when you launch the instance.
*Providing Cloud-Init Metadata**
You can use the following metadata key names to provide information to Cloud-Init:
*"ssh_authorized_keys"** - Provide one or more public SSH keys to be included in the ~/.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 authorized_keys file, as shown in the example below.
*"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).
*Metadata Example**
"metadata" : { "quake_bot_level" : "Severe", "ssh_authorized_keys" : "ssh-rsa
== rsa-key-20160227", "user_data" : " ==" } **Getting Metadata on the Instance** To get information about your instance, connect to the instance using SSH and issue any of the following GET requests:
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/
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.
The combined size of the metadata and extendedMetadata objects can be a maximum of 32,000 bytes.
- Parameters:
metadata
- the value to set- Returns:
- this builder
-
agentConfig
public LaunchInstanceDetails.Builder agentConfig(LaunchInstanceAgentConfigDetails agentConfig)
-
shape
public LaunchInstanceDetails.Builder shape(String shape)
The shape of an instance.The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
You can enumerate all available shapes by calling
listShapes
.- Parameters:
shape
- the value to set- Returns:
- this builder
-
shapeConfig
public LaunchInstanceDetails.Builder shapeConfig(LaunchInstanceShapeConfigDetails shapeConfig)
-
sourceDetails
public LaunchInstanceDetails.Builder sourceDetails(InstanceSourceDetails sourceDetails)
-
subnetId
public LaunchInstanceDetails.Builder subnetId(String subnetId)
Deprecated.Instead use subnetId in
CreateVnicDetails
. At least one of them is required; if you provide both, the values must match.- Parameters:
subnetId
- the value to set- Returns:
- this builder
-
launchVolumeAttachments
public LaunchInstanceDetails.Builder launchVolumeAttachments(List<LaunchAttachVolumeDetails> launchVolumeAttachments)
Volume attachments to create as part of the launch instance operation.- Parameters:
launchVolumeAttachments
- the value to set- Returns:
- this builder
-
isPvEncryptionInTransitEnabled
public LaunchInstanceDetails.Builder isPvEncryptionInTransitEnabled(Boolean isPvEncryptionInTransitEnabled)
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.
- Parameters:
isPvEncryptionInTransitEnabled
- the value to set- Returns:
- this builder
-
platformConfig
public LaunchInstanceDetails.Builder platformConfig(LaunchInstancePlatformConfig platformConfig)
-
instanceConfigurationId
public LaunchInstanceDetails.Builder instanceConfigurationId(String instanceConfigurationId)
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.
- Parameters:
instanceConfigurationId
- the value to set- Returns:
- this builder
-
licensingConfigs
public LaunchInstanceDetails.Builder licensingConfigs(List<LaunchInstanceLicensingConfig> licensingConfigs)
List of licensing configurations associated with target launch values.- Parameters:
licensingConfigs
- the value to set- Returns:
- this builder
-
build
public LaunchInstanceDetails build()
-
copy
public LaunchInstanceDetails.Builder copy(LaunchInstanceDetails model)
-
-