CreateInstanceConfigurationFromInstanceDetails¶
-
class
oci.core.models.
CreateInstanceConfigurationFromInstanceDetails
(**kwargs)¶ Bases:
oci.core.models.create_instance_configuration_base.CreateInstanceConfigurationBase
Details for creating an instance configuration using an existing instance as a template.
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_id
[Required] Gets the instance_id of this CreateInstanceConfigurationFromInstanceDetails. source
Gets the source of this CreateInstanceConfigurationBase. Methods
__init__
(**kwargs)Initializes a new CreateInstanceConfigurationFromInstanceDetails 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 CreateInstanceConfigurationFromInstanceDetails object with values from keyword arguments. The default value of the
source
attribute of this class isINSTANCE
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 CreateInstanceConfigurationFromInstanceDetails.
- defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateInstanceConfigurationFromInstanceDetails.
- display_name (str) – The value to assign to the display_name property of this CreateInstanceConfigurationFromInstanceDetails.
- freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateInstanceConfigurationFromInstanceDetails.
- source (str) – The value to assign to the source property of this CreateInstanceConfigurationFromInstanceDetails. Allowed values for this property are: “NONE”, “INSTANCE”
- instance_id (str) – The value to assign to the instance_id property of this CreateInstanceConfigurationFromInstanceDetails.
-
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
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
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_id
¶ [Required] Gets the instance_id of this CreateInstanceConfigurationFromInstanceDetails. The OCID of the instance to use to create the instance configuration.
Returns: The instance_id of this CreateInstanceConfigurationFromInstanceDetails. Return type: str
-
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 (seelaunch_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, usinginstance_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
-