Image

class oci.core.models.Image(**kwargs)

Bases: object

A boot disk image for launching an instance. For more information, see Overview of the Compute Service.

To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, talk to an administrator. If you’re an administrator who needs to write policies to give users access, see Getting Started with Policies.

Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.

Attributes

LAUNCH_MODE_CUSTOM A constant which can be used with the launch_mode property of a Image.
LAUNCH_MODE_EMULATED A constant which can be used with the launch_mode property of a Image.
LAUNCH_MODE_NATIVE A constant which can be used with the launch_mode property of a Image.
LAUNCH_MODE_PARAVIRTUALIZED A constant which can be used with the launch_mode property of a Image.
LIFECYCLE_STATE_AVAILABLE A constant which can be used with the lifecycle_state property of a Image.
LIFECYCLE_STATE_DELETED A constant which can be used with the lifecycle_state property of a Image.
LIFECYCLE_STATE_DISABLED A constant which can be used with the lifecycle_state property of a Image.
LIFECYCLE_STATE_EXPORTING A constant which can be used with the lifecycle_state property of a Image.
LIFECYCLE_STATE_IMPORTING A constant which can be used with the lifecycle_state property of a Image.
LIFECYCLE_STATE_PROVISIONING A constant which can be used with the lifecycle_state property of a Image.
LISTING_TYPE_COMMUNITY A constant which can be used with the listing_type property of a Image.
LISTING_TYPE_NONE A constant which can be used with the listing_type property of a Image.
agent_features Gets the agent_features of this Image.
base_image_id Gets the base_image_id of this Image.
billable_size_in_gbs Gets the billable_size_in_gbs of this Image.
compartment_id [Required] Gets the compartment_id of this Image.
create_image_allowed [Required] Gets the create_image_allowed of this Image.
defined_tags Gets the defined_tags of this Image.
display_name Gets the display_name of this Image.
freeform_tags Gets the freeform_tags of this Image.
id [Required] Gets the id of this Image.
launch_mode Gets the launch_mode of this Image.
launch_options Gets the launch_options of this Image.
lifecycle_state [Required] Gets the lifecycle_state of this Image.
listing_type Gets the listing_type of this Image.
operating_system [Required] Gets the operating_system of this Image.
operating_system_version [Required] Gets the operating_system_version of this Image.
size_in_mbs Gets the size_in_mbs of this Image.
time_created [Required] Gets the time_created of this Image.

Methods

__init__(**kwargs) Initializes a new Image object with values from keyword arguments.
LAUNCH_MODE_CUSTOM = 'CUSTOM'

A constant which can be used with the launch_mode property of a Image. This constant has a value of “CUSTOM”

LAUNCH_MODE_EMULATED = 'EMULATED'

A constant which can be used with the launch_mode property of a Image. This constant has a value of “EMULATED”

LAUNCH_MODE_NATIVE = 'NATIVE'

A constant which can be used with the launch_mode property of a Image. This constant has a value of “NATIVE”

LAUNCH_MODE_PARAVIRTUALIZED = 'PARAVIRTUALIZED'

A constant which can be used with the launch_mode property of a Image. This constant has a value of “PARAVIRTUALIZED”

LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'

A constant which can be used with the lifecycle_state property of a Image. This constant has a value of “AVAILABLE”

LIFECYCLE_STATE_DELETED = 'DELETED'

A constant which can be used with the lifecycle_state property of a Image. This constant has a value of “DELETED”

LIFECYCLE_STATE_DISABLED = 'DISABLED'

A constant which can be used with the lifecycle_state property of a Image. This constant has a value of “DISABLED”

LIFECYCLE_STATE_EXPORTING = 'EXPORTING'

A constant which can be used with the lifecycle_state property of a Image. This constant has a value of “EXPORTING”

LIFECYCLE_STATE_IMPORTING = 'IMPORTING'

A constant which can be used with the lifecycle_state property of a Image. This constant has a value of “IMPORTING”

LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'

A constant which can be used with the lifecycle_state property of a Image. This constant has a value of “PROVISIONING”

LISTING_TYPE_COMMUNITY = 'COMMUNITY'

A constant which can be used with the listing_type property of a Image. This constant has a value of “COMMUNITY”

LISTING_TYPE_NONE = 'NONE'

A constant which can be used with the listing_type property of a Image. This constant has a value of “NONE”

