CreateInstanceConfigurationDetails

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

Bases: oci.core.models.create_instance_configuration_base.CreateInstanceConfigurationBase

Details for creating an instance configuration by providing a list of configuration settings.

Attributes

SOURCE_INSTANCE str(object=’’) -> str
SOURCE_NONE str(object=’’) -> str
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.
instance_details [Required] Gets the instance_details of this CreateInstanceConfigurationDetails.
source Gets the source of this CreateInstanceConfigurationBase.

Methods

__init__(**kwargs) Initializes a new CreateInstanceConfigurationDetails 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'
SOURCE_NONE = 'NONE'
__init__(**kwargs)

Initializes a new CreateInstanceConfigurationDetails object with values from keyword arguments. The default value of the source attribute of this class is NONE and it should not be changed. 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 CreateInstanceConfigurationDetails.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateInstanceConfigurationDetails.
  • display_name (str) – The value to assign to the display_name property of this CreateInstanceConfigurationDetails.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateInstanceConfigurationDetails.
  • source (str) – The value to assign to the source property of this CreateInstanceConfigurationDetails. Allowed values for this property are: “NONE”, “INSTANCE”
  • instance_details (oci.core.models.InstanceConfigurationInstanceDetails) – The value to assign to the instance_details property of this CreateInstanceConfigurationDetails.
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.

instance_details

[Required] Gets the instance_details of this CreateInstanceConfigurationDetails.

Returns:The instance_details of this CreateInstanceConfigurationDetails.
Return type:oci.core.models.InstanceConfigurationInstanceDetails
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