CreateInstanceConfigurationBase

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

Bases: object

Creation details for an instance configuration.

Attributes

SOURCE_INSTANCE A constant which can be used with the source property of a CreateInstanceConfigurationBase.
SOURCE_NONE A constant which can be used with the source property of a CreateInstanceConfigurationBase.
compartment_id [Required] Gets the compartment_id of this CreateInstanceConfigurationBase.
defined_tags Gets the defined_tags of this CreateInstanceConfigurationBase.
display_name Gets the display_name of this CreateInstanceConfigurationBase.
freeform_tags Gets the freeform_tags of this CreateInstanceConfigurationBase.
source Gets the source of this CreateInstanceConfigurationBase.

Methods

__init__(**kwargs) Initializes a new CreateInstanceConfigurationBase object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
SOURCE_INSTANCE = 'INSTANCE'

A constant which can be used with the source property of a CreateInstanceConfigurationBase. This constant has a value of “INSTANCE”

SOURCE_NONE = 'NONE'

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

__init__(**kwargs)

Initializes a new CreateInstanceConfigurationBase object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class:

The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • compartment_id (str) – The value to assign to the compartment_id property of this CreateInstanceConfigurationBase.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateInstanceConfigurationBase.
  • display_name (str) – The value to assign to the display_name property of this CreateInstanceConfigurationBase.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateInstanceConfigurationBase.
  • source (str) – The value to assign to the source property of this CreateInstanceConfigurationBase. Allowed values for this property are: “NONE”, “INSTANCE”
compartment_id

[Required] Gets the compartment_id of this CreateInstanceConfigurationBase. The OCID of the compartment containing the instance configuration.

Returns:The compartment_id of this CreateInstanceConfigurationBase.
Return type:str
defined_tags

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

Gets the display_name of this CreateInstanceConfigurationBase. A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.

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

Gets the freeform_tags of this CreateInstanceConfigurationBase. 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 CreateInstanceConfigurationBase.
Return type:dict(str, str)
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

source

Gets the source of this CreateInstanceConfigurationBase. The source of the instance configuration. An instance configuration defines the settings to use when creating Compute instances, including details such as the base image, shape, and metadata. You can also specify the associated resources for the instance, such as block volume attachments and network configuration.

When you create an instance configuration using an existing instance as a template, the instance configuration does not include any information from the source instance’s boot volume, such as installed applications, binaries, and files on the instance. It also does not include the contents of any block volumes that are attached to the instance.

To create an instance configuration that includes the custom setup from an instance’s boot volume, you must first create a custom image from the instance (see create_image()). Then, use the custom image to launch a new instance (see launch_instance()). Finally, create the instance configuration based on the instance that you created from the custom image.

To include block volume contents with an instance configuration, first create a backup of the attached block volumes (see create_volume_backup()). Then, create the instance configuration by specifying the list of settings, using instance_configuration_volume_source_from_volume_backup_details() to include the block volume backups in the list of settings.

The following values are supported:

  • NONE: Creates an instance configuration using the list of settings that you specify.
  • INSTANCE: Creates an instance configuration using an existing instance as a template.

Allowed values for this property are: “NONE”, “INSTANCE”

Returns:The source of this CreateInstanceConfigurationBase.
Return type:str