Class CreateVolumeRequest
- All Implemented Interfaces:
ReadLimitInfo
,DryRunSupportedRequest<CreateVolumeRequest>
,Serializable
,Cloneable
Contains the parameters for CreateVolume.
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for CreateVolumeRequest object.CreateVolumeRequest
(Integer size, String availabilityZone) Constructs a new CreateVolumeRequest object.CreateVolumeRequest
(String snapshotId, String availabilityZone) Constructs a new CreateVolumeRequest object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a shallow clone of this request.boolean
The Availability Zone in which to create the volume.This method is intended for internal use only.Specifies whether the volume should be encrypted.getIops()
Only valid for Provisioned IOPS SSD volumes.The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.getSize()
The size of the volume, in GiBs.The snapshot from which to create the volume.The volume type.int
hashCode()
Specifies whether the volume should be encrypted.void
setAvailabilityZone
(String availabilityZone) The Availability Zone in which to create the volume.void
setEncrypted
(Boolean encrypted) Specifies whether the volume should be encrypted.void
Only valid for Provisioned IOPS SSD volumes.void
setKmsKeyId
(String kmsKeyId) The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.void
The size of the volume, in GiBs.void
setSnapshotId
(String snapshotId) The snapshot from which to create the volume.void
setVolumeType
(VolumeType volumeType) The volume type.void
setVolumeType
(String volumeType) The volume type.toString()
Returns a string representation of this object; useful for testing and debugging.withAvailabilityZone
(String availabilityZone) The Availability Zone in which to create the volume.withEncrypted
(Boolean encrypted) Specifies whether the volume should be encrypted.Only valid for Provisioned IOPS SSD volumes.withKmsKeyId
(String kmsKeyId) The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.The size of the volume, in GiBs.withSnapshotId
(String snapshotId) The snapshot from which to create the volume.withVolumeType
(VolumeType volumeType) The volume type.withVolumeType
(String volumeType) The volume type.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
CreateVolumeRequest
public CreateVolumeRequest()Default constructor for CreateVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
CreateVolumeRequest
Constructs a new CreateVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
size
- The size of the volume, in GiBs.Constraints: 1-16384 for
gp2
, 4-16384 forio1
, 500-16384 forst1
, 500-16384 forsc1
, and 1-1024 forstandard
. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
availabilityZone
- The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
-
CreateVolumeRequest
Constructs a new CreateVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
snapshotId
- The snapshot from which to create the volume.availabilityZone
- The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
-
-
Method Details
-
setSize
The size of the volume, in GiBs.
Constraints: 1-16384 for
gp2
, 4-16384 forio1
, 500-16384 forst1
, 500-16384 forsc1
, and 1-1024 forstandard
. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
- Parameters:
size
- The size of the volume, in GiBs.Constraints: 1-16384 for
gp2
, 4-16384 forio1
, 500-16384 forst1
, 500-16384 forsc1
, and 1-1024 forstandard
. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
-
getSize
The size of the volume, in GiBs.
Constraints: 1-16384 for
gp2
, 4-16384 forio1
, 500-16384 forst1
, 500-16384 forsc1
, and 1-1024 forstandard
. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
- Returns:
- The size of the volume, in GiBs.
Constraints: 1-16384 for
gp2
, 4-16384 forio1
, 500-16384 forst1
, 500-16384 forsc1
, and 1-1024 forstandard
. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
-
withSize
The size of the volume, in GiBs.
Constraints: 1-16384 for
gp2
, 4-16384 forio1
, 500-16384 forst1
, 500-16384 forsc1
, and 1-1024 forstandard
. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
- Parameters:
size
- The size of the volume, in GiBs.Constraints: 1-16384 for
gp2
, 4-16384 forio1
, 500-16384 forst1
, 500-16384 forsc1
, and 1-1024 forstandard
. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSnapshotId
The snapshot from which to create the volume.
- Parameters:
snapshotId
- The snapshot from which to create the volume.
-
getSnapshotId
The snapshot from which to create the volume.
- Returns:
- The snapshot from which to create the volume.
-
withSnapshotId
The snapshot from which to create the volume.
- Parameters:
snapshotId
- The snapshot from which to create the volume.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAvailabilityZone
The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
- Parameters:
availabilityZone
- The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
-
getAvailabilityZone
The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
- Returns:
- The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
-
withAvailabilityZone
The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.
- Parameters:
availabilityZone
- The Availability Zone in which to create the volume. Use DescribeAvailabilityZones to list the Availability Zones that are currently available to you.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVolumeType
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.Default:
standard
- 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.Default:
standard
- See Also:
-
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.Default:
standard
- 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.Default:
standard
- See Also:
-
withVolumeType
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.Default:
standard
- 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.Default:
standard
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setVolumeType
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.Default:
standard
- 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.Default:
standard
- See Also:
-
withVolumeType
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.Default:
standard
- 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.Default:
standard
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setIops
Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.
Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
- Parameters:
iops
- Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
-
getIops
Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.
Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
- Returns:
- Only valid for Provisioned IOPS SSD volumes. The number of I/O
operations per second (IOPS) to provision for the volume, with a
maximum ratio of 30 IOPS/GiB.
Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
-
withIops
Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.
Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
- Parameters:
iops
- Only valid for Provisioned IOPS SSD volumes. The number of I/O operations per second (IOPS) to provision for the volume, with a maximum ratio of 30 IOPS/GiB.Constraint: Range is 100 to 20000 for Provisioned IOPS SSD volumes
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEncrypted
Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
encrypted
- Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
-
getEncrypted
Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
- Returns:
- Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
-
withEncrypted
Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
encrypted
- Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEncrypted
Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
- Returns:
- Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are automatically encrypted. There is no way to create an encrypted volume from an unencrypted snapshot or vice versa. If your AMI uses encrypted volumes, you can only launch it on supported instance types. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide.
-
setKmsKeyId
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the
arn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyId
is specified, theEncrypted
flag must also be set.- Parameters:
kmsKeyId
- The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains thearn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234 -a123-456a-a12b-a123b4cd56ef. If aKmsKeyId
is specified, theEncrypted
flag must also be set.
-
getKmsKeyId
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the
arn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyId
is specified, theEncrypted
flag must also be set.- Returns:
- The full ARN of the AWS Key Management Service (AWS KMS) customer
master key (CMK) to use when creating the encrypted volume. This
parameter is only required if you want to use a non-default CMK;
if this parameter is not specified, the default CMK for EBS is
used. The ARN contains the
arn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/ abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyId
is specified, theEncrypted
flag must also be set.
-
withKmsKeyId
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains the
arn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyId
is specified, theEncrypted
flag must also be set.- Parameters:
kmsKeyId
- The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume. This parameter is only required if you want to use a non-default CMK; if this parameter is not specified, the default CMK for EBS is used. The ARN contains thearn:aws:kms
namespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekey
namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234 -a123-456a-a12b-a123b4cd56ef. If aKmsKeyId
is specified, theEncrypted
flag must also be set.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getDryRunRequest
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.- Specified by:
getDryRunRequest
in interfaceDryRunSupportedRequest<CreateVolumeRequest>
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
-