All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.ModifyVolumeRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2016-2021 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. *

*/ private String volumeId; /** *

* 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. *

*/ private Integer size; /** *

* 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. *

*/ private String volumeType; /** *

* 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. *

*/ private Integer iops; /** *

* 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. *

*/ private Integer throughput; /** *

* 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. *

*/ private Boolean multiAttachEnabled; /** *

* The ID of the volume. *

* * @param volumeId * The ID of the volume. */ public void setVolumeId(String volumeId) { this.volumeId = volumeId; } /** *

* The ID of the volume. *

* * @return The ID of the volume. */ public String getVolumeId() { return this.volumeId; } /** *

* The ID of the volume. *

* * @param volumeId * The ID of the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyVolumeRequest withVolumeId(String volumeId) { setVolumeId(volumeId); return this; } /** *

* 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. */ 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. *

* * @param 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. */ 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. *

* * @return 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. */ 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. *

* * @param 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. * @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 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. */ 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 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. */ 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 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 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. *

* * @param 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. */ 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. *

* * @return 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. */ 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. *

* * @param 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. * @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. *

* * @return 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. */ 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 getDryRunRequest() { Request request = new ModifyVolumeRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVolumeId() != null) sb.append("VolumeId: ").append(getVolumeId()).append(","); if (getSize() != null) sb.append("Size: ").append(getSize()).append(","); if (getVolumeType() != null) sb.append("VolumeType: ").append(getVolumeType()).append(","); if (getIops() != null) sb.append("Iops: ").append(getIops()).append(","); if (getThroughput() != null) sb.append("Throughput: ").append(getThroughput()).append(","); if (getMultiAttachEnabled() != null) sb.append("MultiAttachEnabled: ").append(getMultiAttachEnabled()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ModifyVolumeRequest == false) return false; ModifyVolumeRequest other = (ModifyVolumeRequest) obj; if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false; if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; if (other.getSize() == null ^ this.getSize() == null) return false; if (other.getSize() != null && other.getSize().equals(this.getSize()) == false) return false; if (other.getVolumeType() == null ^ this.getVolumeType() == null) return false; if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == false) return false; if (other.getIops() == null ^ this.getIops() == null) return false; if (other.getIops() != null && other.getIops().equals(this.getIops()) == false) return false; if (other.getThroughput() == null ^ this.getThroughput() == null) return false; if (other.getThroughput() != null && other.getThroughput().equals(this.getThroughput()) == false) return false; if (other.getMultiAttachEnabled() == null ^ this.getMultiAttachEnabled() == null) return false; if (other.getMultiAttachEnabled() != null && other.getMultiAttachEnabled().equals(this.getMultiAttachEnabled()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); hashCode = prime * hashCode + ((getIops() == null) ? 0 : getIops().hashCode()); hashCode = prime * hashCode + ((getThroughput() == null) ? 0 : getThroughput().hashCode()); hashCode = prime * hashCode + ((getMultiAttachEnabled() == null) ? 0 : getMultiAttachEnabled().hashCode()); return hashCode; } @Override public ModifyVolumeRequest clone() { return (ModifyVolumeRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy