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:
  • Constructor Details

    • Volume

      public Volume()
  • Method Details

    • 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:
    • getState

      public String getState()

      The volume state.

      Returns:
      The volume state.
      See Also:
    • 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:
    • setState

      public void setState(VolumeState state)

      The volume state.

      Parameters:
      state - The volume state.
      See Also:
    • 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:
    • 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) or withAttachments(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) or withTags(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, or standard for Magnetic volumes.

      Parameters:
      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, or standard for Magnetic volumes.
      See Also:
    • 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, or standard 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, or standard for Magnetic volumes.
      See Also:
    • 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, or standard for Magnetic volumes.

      Parameters:
      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, or standard for Magnetic volumes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • 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, or standard for Magnetic volumes.

      Parameters:
      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, or standard for Magnetic volumes.
      See Also:
    • 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, or standard for Magnetic volumes.

      Parameters:
      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, or standard for Magnetic volumes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • 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 create gp2, st1, sc1, or standard 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 create gp2, st1, sc1, or standard 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 create gp2, st1, sc1, or standard 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 create gp2, st1, sc1, or standard 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 create gp2, st1, sc1, or standard 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 create gp2, st1, sc1, or standard 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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Volume clone()
      Overrides:
      clone in class Object