Class DetachVolumeRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.DetachVolumeRequest
All Implemented Interfaces:
ReadLimitInfo, DryRunSupportedRequest<DetachVolumeRequest>, Serializable, Cloneable

public class DetachVolumeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<DetachVolumeRequest>

Contains the parameters for DetachVolume.

See Also:
  • Constructor Details

    • DetachVolumeRequest

      public DetachVolumeRequest()
      Default constructor for DetachVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • DetachVolumeRequest

      public DetachVolumeRequest(String volumeId)
      Constructs a new DetachVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      volumeId - The ID of the 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 DetachVolumeRequest 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.
    • setInstanceId

      public void setInstanceId(String instanceId)

      The ID of the instance.

      Parameters:
      instanceId - The ID of the instance.
    • getInstanceId

      public String getInstanceId()

      The ID of the instance.

      Returns:
      The ID of the instance.
    • withInstanceId

      public DetachVolumeRequest withInstanceId(String instanceId)

      The ID of the instance.

      Parameters:
      instanceId - The ID of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setDevice

      public void setDevice(String device)

      The device name.

      Parameters:
      device - The device name.
    • getDevice

      public String getDevice()

      The device name.

      Returns:
      The device name.
    • withDevice

      public DetachVolumeRequest withDevice(String device)

      The device name.

      Parameters:
      device - The device name.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setForce

      public void setForce(Boolean force)

      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

      Parameters:
      force - Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
    • getForce

      public Boolean getForce()

      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

      Returns:
      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
    • withForce

      public DetachVolumeRequest withForce(Boolean force)

      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

      Parameters:
      force - Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • isForce

      public Boolean isForce()

      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.

      Returns:
      Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
    • getDryRunRequest

      public Request<DetachVolumeRequest> 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 interface DryRunSupportedRequest<DetachVolumeRequest>
    • 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 DetachVolumeRequest 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 class AmazonWebServiceRequest
      See Also: