Class CreateVolumeRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.ec2.model.CreateVolumeRequest
-
- All Implemented Interfaces:
ReadLimitInfo,DryRunSupportedRequest<CreateVolumeRequest>,Serializable,Cloneable
public class CreateVolumeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<CreateVolumeRequest>
Contains the parameters for CreateVolume.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description CreateVolumeRequest()Default 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateVolumeRequestclone()Creates a shallow clone of this request.booleanequals(Object obj)StringgetAvailabilityZone()The Availability Zone in which to create the volume.Request<CreateVolumeRequest>getDryRunRequest()This method is intended for internal use only.BooleangetEncrypted()Specifies whether the volume should be encrypted.IntegergetIops()Only valid for Provisioned IOPS SSD volumes.StringgetKmsKeyId()The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.IntegergetSize()The size of the volume, in GiBs.StringgetSnapshotId()The snapshot from which to create the volume.StringgetVolumeType()The volume type.inthashCode()BooleanisEncrypted()Specifies whether the volume should be encrypted.voidsetAvailabilityZone(String availabilityZone)The Availability Zone in which to create the volume.voidsetEncrypted(Boolean encrypted)Specifies whether the volume should be encrypted.voidsetIops(Integer iops)Only valid for Provisioned IOPS SSD volumes.voidsetKmsKeyId(String kmsKeyId)The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.voidsetSize(Integer size)The size of the volume, in GiBs.voidsetSnapshotId(String snapshotId)The snapshot from which to create the volume.voidsetVolumeType(VolumeType volumeType)The volume type.voidsetVolumeType(String volumeType)The volume type.StringtoString()Returns a string representation of this object; useful for testing and debugging.CreateVolumeRequestwithAvailabilityZone(String availabilityZone)The Availability Zone in which to create the volume.CreateVolumeRequestwithEncrypted(Boolean encrypted)Specifies whether the volume should be encrypted.CreateVolumeRequestwithIops(Integer iops)Only valid for Provisioned IOPS SSD volumes.CreateVolumeRequestwithKmsKeyId(String kmsKeyId)The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use when creating the encrypted volume.CreateVolumeRequestwithSize(Integer size)The size of the volume, in GiBs.CreateVolumeRequestwithSnapshotId(String snapshotId)The snapshot from which to create the volume.CreateVolumeRequestwithVolumeType(VolumeType volumeType)The volume type.CreateVolumeRequestwithVolumeType(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 Detail
-
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
public CreateVolumeRequest(Integer size, String availabilityZone)
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
public CreateVolumeRequest(String snapshotId, String availabilityZone)
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 Detail
-
setSize
public void setSize(Integer 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.
- 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
public Integer 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
public CreateVolumeRequest withSize(Integer 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.
- 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
public void setSnapshotId(String snapshotId)
The snapshot from which to create the volume.
- Parameters:
snapshotId- The snapshot from which to create the volume.
-
getSnapshotId
public String getSnapshotId()
The snapshot from which to create the volume.
- Returns:
- The snapshot from which to create the volume.
-
withSnapshotId
public CreateVolumeRequest withSnapshotId(String snapshotId)
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
public void setAvailabilityZone(String availabilityZone)
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
public String 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
public CreateVolumeRequest withAvailabilityZone(String availabilityZone)
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
public void setVolumeType(String volumeType)
The volume type. This can be
gp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- Parameters:
volumeType- The volume type. This can begp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- See Also:
VolumeType
-
getVolumeType
public String getVolumeType()
The volume type. This can be
gp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- Returns:
- The volume type. This can be
gp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard - See Also:
VolumeType
-
withVolumeType
public CreateVolumeRequest withVolumeType(String volumeType)
The volume type. This can be
gp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- Parameters:
volumeType- The volume type. This can begp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- 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
gp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- Parameters:
volumeType- The volume type. This can begp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- See Also:
VolumeType
-
withVolumeType
public CreateVolumeRequest withVolumeType(VolumeType volumeType)
The volume type. This can be
gp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- Parameters:
volumeType- The volume type. This can begp2for General Purpose SSD,io1for Provisioned IOPS SSD,st1for Throughput Optimized HDD,sc1for Cold HDD, orstandardfor Magnetic volumes.Default:
standard- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
VolumeType
-
setIops
public void setIops(Integer 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
- 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
public Integer 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
public CreateVolumeRequest withIops(Integer 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
- 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
public void setEncrypted(Boolean 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.
- 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
public Boolean 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
public CreateVolumeRequest withEncrypted(Boolean 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.
- 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
public Boolean 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
public 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. 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:kmsnamespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekeynamespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyIdis specified, theEncryptedflag 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:kmsnamespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekeynamespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234 -a123-456a-a12b-a123b4cd56ef. If aKmsKeyIdis specified, theEncryptedflag must also be set.
-
getKmsKeyId
public String 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:kmsnamespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekeynamespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyIdis specified, theEncryptedflag 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:kmsnamespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekeynamespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/ abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyIdis specified, theEncryptedflag must also be set.
-
withKmsKeyId
public CreateVolumeRequest 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. 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:kmsnamespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekeynamespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef. If aKmsKeyIdis specified, theEncryptedflag 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:kmsnamespace, followed by the region of the CMK, the AWS account ID of the CMK owner, thekeynamespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234 -a123-456a-a12b-a123b4cd56ef. If aKmsKeyIdis specified, theEncryptedflag must also be set.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getDryRunRequest
public Request<CreateVolumeRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.- Specified by:
getDryRunRequestin interfaceDryRunSupportedRequest<CreateVolumeRequest>
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public CreateVolumeRequest clone()
Description copied from class:AmazonWebServiceRequestCreates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clonein classAmazonWebServiceRequest- See Also:
Object.clone()
-
-