Class LaunchInstanceDetails
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.core.model.LaunchInstanceDetails
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20160918") public final class LaunchInstanceDetails extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
Instance launch details.Use the sourceDetails parameter to specify whether a boot volume or an image should be used to launch a new instance.
Note: Objects should always be created or deserialized using theLaunchInstanceDetails.Builder
. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theLaunchInstanceDetails.Builder
, which maintain a set of all explicitly set fields calledLaunchInstanceDetails.Builder.__explicitlySet__
. ThehashCode()
andequals(Object)
methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LaunchInstanceDetails.Builder
-
Constructor Summary
Constructors Constructor Description LaunchInstanceDetails(String availabilityDomain, String capacityReservationId, String compartmentId, CreateVnicDetails createVnicDetails, String dedicatedVmHostId, Map<String,Map<String,Object>> definedTags, Map<String,Map<String,Object>> securityAttributes, String displayName, Map<String,Object> extendedMetadata, String faultDomain, String clusterPlacementGroupId, Map<String,String> freeformTags, String computeClusterId, String hostnameLabel, String imageId, String ipxeScript, LaunchOptions launchOptions, InstanceOptions instanceOptions, LaunchInstanceAvailabilityConfigDetails availabilityConfig, PreemptibleInstanceConfigDetails preemptibleInstanceConfig, Map<String,String> metadata, LaunchInstanceAgentConfigDetails agentConfig, String shape, LaunchInstanceShapeConfigDetails shapeConfig, InstanceSourceDetails sourceDetails, String subnetId, List<LaunchAttachVolumeDetails> launchVolumeAttachments, Boolean isPvEncryptionInTransitEnabled, LaunchInstancePlatformConfig platformConfig, String instanceConfigurationId, List<LaunchInstanceLicensingConfig> licensingConfigs)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LaunchInstanceDetails.Builder
builder()
Create a new builder.boolean
equals(Object o)
LaunchInstanceAgentConfigDetails
getAgentConfig()
LaunchInstanceAvailabilityConfigDetails
getAvailabilityConfig()
String
getAvailabilityDomain()
The availability domain of the instance.String
getCapacityReservationId()
The OCID of the compute capacity reservation this instance is launched under.String
getClusterPlacementGroupId()
The OCID of the cluster placement group of the instance.String
getCompartmentId()
The OCID of the compartment.String
getComputeClusterId()
The OCID of the compute cluster that the instance will be created in.CreateVnicDetails
getCreateVnicDetails()
String
getDedicatedVmHostId()
The OCID of the dedicated virtual machine host to place the instance on.Map<String,Map<String,Object>>
getDefinedTags()
Defined tags for this resource.String
getDisplayName()
A user-friendly name.Map<String,Object>
getExtendedMetadata()
Additional metadata key/value pairs that you provide.String
getFaultDomain()
A fault domain is a grouping of hardware and infrastructure within an availability domain.Map<String,String>
getFreeformTags()
Free-form tags for this resource.String
getHostnameLabel()
Deprecated.String
getImageId()
Deprecated.String
getInstanceConfigurationId()
The OCID of the Instance Configuration containing instance launch details.InstanceOptions
getInstanceOptions()
String
getIpxeScript()
This is an advanced option.Boolean
getIsPvEncryptionInTransitEnabled()
Whether to enable in-transit encryption for the data volume’s paravirtualized attachment.LaunchOptions
getLaunchOptions()
List<LaunchAttachVolumeDetails>
getLaunchVolumeAttachments()
Volume attachments to create as part of the launch instance operation.List<LaunchInstanceLicensingConfig>
getLicensingConfigs()
List of licensing configurations associated with target launch values.Map<String,String>
getMetadata()
Custom metadata key/value pairs that you provide, such as the SSH public key required to connect to the instance.LaunchInstancePlatformConfig
getPlatformConfig()
PreemptibleInstanceConfigDetails
getPreemptibleInstanceConfig()
Map<String,Map<String,Object>>
getSecurityAttributes()
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.String
getShape()
The shape of an instance.LaunchInstanceShapeConfigDetails
getShapeConfig()
InstanceSourceDetails
getSourceDetails()
String
getSubnetId()
Deprecated.int
hashCode()
LaunchInstanceDetails.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
LaunchInstanceDetails
@Deprecated @ConstructorProperties({"availabilityDomain","capacityReservationId","compartmentId","createVnicDetails","dedicatedVmHostId","definedTags","securityAttributes","displayName","extendedMetadata","faultDomain","clusterPlacementGroupId","freeformTags","computeClusterId","hostnameLabel","imageId","ipxeScript","launchOptions","instanceOptions","availabilityConfig","preemptibleInstanceConfig","metadata","agentConfig","shape","shapeConfig","sourceDetails","subnetId","launchVolumeAttachments","isPvEncryptionInTransitEnabled","platformConfig","instanceConfigurationId","licensingConfigs"}) public LaunchInstanceDetails(String availabilityDomain, String capacityReservationId, String compartmentId, CreateVnicDetails createVnicDetails, String dedicatedVmHostId, Map<String,Map<String,Object>> definedTags, Map<String,Map<String,Object>> securityAttributes, String displayName, Map<String,Object> extendedMetadata, String faultDomain, String clusterPlacementGroupId, Map<String,String> freeformTags, String computeClusterId, String hostnameLabel, String imageId, String ipxeScript, LaunchOptions launchOptions, InstanceOptions instanceOptions, LaunchInstanceAvailabilityConfigDetails availabilityConfig, PreemptibleInstanceConfigDetails preemptibleInstanceConfig, Map<String,String> metadata, LaunchInstanceAgentConfigDetails agentConfig, String shape, LaunchInstanceShapeConfigDetails shapeConfig, InstanceSourceDetails sourceDetails, String subnetId, List<LaunchAttachVolumeDetails> launchVolumeAttachments, Boolean isPvEncryptionInTransitEnabled, LaunchInstancePlatformConfig platformConfig, String instanceConfigurationId, List<LaunchInstanceLicensingConfig> licensingConfigs)
Deprecated.
-
-
Method Detail
-
builder
public static LaunchInstanceDetails.Builder builder()
Create a new builder.
-
toBuilder
public LaunchInstanceDetails.Builder toBuilder()
-
getAvailabilityDomain
public String getAvailabilityDomain()
The availability domain of the instance.Example: Uocm:PHX-AD-1
- Returns:
- the value
-
getCapacityReservationId
public String getCapacityReservationId()
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.
- Returns:
- the value
-
getCompartmentId
public String getCompartmentId()
The OCID of the compartment.- Returns:
- the value
-
getCreateVnicDetails
public CreateVnicDetails getCreateVnicDetails()
-
getDedicatedVmHostId
public String getDedicatedVmHostId()
The OCID of the dedicated virtual machine host to place the instance on.- Returns:
- the value
-
getDefinedTags
public Map<String,Map<String,Object>> getDefinedTags()
Defined tags for this resource.Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {"Operations": {"CostCenter": "42"}}
- Returns:
- the value
-
getSecurityAttributes
public Map<String,Map<String,Object>> getSecurityAttributes()
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"}}}
- Returns:
- the value
-
getDisplayName
public String getDisplayName()
A user-friendly name.Does not have to be unique, and it’s changeable. Avoid entering confidential information.
- Returns:
- the value
-
getExtendedMetadata
public Map<String,Object> getExtendedMetadata()
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.
- Returns:
- the value
-
getFaultDomain
public String getFaultDomain()
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
- Returns:
- the value
-
getClusterPlacementGroupId
public String getClusterPlacementGroupId()
The OCID of the cluster placement group of the instance.- Returns:
- the value
-
getFreeformTags
public Map<String,String> getFreeformTags()
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"}
- Returns:
- the value
-
getComputeClusterId
public String getComputeClusterId()
The OCID of the compute cluster that the instance will be created in.- Returns:
- the value
-
getHostnameLabel
public String getHostnameLabel()
Deprecated.Instead use hostnameLabel in
CreateVnicDetails
. If you provide both, the values must match.- Returns:
- the value
-
getImageId
public String getImageId()
Deprecated.Use sourceDetails with
instanceSourceViaImageDetails
source type instead. If you specify values for both, the values must match.- Returns:
- the value
-
getIpxeScript
public String getIpxeScript()
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.
- Returns:
- the value
-
getLaunchOptions
public LaunchOptions getLaunchOptions()
-
getInstanceOptions
public InstanceOptions getInstanceOptions()
-
getAvailabilityConfig
public LaunchInstanceAvailabilityConfigDetails getAvailabilityConfig()
-
getPreemptibleInstanceConfig
public PreemptibleInstanceConfigDetails getPreemptibleInstanceConfig()
-
getMetadata
public Map<String,String> getMetadata()
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.
- Returns:
- the value
-
getAgentConfig
public LaunchInstanceAgentConfigDetails getAgentConfig()
-
getShape
public String getShape()
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
.- Returns:
- the value
-
getShapeConfig
public LaunchInstanceShapeConfigDetails getShapeConfig()
-
getSourceDetails
public InstanceSourceDetails getSourceDetails()
-
getSubnetId
public String getSubnetId()
Deprecated.Instead use subnetId in
CreateVnicDetails
. At least one of them is required; if you provide both, the values must match.- Returns:
- the value
-
getLaunchVolumeAttachments
public List<LaunchAttachVolumeDetails> getLaunchVolumeAttachments()
Volume attachments to create as part of the launch instance operation.- Returns:
- the value
-
getIsPvEncryptionInTransitEnabled
public Boolean getIsPvEncryptionInTransitEnabled()
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.
- Returns:
- the value
-
getPlatformConfig
public LaunchInstancePlatformConfig getPlatformConfig()
-
getInstanceConfigurationId
public String getInstanceConfigurationId()
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.
- Returns:
- the value
-
getLicensingConfigs
public List<LaunchInstanceLicensingConfig> getLicensingConfigs()
List of licensing configurations associated with target launch values.- Returns:
- the value
-
toString
public String toString()
- Overrides:
toString
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Parameters:
includeByteArrayContents
- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-