Class VmInstance.Builder

  • Enclosing class:
    VmInstance

    public static class VmInstance.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • compartmentId

        public VmInstance.Builder compartmentId​(String compartmentId)
        The OCID of the compartment containing the VM instance.
        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • displayName

        public VmInstance.Builder displayName​(String displayName)
        VM instance display name.

        This name does not have to be unique, and is changeable.

        Parameters:
        displayName - the value to set
        Returns:
        this builder
      • description

        public VmInstance.Builder description​(String description)
        VM instance description.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • infrastructureId

        public VmInstance.Builder infrastructureId​(String infrastructureId)
        The OCID of the Database Infrastructure.
        Parameters:
        infrastructureId - the value to set
        Returns:
        this builder
      • cpusEnabled

        public VmInstance.Builder cpusEnabled​(Integer cpusEnabled)
        The number of CPU cores enabled for each VM instance.
        Parameters:
        cpusEnabled - the value to set
        Returns:
        this builder
      • memorySizeInGBs

        public VmInstance.Builder memorySizeInGBs​(Double memorySizeInGBs)
        The memory to be allocated in GBs.
        Parameters:
        memorySizeInGBs - the value to set
        Returns:
        this builder
      • bootStorageSizeInGBs

        public VmInstance.Builder bootStorageSizeInGBs​(Double bootStorageSizeInGBs)
        Boot storage memory to be allocated in GBs.
        Parameters:
        bootStorageSizeInGBs - the value to set
        Returns:
        this builder
      • dataStorageSizeInGBs

        public VmInstance.Builder dataStorageSizeInGBs​(Double dataStorageSizeInGBs)
        Data storage to be allocated in GBs.
        Parameters:
        dataStorageSizeInGBs - the value to set
        Returns:
        this builder
      • definedTags

        public VmInstance.Builder definedTags​(Map<String,​Map<String,​Object>> definedTags)
        Defined tags for this resource.

        Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}

        Parameters:
        definedTags - the value to set
        Returns:
        this builder
      • freeformTags

        public VmInstance.Builder freeformTags​(Map<String,​String> freeformTags)
        Simple key-value pair that is applied without any predefined name, type or scope.

        This tag option exists for cross-compatibility only. Example: {“bar-key”: “value”}

        Parameters:
        freeformTags - the value to set
        Returns:
        this builder
      • systemTags

        public VmInstance.Builder systemTags​(Map<String,​Map<String,​Object>> systemTags)
        Usage of system tag keys.

        These predefined keys are scoped to namespaces. Example: { “orcl-cloud”: { “free-tier-retained”: “true” } }

        Parameters:
        systemTags - the value to set
        Returns:
        this builder
      • imageId

        public VmInstance.Builder imageId​(String imageId)
        The OCID of the VM custom instance uploaded.
        Parameters:
        imageId - the value to set
        Returns:
        this builder
      • serverId

        public VmInstance.Builder serverId​(String serverId)
        The OCID of the compute node on which VM instance should be launched.
        Parameters:
        serverId - the value to set
        Returns:
        this builder
      • sshPublicKeys

        public VmInstance.Builder sshPublicKeys​(List<String> sshPublicKeys)
        List of public key used for SSH access to the VM instance.
        Parameters:
        sshPublicKeys - the value to set
        Returns:
        this builder
      • lifecycleState

        public VmInstance.Builder lifecycleState​(VmInstanceLifecycleState lifecycleState)
        The current state of the VM instance.
        Parameters:
        lifecycleState - the value to set
        Returns:
        this builder
      • lifecycleDetails

        public VmInstance.Builder lifecycleDetails​(String lifecycleDetails)
        Lifecycle state details of the VM instance.
        Parameters:
        lifecycleDetails - the value to set
        Returns:
        this builder
      • timeCreated

        public VmInstance.Builder timeCreated​(Date timeCreated)
        The time that the VM instance was created.

        An RFC3339 formatted datetime string.

        Parameters:
        timeCreated - the value to set
        Returns:
        this builder
      • timeUpdated

        public VmInstance.Builder timeUpdated​(Date timeUpdated)
        The time that the VM instance was last updated.

        An RFC3339 formatted datetime string.

        Parameters:
        timeUpdated - the value to set
        Returns:
        this builder
      • domainName

        public VmInstance.Builder domainName​(String domainName)
        The domain name of the VM instance.
        Parameters:
        domainName - the value to set
        Returns:
        this builder
      • timeZone

        public VmInstance.Builder timeZone​(String timeZone)
        The time zone to use for the VM instance.
        Parameters:
        timeZone - the value to set
        Returns:
        this builder
      • dnsServers

        public VmInstance.Builder dnsServers​(List<String> dnsServers)
        The list of DNS server IP addresses.

        Maximum of 3 allowed.

        Parameters:
        dnsServers - the value to set
        Returns:
        this builder
      • ntpServers

        public VmInstance.Builder ntpServers​(List<String> ntpServers)
        The list of NTP server addresses.

        Maximum of 3 allowed.

        Parameters:
        ntpServers - the value to set
        Returns:
        this builder
      • hostname

        public VmInstance.Builder hostname​(String hostname)
        The host name of the instance.
        Parameters:
        hostname - the value to set
        Returns:
        this builder
      • ipAddress

        public VmInstance.Builder ipAddress​(String ipAddress)
        The IP address of the instance.
        Parameters:
        ipAddress - the value to set
        Returns:
        this builder
      • netmask

        public VmInstance.Builder netmask​(String netmask)
        The netmask of the VM instance network.
        Parameters:
        netmask - the value to set
        Returns:
        this builder
      • gateway

        public VmInstance.Builder gateway​(String gateway)
        The gateway IP address of the VM instance network.
        Parameters:
        gateway - the value to set
        Returns:
        this builder
      • vlanId

        public VmInstance.Builder vlanId​(String vlanId)
        The network VLAN ID.
        Parameters:
        vlanId - the value to set
        Returns:
        this builder
      • userdata

        public VmInstance.Builder userdata​(String userdata)
        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.

        Parameters:
        userdata - the value to set
        Returns:
        this builder
      • metadata

        public VmInstance.Builder metadata​(Map<String,​String> metadata)
        Custom metadata key/value pairs which can be used to: - Provide information to Cloud-Init to be used for various system initialization tasks.
        • Provide additional information which is exposed inside the instance context and can be queried or referenced by user-data scripts for dynamic configuration.
        Parameters:
        metadata - the value to set
        Returns:
        this builder
      • vmNetworkId

        public VmInstance.Builder vmNetworkId​(String vmNetworkId)
        The OCID of the VM Network.
        Parameters:
        vmNetworkId - the value to set
        Returns:
        this builder