__init__(**kwargs)

Initializes a new Image object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • base_image_id (str) – The value to assign to the base_image_id property of this Image.
  • compartment_id (str) – The value to assign to the compartment_id property of this Image.
  • create_image_allowed (bool) – The value to assign to the create_image_allowed property of this Image.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this Image.
  • display_name (str) – The value to assign to the display_name property of this Image.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this Image.
  • id (str) – The value to assign to the id property of this Image.
  • launch_mode (str) – The value to assign to the launch_mode property of this Image. Allowed values for this property are: “NATIVE”, “EMULATED”, “PARAVIRTUALIZED”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • launch_options (oci.core.models.LaunchOptions) – The value to assign to the launch_options property of this Image.
  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this Image. Allowed values for this property are: “PROVISIONING”, “IMPORTING”, “AVAILABLE”, “EXPORTING”, “DISABLED”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • operating_system (str) – The value to assign to the operating_system property of this Image.
  • operating_system_version (str) – The value to assign to the operating_system_version property of this Image.
  • agent_features (oci.core.models.InstanceAgentFeatures) – The value to assign to the agent_features property of this Image.
  • listing_type (str) – The value to assign to the listing_type property of this Image. Allowed values for this property are: “COMMUNITY”, “NONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • size_in_mbs (int) – The value to assign to the size_in_mbs property of this Image.
  • billable_size_in_gbs (int) – The value to assign to the billable_size_in_gbs property of this Image.
  • time_created (datetime) – The value to assign to the time_created property of this Image.
agent_features

Gets the agent_features of this Image.

Returns:The agent_features of this Image.
Return type:oci.core.models.InstanceAgentFeatures
base_image_id

Gets the base_image_id of this Image. The OCID of the image originally used to launch the instance.

Returns:The base_image_id of this Image.
Return type:str
billable_size_in_gbs

Gets the billable_size_in_gbs of this Image. The size of the internal storage for this image that is subject to billing (1 GB = 1,073,741,824 bytes).

Example: 100

Returns:The billable_size_in_gbs of this Image.
Return type:int
compartment_id

[Required] Gets the compartment_id of this Image. The OCID of the compartment containing the instance you want to use as the basis for the image.

Returns:The compartment_id of this Image.
Return type:str
create_image_allowed

[Required] Gets the create_image_allowed of this Image. 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

Returns:The create_image_allowed of this Image.
Return type:bool
defined_tags

Gets the defined_tags of this Image. 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 defined_tags of this Image.
Return type:dict(str, dict(str, object))
display_name

Gets the display_name of this Image. 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

Returns:The display_name of this Image.
Return type:str
freeform_tags

Gets the freeform_tags of this Image. 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 freeform_tags of this Image.
Return type:dict(str, str)
id

[Required] Gets the id of this Image. The OCID of the image.

Returns:The id of this Image.
Return type:str
launch_mode

Gets the launch_mode of this Image. 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.

Allowed values for this property are: “NATIVE”, “EMULATED”, “PARAVIRTUALIZED”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The launch_mode of this Image.
Return type:str
launch_options

Gets the launch_options of this Image.

Returns:The launch_options of this Image.
Return type:oci.core.models.LaunchOptions
lifecycle_state

[Required] Gets the lifecycle_state of this Image. Allowed values for this property are: “PROVISIONING”, “IMPORTING”, “AVAILABLE”, “EXPORTING”, “DISABLED”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The lifecycle_state of this Image.
Return type:str
listing_type

Gets the listing_type of this Image. The listing type of the image. The default value is “NONE”.

Allowed values for this property are: “COMMUNITY”, “NONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The listing_type of this Image.
Return type:str
operating_system

[Required] Gets the operating_system of this Image. The image’s operating system.

Example: Oracle Linux

Returns:The operating_system of this Image.
Return type:str
operating_system_version

[Required] Gets the operating_system_version of this Image. The image’s operating system version.

Example: 7.2

Returns:The operating_system_version of this Image.
Return type:str
size_in_mbs

Gets the size_in_mbs of this Image. 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

Returns:The size_in_mbs of this Image.
Return type:int
time_created

[Required] Gets the time_created of this Image. The date and time the image was created, in the format defined by RFC3339.

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

Returns:The time_created of this Image.
Return type:datetime