Class Image.Builder

  • Enclosing class:
    Image

    public static class Image.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • baseImageId

        public Image.Builder baseImageId​(String baseImageId)
        The OCID of the image originally used to launch the instance.
        Parameters:
        baseImageId - the value to set
        Returns:
        this builder
      • compartmentId

        public Image.Builder compartmentId​(String compartmentId)
        The OCID of the compartment containing the instance you want to use as the basis for the image.
        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • createImageAllowed

        public Image.Builder createImageAllowed​(Boolean createImageAllowed)
        Whether instances launched with this image can be used to create new images.

        For example, you cannot create an image of an Oracle Database instance.

        Example: true

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

        public Image.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
      • displayName

        public Image.Builder displayName​(String displayName)
        A user-friendly name for the image.

        It does not have to be unique, and it’s changeable. Avoid entering confidential information.

        You cannot use a platform image name as a custom image name.

        Example: My custom Oracle Linux image

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

        public Image.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
      • id

        public Image.Builder id​(String id)
        The OCID of the image.
        Parameters:
        id - the value to set
        Returns:
        this builder
      • launchMode

        public Image.Builder launchMode​(Image.LaunchMode launchMode)
        Specifies the configuration mode for launching virtual machine (VM) instances.

        The configuration modes are: * NATIVE - VM instances launch with iSCSI boot and VFIO devices. The default value for platform images. * EMULATED - VM instances launch with emulated devices, such as the E1000 network driver and emulated SCSI disk controller. * PARAVIRTUALIZED - VM instances launch with paravirtualized devices using VirtIO drivers. * CUSTOM - VM instances launch with custom configuration settings specified in the LaunchOptions parameter.

        Parameters:
        launchMode - the value to set
        Returns:
        this builder
      • operatingSystem

        public Image.Builder operatingSystem​(String operatingSystem)
        The image’s operating system.

        Example: Oracle Linux

        Parameters:
        operatingSystem - the value to set
        Returns:
        this builder
      • operatingSystemVersion

        public Image.Builder operatingSystemVersion​(String operatingSystemVersion)
        The image’s operating system version.

        Example: 7.2

        Parameters:
        operatingSystemVersion - the value to set
        Returns:
        this builder
      • listingType

        public Image.Builder listingType​(Image.ListingType listingType)
        The listing type of the image.

        The default value is “NONE”.

        Parameters:
        listingType - the value to set
        Returns:
        this builder
      • sizeInMBs

        public Image.Builder sizeInMBs​(Long sizeInMBs)
        The boot volume size for an instance launched from this image (1 MB = 1,048,576 bytes).

        Note this is not the same as the size of the image when it was exported or the actual size of the image.

        Example: 47694

        Parameters:
        sizeInMBs - the value to set
        Returns:
        this builder
      • billableSizeInGBs

        public Image.Builder billableSizeInGBs​(Long billableSizeInGBs)
        The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes).

        Example: 100

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

        public Image.Builder timeCreated​(Date timeCreated)
        The date and time the image was created, in the format defined by RFC3339.

        Example: 2016-08-25T21:10:29.600Z

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

        public Image build()