Volume

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

Bases: object

A detachable block volume device that allows you to dynamically expand the storage capacity of an instance. For more information, see Overview of Cloud Volume Storage.

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.

LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'

A constant which can be used with the lifecycle_state property of a Volume. This constant has a value of "AVAILABLE"

LIFECYCLE_STATE_FAULTY = 'FAULTY'

A constant which can be used with the lifecycle_state property of a Volume. This constant has a value of "FAULTY"

LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'

A constant which can be used with the lifecycle_state property of a Volume. This constant has a value of "PROVISIONING"

LIFECYCLE_STATE_RESTORING = 'RESTORING'

A constant which can be used with the lifecycle_state property of a Volume. This constant has a value of "RESTORING"

LIFECYCLE_STATE_TERMINATED = 'TERMINATED'

A constant which can be used with the lifecycle_state property of a Volume. This constant has a value of "TERMINATED"

LIFECYCLE_STATE_TERMINATING = 'TERMINATING'

A constant which can be used with the lifecycle_state property of a Volume. This constant has a value of "TERMINATING"

__init__(**kwargs)

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

Parameters:
  • availability_domain (str) -- The value to assign to the availability_domain property of this Volume.
  • compartment_id (str) -- The value to assign to the compartment_id property of this Volume.
  • defined_tags (dict(str, dict(str, object))) -- The value to assign to the defined_tags property of this Volume.
  • display_name (str) -- The value to assign to the display_name property of this Volume.
  • freeform_tags (dict(str, str)) -- The value to assign to the freeform_tags property of this Volume.
  • system_tags (dict(str, dict(str, object))) -- The value to assign to the system_tags property of this Volume.
  • id (str) -- The value to assign to the id property of this Volume.
  • is_hydrated (bool) -- The value to assign to the is_hydrated property of this Volume.
  • kms_key_id (str) -- The value to assign to the kms_key_id property of this Volume.
  • lifecycle_state (str) -- The value to assign to the lifecycle_state property of this Volume. Allowed values for this property are: "PROVISIONING", "RESTORING", "AVAILABLE", "TERMINATING", "TERMINATED", "FAULTY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
  • size_in_gbs (int) -- The value to assign to the size_in_gbs property of this Volume.
  • size_in_mbs (int) -- The value to assign to the size_in_mbs property of this Volume.
  • source_details (VolumeSourceDetails) -- The value to assign to the source_details property of this Volume.
  • time_created (datetime) -- The value to assign to the time_created property of this Volume.
  • volume_group_id (str) -- The value to assign to the volume_group_id property of this Volume.
availability_domain

[Required] Gets the availability_domain of this Volume. The availability domain of the volume.

Example: Uocm:PHX-AD-1

Returns:The availability_domain of this Volume.
Return type:str
compartment_id

[Required] Gets the compartment_id of this Volume. The OCID of the compartment that contains the volume.

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

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

[Required] Gets the display_name of this Volume. A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

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

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

[Required] Gets the id of this Volume. The OCID of the volume.

Returns:The id of this Volume.
Return type:str
is_hydrated

Gets the is_hydrated of this Volume. Specifies whether the cloned volume's data has finished copying from the source volume or backup.

Returns:The is_hydrated of this Volume.
Return type:bool
kms_key_id

Gets the kms_key_id of this Volume. The OCID of the KMS key which is the master encryption key for the volume.

Returns:The kms_key_id of this Volume.
Return type:str
lifecycle_state

[Required] Gets the lifecycle_state of this Volume. The current state of a volume.

Allowed values for this property are: "PROVISIONING", "RESTORING", "AVAILABLE", "TERMINATING", "TERMINATED", "FAULTY", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.

Returns:The lifecycle_state of this Volume.
Return type:str
size_in_gbs

Gets the size_in_gbs of this Volume. The size of the volume in GBs.

Returns:The size_in_gbs of this Volume.
Return type:int
size_in_mbs

[Required] Gets the size_in_mbs of this Volume. The size of the volume in MBs. This field is deprecated. Use sizeInGBs instead.

Returns:The size_in_mbs of this Volume.
Return type:int
source_details

Gets the source_details of this Volume. The volume source, either an existing volume in the same availability domain or a volume backup. If null, an empty volume is created.

Returns:The source_details of this Volume.
Return type:VolumeSourceDetails
system_tags

Gets the system_tags of this Volume. System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace": {"bar-key": "value"}}

Returns:The system_tags of this Volume.
Return type:dict(str, dict(str, object))
time_created

[Required] Gets the time_created of this Volume. The date and time the volume was created. Format defined by RFC3339.

Returns:The time_created of this Volume.
Return type:datetime
volume_group_id

Gets the volume_group_id of this Volume. The OCID of the source volume group.

Returns:The volume_group_id of this Volume.
Return type:str