/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.ModifyVolumeRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModifyVolumeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest
* The ID of the volume.
*
* The target size of the volume, in GiB. The target volume size must be greater than or equal to the existing size
* of the volume.
*
* The following are the supported volumes sizes for each volume type:
*
*
*
*
*
* Default: The existing size is retained.
*
* The target EBS volume type of the volume. For more information, see Amazon EBS volume types in the
* Amazon Elastic Compute Cloud User Guide.
*
* Default: The existing type is retained.
*
* The target IOPS rate of the volume. This parameter is valid only for
* The following are the supported values for each volume type:
*
*
*
*
* Default: The existing value is retained if you keep the same volume type. If you change the volume type to
*
* The target throughput of the volume, in MiB/s. This parameter is valid only for
* Default: The existing value is retained if the source and target volume type is
* Valid Range: Minimum value of 125. Maximum value of 1000.
*
* Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up
* to 16
* Nitro-based instances in the same Availability Zone. This parameter is supported with
* The ID of the volume.
*
* The ID of the volume.
*
* The ID of the volume.
*
* The target size of the volume, in GiB. The target volume size must be greater than or equal to the existing size
* of the volume.
*
* The following are the supported volumes sizes for each volume type:
*
*
*
*
*
* Default: The existing size is retained.
*
*
* gp2
and gp3
: 1-16,384
* io1
and io2
: 4-16,384
* st1
and sc1
: 125-16,384
* standard
: 1-1,024
* gp3
, io1
, and
* io2
volumes.
*
*
* gp3
: 3,000-16,000 IOPS
* io1
: 100-64,000 IOPS
* io2
: 100-64,000 IOPS
* io1
, io2
, or gp3
, the default is 3,000.
* gp3
volumes. The
* maximum value is 1,000.
* gp3
. Otherwise, the
* default value is 125.
* io1
and
* io2
volumes only. For more information, see Amazon EBS Multi-Attach in
* the Amazon Elastic Compute Cloud User Guide.
*
*
* gp2
and gp3
: 1-16,384
* io1
and io2
: 4-16,384
* st1
and sc1
: 125-16,384
* standard
: 1-1,024
*
* The following are the supported volumes sizes for each volume type: *
*
* gp2
and gp3
: 1-16,384
*
* io1
and io2
: 4-16,384
*
* st1
and sc1
: 125-16,384
*
* standard
: 1-1,024
*
* Default: The existing size is retained. */ public void setSize(Integer size) { this.size = size; } /** *
* The target size of the volume, in GiB. The target volume size must be greater than or equal to the existing size * of the volume. *
** The following are the supported volumes sizes for each volume type: *
*
* gp2
and gp3
: 1-16,384
*
* io1
and io2
: 4-16,384
*
* st1
and sc1
: 125-16,384
*
* standard
: 1-1,024
*
* Default: The existing size is retained. *
* * @return The target size of the volume, in GiB. The target volume size must be greater than or equal to the * existing size of the volume. ** The following are the supported volumes sizes for each volume type: *
*
* gp2
and gp3
: 1-16,384
*
* io1
and io2
: 4-16,384
*
* st1
and sc1
: 125-16,384
*
* standard
: 1-1,024
*
* Default: The existing size is retained. */ public Integer getSize() { return this.size; } /** *
* The target size of the volume, in GiB. The target volume size must be greater than or equal to the existing size * of the volume. *
** The following are the supported volumes sizes for each volume type: *
*
* gp2
and gp3
: 1-16,384
*
* io1
and io2
: 4-16,384
*
* st1
and sc1
: 125-16,384
*
* standard
: 1-1,024
*
* Default: The existing size is retained. *
* * @param size * The target size of the volume, in GiB. The target volume size must be greater than or equal to the * existing size of the volume. ** The following are the supported volumes sizes for each volume type: *
*
* gp2
and gp3
: 1-16,384
*
* io1
and io2
: 4-16,384
*
* st1
and sc1
: 125-16,384
*
* standard
: 1-1,024
*
* Default: The existing size is retained. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyVolumeRequest withSize(Integer size) { setSize(size); return this; } /** *
* The target EBS volume type of the volume. For more information, see Amazon EBS volume types in the * Amazon Elastic Compute Cloud User Guide. *
** Default: The existing type is retained. *
* * @param volumeType * The target EBS volume type of the volume. For more information, see Amazon EBS volume types * in the Amazon Elastic Compute Cloud User Guide. ** Default: The existing type is retained. * @see VolumeType */ public void setVolumeType(String volumeType) { this.volumeType = volumeType; } /** *
* The target EBS volume type of the volume. For more information, see Amazon EBS volume types in the * Amazon Elastic Compute Cloud User Guide. *
** Default: The existing type is retained. *
* * @return The target EBS volume type of the volume. For more information, see Amazon EBS volume * types in the Amazon Elastic Compute Cloud User Guide. ** Default: The existing type is retained. * @see VolumeType */ public String getVolumeType() { return this.volumeType; } /** *
* The target EBS volume type of the volume. For more information, see Amazon EBS volume types in the * Amazon Elastic Compute Cloud User Guide. *
** Default: The existing type is retained. *
* * @param volumeType * The target EBS volume type of the volume. For more information, see Amazon EBS volume types * in the Amazon Elastic Compute Cloud User Guide. ** Default: The existing type is retained. * @return Returns a reference to this object so that method calls can be chained together. * @see VolumeType */ public ModifyVolumeRequest withVolumeType(String volumeType) { setVolumeType(volumeType); return this; } /** *
* The target EBS volume type of the volume. For more information, see Amazon EBS volume types in the * Amazon Elastic Compute Cloud User Guide. *
** Default: The existing type is retained. *
* * @param volumeType * The target EBS volume type of the volume. For more information, see Amazon EBS volume types * in the Amazon Elastic Compute Cloud User Guide. ** Default: The existing type is retained. * @see VolumeType */ public void setVolumeType(VolumeType volumeType) { withVolumeType(volumeType); } /** *
* The target EBS volume type of the volume. For more information, see Amazon EBS volume types in the * Amazon Elastic Compute Cloud User Guide. *
** Default: The existing type is retained. *
* * @param volumeType * The target EBS volume type of the volume. For more information, see Amazon EBS volume types * in the Amazon Elastic Compute Cloud User Guide. ** Default: The existing type is retained. * @return Returns a reference to this object so that method calls can be chained together. * @see VolumeType */ public ModifyVolumeRequest withVolumeType(VolumeType volumeType) { this.volumeType = volumeType.toString(); return this; } /** *
* The target IOPS rate of the volume. This parameter is valid only for gp3
, io1
, and
* io2
volumes.
*
* The following are the supported values for each volume type: *
*
* gp3
: 3,000-16,000 IOPS
*
* io1
: 100-64,000 IOPS
*
* io2
: 100-64,000 IOPS
*
* Default: The existing value is retained if you keep the same volume type. If you change the volume type to
* io1
, io2
, or gp3
, the default is 3,000.
*
gp3
, io1
,
* and io2
volumes.
* * The following are the supported values for each volume type: *
*
* gp3
: 3,000-16,000 IOPS
*
* io1
: 100-64,000 IOPS
*
* io2
: 100-64,000 IOPS
*
* Default: The existing value is retained if you keep the same volume type. If you change the volume type to
* io1
, io2
, or gp3
, the default is 3,000.
*/
public void setIops(Integer iops) {
this.iops = iops;
}
/**
*
* The target IOPS rate of the volume. This parameter is valid only for gp3
, io1
, and
* io2
volumes.
*
* The following are the supported values for each volume type: *
*
* gp3
: 3,000-16,000 IOPS
*
* io1
: 100-64,000 IOPS
*
* io2
: 100-64,000 IOPS
*
* Default: The existing value is retained if you keep the same volume type. If you change the volume type to
* io1
, io2
, or gp3
, the default is 3,000.
*
gp3
, io1
,
* and io2
volumes.
* * The following are the supported values for each volume type: *
*
* gp3
: 3,000-16,000 IOPS
*
* io1
: 100-64,000 IOPS
*
* io2
: 100-64,000 IOPS
*
* Default: The existing value is retained if you keep the same volume type. If you change the volume type
* to io1
, io2
, or gp3
, the default is 3,000.
*/
public Integer getIops() {
return this.iops;
}
/**
*
* The target IOPS rate of the volume. This parameter is valid only for gp3
, io1
, and
* io2
volumes.
*
* The following are the supported values for each volume type: *
*
* gp3
: 3,000-16,000 IOPS
*
* io1
: 100-64,000 IOPS
*
* io2
: 100-64,000 IOPS
*
* Default: The existing value is retained if you keep the same volume type. If you change the volume type to
* io1
, io2
, or gp3
, the default is 3,000.
*
gp3
, io1
,
* and io2
volumes.
* * The following are the supported values for each volume type: *
*
* gp3
: 3,000-16,000 IOPS
*
* io1
: 100-64,000 IOPS
*
* io2
: 100-64,000 IOPS
*
* Default: The existing value is retained if you keep the same volume type. If you change the volume type to
* io1
, io2
, or gp3
, the default is 3,000.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyVolumeRequest withIops(Integer iops) {
setIops(iops);
return this;
}
/**
*
* The target throughput of the volume, in MiB/s. This parameter is valid only for gp3
volumes. The
* maximum value is 1,000.
*
* Default: The existing value is retained if the source and target volume type is gp3
. Otherwise, the
* default value is 125.
*
* Valid Range: Minimum value of 125. Maximum value of 1000. *
* * @param throughput * The target throughput of the volume, in MiB/s. This parameter is valid only forgp3
volumes.
* The maximum value is 1,000.
*
* Default: The existing value is retained if the source and target volume type is gp3
.
* Otherwise, the default value is 125.
*
* Valid Range: Minimum value of 125. Maximum value of 1000. */ public void setThroughput(Integer throughput) { this.throughput = throughput; } /** *
* The target throughput of the volume, in MiB/s. This parameter is valid only for gp3
volumes. The
* maximum value is 1,000.
*
* Default: The existing value is retained if the source and target volume type is gp3
. Otherwise, the
* default value is 125.
*
* Valid Range: Minimum value of 125. Maximum value of 1000. *
* * @return The target throughput of the volume, in MiB/s. This parameter is valid only forgp3
volumes.
* The maximum value is 1,000.
*
* Default: The existing value is retained if the source and target volume type is gp3
.
* Otherwise, the default value is 125.
*
* Valid Range: Minimum value of 125. Maximum value of 1000. */ public Integer getThroughput() { return this.throughput; } /** *
* The target throughput of the volume, in MiB/s. This parameter is valid only for gp3
volumes. The
* maximum value is 1,000.
*
* Default: The existing value is retained if the source and target volume type is gp3
. Otherwise, the
* default value is 125.
*
* Valid Range: Minimum value of 125. Maximum value of 1000. *
* * @param throughput * The target throughput of the volume, in MiB/s. This parameter is valid only forgp3
volumes.
* The maximum value is 1,000.
*
* Default: The existing value is retained if the source and target volume type is gp3
.
* Otherwise, the default value is 125.
*
* Valid Range: Minimum value of 125. Maximum value of 1000. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyVolumeRequest withThroughput(Integer throughput) { setThroughput(throughput); return this; } /** *
* Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up
* to 16
* Nitro-based instances in the same Availability Zone. This parameter is supported with io1
and
* io2
volumes only. For more information, see Amazon EBS Multi-Attach in
* the Amazon Elastic Compute Cloud User Guide.
*
io1
* and io2
volumes only. For more information, see Amazon EBS
* Multi-Attach in the Amazon Elastic Compute Cloud User Guide.
*/
public void setMultiAttachEnabled(Boolean multiAttachEnabled) {
this.multiAttachEnabled = multiAttachEnabled;
}
/**
*
* Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up
* to 16
* Nitro-based instances in the same Availability Zone. This parameter is supported with io1
and
* io2
volumes only. For more information, see Amazon EBS Multi-Attach in
* the Amazon Elastic Compute Cloud User Guide.
*
io1
and io2
volumes only. For more information, see Amazon EBS
* Multi-Attach in the Amazon Elastic Compute Cloud User Guide.
*/
public Boolean getMultiAttachEnabled() {
return this.multiAttachEnabled;
}
/**
*
* Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up
* to 16
* Nitro-based instances in the same Availability Zone. This parameter is supported with io1
and
* io2
volumes only. For more information, see Amazon EBS Multi-Attach in
* the Amazon Elastic Compute Cloud User Guide.
*
io1
* and io2
volumes only. For more information, see Amazon EBS
* Multi-Attach in the Amazon Elastic Compute Cloud User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyVolumeRequest withMultiAttachEnabled(Boolean multiAttachEnabled) {
setMultiAttachEnabled(multiAttachEnabled);
return this;
}
/**
*
* Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up
* to 16
* Nitro-based instances in the same Availability Zone. This parameter is supported with io1
and
* io2
volumes only. For more information, see Amazon EBS Multi-Attach in
* the Amazon Elastic Compute Cloud User Guide.
*
io1
and io2
volumes only. For more information, see Amazon EBS
* Multi-Attach in the Amazon Elastic Compute Cloud User Guide.
*/
public Boolean isMultiAttachEnabled() {
return this.multiAttachEnabled;
}
/**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/
@Override
public Request