Class Volume
- java.lang.Object
-
- com.amazonaws.services.ec2.model.Volume
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Volume extends Object implements Serializable, Cloneable
Describes a volume.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Volume()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Volume
clone()
boolean
equals(Object obj)
List<VolumeAttachment>
getAttachments()
Information about the volume attachments.String
getAvailabilityZone()
The Availability Zone for the volume.Date
getCreateTime()
The time stamp when volume creation was initiated.Boolean
getEncrypted()
Indicates whether the volume will be encrypted.Integer
getIops()
The number of I/O operations per second (IOPS) that the volume supports.String
getKmsKeyId()
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.Integer
getSize()
The size of the volume, in GiBs.String
getSnapshotId()
The snapshot from which the volume was created, if applicable.String
getState()
The volume state.List<Tag>
getTags()
Any tags assigned to the volume.String
getVolumeId()
The ID of the volume.String
getVolumeType()
The volume type.int
hashCode()
Boolean
isEncrypted()
Indicates whether the volume will be encrypted.void
setAttachments(Collection<VolumeAttachment> attachments)
Information about the volume attachments.void
setAvailabilityZone(String availabilityZone)
The Availability Zone for the volume.void
setCreateTime(Date createTime)
The time stamp when volume creation was initiated.void
setEncrypted(Boolean encrypted)
Indicates whether the volume will be encrypted.void
setIops(Integer iops)
The number of I/O operations per second (IOPS) that the volume supports.void
setKmsKeyId(String kmsKeyId)
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.void
setSize(Integer size)
The size of the volume, in GiBs.void
setSnapshotId(String snapshotId)
The snapshot from which the volume was created, if applicable.void
setState(VolumeState state)
The volume state.void
setState(String state)
The volume state.void
setTags(Collection<Tag> tags)
Any tags assigned to the volume.void
setVolumeId(String volumeId)
The ID of the volume.void
setVolumeType(VolumeType volumeType)
The volume type.void
setVolumeType(String volumeType)
The volume type.String
toString()
Returns a string representation of this object; useful for testing and debugging.Volume
withAttachments(VolumeAttachment... attachments)
Information about the volume attachments.Volume
withAttachments(Collection<VolumeAttachment> attachments)
Information about the volume attachments.Volume
withAvailabilityZone(String availabilityZone)
The Availability Zone for the volume.Volume
withCreateTime(Date createTime)
The time stamp when volume creation was initiated.Volume
withEncrypted(Boolean encrypted)
Indicates whether the volume will be encrypted.Volume
withIops(Integer iops)
The number of I/O operations per second (IOPS) that the volume supports.Volume
withKmsKeyId(String kmsKeyId)
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.Volume
withSize(Integer size)
The size of the volume, in GiBs.Volume
withSnapshotId(String snapshotId)
The snapshot from which the volume was created, if applicable.Volume
withState(VolumeState state)
The volume state.Volume
withState(String state)
The volume state.Volume
withTags(Tag... tags)
Any tags assigned to the volume.Volume
withTags(Collection<Tag> tags)
Any tags assigned to the volume.Volume
withVolumeId(String volumeId)
The ID of the volume.Volume
withVolumeType(VolumeType volumeType)
The volume type.Volume
withVolumeType(String volumeType)
The volume type.
-
-
-
Method Detail
-
setVolumeId
public void setVolumeId(String volumeId)
The ID of the volume.
- Parameters:
volumeId
- The ID of the volume.
-
getVolumeId
public String getVolumeId()
The ID of the volume.
- Returns:
- The ID of the volume.
-
withVolumeId
public Volume withVolumeId(String volumeId)
The ID of the volume.
- Parameters:
volumeId
- The ID of the volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSize
public void setSize(Integer size)
The size of the volume, in GiBs.
- Parameters:
size
- The size of the volume, in GiBs.
-
getSize
public Integer getSize()
The size of the volume, in GiBs.
- Returns:
- The size of the volume, in GiBs.
-
withSize
public Volume withSize(Integer size)
The size of the volume, in GiBs.
- Parameters:
size
- The size of the volume, in GiBs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSnapshotId
public void setSnapshotId(String snapshotId)
The snapshot from which the volume was created, if applicable.
- Parameters:
snapshotId
- The snapshot from which the volume was created, if applicable.
-
getSnapshotId
public String getSnapshotId()
The snapshot from which the volume was created, if applicable.
- Returns:
- The snapshot from which the volume was created, if applicable.
-
withSnapshotId
public Volume withSnapshotId(String snapshotId)
The snapshot from which the volume was created, if applicable.
- Parameters:
snapshotId
- The snapshot from which the volume was created, if applicable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAvailabilityZone
public void setAvailabilityZone(String availabilityZone)
The Availability Zone for the volume.
- Parameters:
availabilityZone
- The Availability Zone for the volume.
-
getAvailabilityZone
public String getAvailabilityZone()
The Availability Zone for the volume.
- Returns:
- The Availability Zone for the volume.
-
withAvailabilityZone
public Volume withAvailabilityZone(String availabilityZone)
The Availability Zone for the volume.
- Parameters:
availabilityZone
- The Availability Zone for the volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setState
public void setState(String state)
The volume state.
- Parameters:
state
- The volume state.- See Also:
VolumeState
-
getState
public String getState()
The volume state.
- Returns:
- The volume state.
- See Also:
VolumeState
-
withState
public Volume withState(String state)
The volume state.
- Parameters:
state
- The volume state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VolumeState
-
setState
public void setState(VolumeState state)
The volume state.
- Parameters:
state
- The volume state.- See Also:
VolumeState
-
withState
public Volume withState(VolumeState state)
The volume state.
- Parameters:
state
- The volume state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VolumeState
-
setCreateTime
public void setCreateTime(Date createTime)
The time stamp when volume creation was initiated.
- Parameters:
createTime
- The time stamp when volume creation was initiated.
-
getCreateTime
public Date getCreateTime()
The time stamp when volume creation was initiated.
- Returns:
- The time stamp when volume creation was initiated.
-
withCreateTime
public Volume withCreateTime(Date createTime)
The time stamp when volume creation was initiated.
- Parameters:
createTime
- The time stamp when volume creation was initiated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getAttachments
public List<VolumeAttachment> getAttachments()
Information about the volume attachments.
- Returns:
- Information about the volume attachments.
-
setAttachments
public void setAttachments(Collection<VolumeAttachment> attachments)
Information about the volume attachments.
- Parameters:
attachments
- Information about the volume attachments.
-
withAttachments
public Volume withAttachments(VolumeAttachment... attachments)
Information about the volume attachments.
NOTE: This method appends the values to the existing list (if any). Use
setAttachments(java.util.Collection)
orwithAttachments(java.util.Collection)
if you want to override the existing values.- Parameters:
attachments
- Information about the volume attachments.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withAttachments
public Volume withAttachments(Collection<VolumeAttachment> attachments)
Information about the volume attachments.
- Parameters:
attachments
- Information about the volume attachments.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getTags
public List<Tag> getTags()
Any tags assigned to the volume.
- Returns:
- Any tags assigned to the volume.
-
setTags
public void setTags(Collection<Tag> tags)
Any tags assigned to the volume.
- Parameters:
tags
- Any tags assigned to the volume.
-
withTags
public Volume withTags(Tag... tags)
Any tags assigned to the volume.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
orwithTags(java.util.Collection)
if you want to override the existing values.- Parameters:
tags
- Any tags assigned to the volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withTags
public Volume withTags(Collection<Tag> tags)
Any tags assigned to the volume.
- Parameters:
tags
- Any tags assigned to the volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVolumeType
public void setVolumeType(String volumeType)
The volume type. This can be
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- Parameters:
volumeType
- The volume type. This can begp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- See Also:
VolumeType
-
getVolumeType
public String getVolumeType()
The volume type. This can be
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- Returns:
- The volume type. This can be
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes. - See Also:
VolumeType
-
withVolumeType
public Volume withVolumeType(String volumeType)
The volume type. This can be
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- Parameters:
volumeType
- The volume type. This can begp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VolumeType
-
setVolumeType
public void setVolumeType(VolumeType volumeType)
The volume type. This can be
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- Parameters:
volumeType
- The volume type. This can begp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- See Also:
VolumeType
-
withVolumeType
public Volume withVolumeType(VolumeType volumeType)
The volume type. This can be
gp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- Parameters:
volumeType
- The volume type. This can begp2
for General Purpose SSD,io1
for Provisioned IOPS SSD,st1
for Throughput Optimized HDD,sc1
for Cold HDD, orstandard
for Magnetic volumes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VolumeType
-
setIops
public void setIops(Integer iops)
The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for
gp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes.- Parameters:
iops
- The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for
gp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes.
-
getIops
public Integer getIops()
The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for
gp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes.- Returns:
- The number of I/O operations per second (IOPS) that the volume
supports. For Provisioned IOPS SSD volumes, this represents the
number of IOPS that are provisioned for the volume. For General
Purpose SSD volumes, this represents the baseline performance of
the volume and the rate at which the volume accumulates I/O
credits for bursting. For more information on General Purpose SSD
baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute
Cloud User Guide.
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for
gp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes.
-
withIops
public Volume withIops(Integer iops)
The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.
Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for
gp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes.- Parameters:
iops
- The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for
gp2
volumes.Condition: This parameter is required for requests to create
io1
volumes; it is not used in requests to creategp2
,st1
,sc1
, orstandard
volumes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEncrypted
public void setEncrypted(Boolean encrypted)
Indicates whether the volume will be encrypted.
- Parameters:
encrypted
- Indicates whether the volume will be encrypted.
-
getEncrypted
public Boolean getEncrypted()
Indicates whether the volume will be encrypted.
- Returns:
- Indicates whether the volume will be encrypted.
-
withEncrypted
public Volume withEncrypted(Boolean encrypted)
Indicates whether the volume will be encrypted.
- Parameters:
encrypted
- Indicates whether the volume will be encrypted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEncrypted
public Boolean isEncrypted()
Indicates whether the volume will be encrypted.
- Returns:
- Indicates whether the volume will be encrypted.
-
setKmsKeyId
public void setKmsKeyId(String kmsKeyId)
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.
- Parameters:
kmsKeyId
- The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.
-
getKmsKeyId
public String getKmsKeyId()
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.
- Returns:
- The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.
-
withKmsKeyId
public Volume withKmsKeyId(String kmsKeyId)
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.
- Parameters:
kmsKeyId
- The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-