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.

Attributes:

LIFECYCLE_STATE_AVAILABLE

A constant which can be used with the lifecycle_state property of a Volume.

LIFECYCLE_STATE_FAULTY

A constant which can be used with the lifecycle_state property of a Volume.

LIFECYCLE_STATE_PROVISIONING

A constant which can be used with the lifecycle_state property of a Volume.

LIFECYCLE_STATE_RESTORING

A constant which can be used with the lifecycle_state property of a Volume.

LIFECYCLE_STATE_TERMINATED

A constant which can be used with the lifecycle_state property of a Volume.

LIFECYCLE_STATE_TERMINATING

A constant which can be used with the lifecycle_state property of a Volume.

auto_tuned_vpus_per_gb

Gets the auto_tuned_vpus_per_gb of this Volume.

autotune_policies

Gets the autotune_policies of this Volume.

availability_domain

[Required] Gets the availability_domain of this Volume.

block_volume_replicas

Gets the block_volume_replicas of this Volume.

cluster_placement_group_id

Gets the cluster_placement_group_id of this Volume.

compartment_id

[Required] Gets the compartment_id of this Volume.

defined_tags

Gets the defined_tags of this Volume.

display_name

[Required] Gets the display_name of this Volume.

freeform_tags

Gets the freeform_tags of this Volume.

id

[Required] Gets the id of this Volume.

is_auto_tune_enabled

Gets the is_auto_tune_enabled of this Volume.

is_hydrated

Gets the is_hydrated of this Volume.

is_reservations_enabled

Gets the is_reservations_enabled of this Volume.

kms_key_id

Gets the kms_key_id of this Volume.

lifecycle_state

[Required] Gets the lifecycle_state of this Volume.

size_in_gbs

Gets the size_in_gbs of this Volume.

size_in_mbs

[Required] Gets the size_in_mbs of this Volume.

source_details

Gets the source_details of this Volume.

system_tags

Gets the system_tags of this Volume.

time_created

[Required] Gets the time_created of this Volume.

volume_group_id

Gets the volume_group_id of this Volume.

vpus_per_gb

Gets the vpus_per_gb of this Volume.

Methods:

__init__(**kwargs)

Initializes a new Volume object with values from keyword arguments.

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’.

  • vpus_per_gb (int) – The value to assign to the vpus_per_gb property of this Volume.

  • cluster_placement_group_id (str) – The value to assign to the cluster_placement_group_id property of this Volume.

  • 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 (oci.core.models.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.

  • is_auto_tune_enabled (bool) – The value to assign to the is_auto_tune_enabled property of this Volume.

  • auto_tuned_vpus_per_gb (int) – The value to assign to the auto_tuned_vpus_per_gb property of this Volume.

  • block_volume_replicas (list[oci.core.models.BlockVolumeReplicaInfo]) – The value to assign to the block_volume_replicas property of this Volume.

  • autotune_policies (list[oci.core.models.AutotunePolicy]) – The value to assign to the autotune_policies property of this Volume.

  • is_reservations_enabled (bool) – The value to assign to the is_reservations_enabled property of this Volume.

property auto_tuned_vpus_per_gb

Gets the auto_tuned_vpus_per_gb of this Volume. The number of Volume Performance Units per GB that this volume is effectively tuned to.

Returns

The auto_tuned_vpus_per_gb of this Volume.

Return type

int

property autotune_policies

Gets the autotune_policies of this Volume. The list of autotune policies enabled for this volume.

Returns

The autotune_policies of this Volume.

Return type

list[oci.core.models.AutotunePolicy]

property 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

property block_volume_replicas

Gets the block_volume_replicas of this Volume. The list of block volume replicas of this volume.

Returns

The block_volume_replicas of this Volume.

Return type

list[oci.core.models.BlockVolumeReplicaInfo]

property cluster_placement_group_id

Gets the cluster_placement_group_id of this Volume. The clusterPlacementGroup Id of the volume for volume placement.

Returns

The cluster_placement_group_id of this Volume.

Return type

str

property 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

property 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))

property 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

property 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)

property id

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

Returns

The id of this Volume.

Return type

str

property is_auto_tune_enabled

Gets the is_auto_tune_enabled of this Volume. Specifies whether the auto-tune performance is enabled for this volume. This field is deprecated. Use the DetachedVolumeAutotunePolicy instead to enable the volume for detached autotune.

Returns

The is_auto_tune_enabled of this Volume.

Return type

bool

property 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

property is_reservations_enabled

Gets the is_reservations_enabled of this Volume. When set to true, enables SCSI Persistent Reservation (SCSI PR) for the volume. For more information, see Persistent Reservations.

Returns

The is_reservations_enabled of this Volume.

Return type

bool

property kms_key_id

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

Returns

The kms_key_id of this Volume.

Return type

str

property 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

property 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

property 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

property source_details

Gets the source_details of this Volume.

Returns

The source_details of this Volume.

Return type

oci.core.models.VolumeSourceDetails

property 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))

property 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

property 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

property vpus_per_gb

Gets the vpus_per_gb of this Volume. The number of volume performance units (VPUs) that will be applied to this volume per GB, representing the Block Volume service’s elastic performance options. See Block Volume Performance Levels for more information.

Allowed values:

  • 0: Represents Lower Cost option.

  • 10: Represents Balanced option.

  • 20: Represents Higher Performance option.

  • 30-120: Represents the Ultra High Performance option.

For performance autotune enabled volumes, It would be the Default(Minimum) VPUs/GB.

Returns

The vpus_per_gb of this Volume.

Return type

int