Tabnine Logo
DetachVolumeRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
DetachVolumeRequest
in
com.amazonaws.services.ec2.model

Best Java code snippets using com.amazonaws.services.ec2.model.DetachVolumeRequest (Showing top 20 results out of 315)

origin: aws/aws-sdk-java

/**
 * Constructs a new DetachVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to
 * initialize any additional object members.
 * 
 * @param volumeId
 *        The ID of the volume.
 */
public DetachVolumeRequest(String volumeId) {
  setVolumeId(volumeId);
}
origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getDevice() == null) ? 0 : getDevice().hashCode());
  hashCode = prime * hashCode + ((getForce() == null) ? 0 : getForce().hashCode());
  hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
  hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode());
  return hashCode;
}
origin: aws/aws-sdk-java

/**
 * <p>
 * The device name.
 * </p>
 * 
 * @param device
 *        The device name.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public DetachVolumeRequest withDevice(String device) {
  setDevice(device);
  return this;
}
origin: aws-amplify/aws-sdk-android

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  
  hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); 
  hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode()); 
  hashCode = prime * hashCode + ((getDevice() == null) ? 0 : getDevice().hashCode()); 
  hashCode = prime * hashCode + ((isForce() == null) ? 0 : isForce().hashCode()); 
  return hashCode;
}

origin: org.kuali.common/kuali-aws

@Override
public String detachVolume(VolumeRequest request) {
  com.amazonaws.services.ec2.model.DetachVolumeRequest dvr = new com.amazonaws.services.ec2.model.DetachVolumeRequest();
  dvr.setInstanceId(request.getInstanceId());
  dvr.setVolumeId(request.getVolumeId());
  dvr.setDevice(request.getDevice());
  client.detachVolume(dvr);
  return waitForDetached(request.getVolumeId(), request.getTimeout());
}
origin: UrbanCode/terraform

/**
 *
 * @param volumeId
 * @param instanceId
 * @param device
 * @param force
 * @param ec2Client
 */
public void detachEbsVolumeFromInstance(String volumeId, String instanceId, String device,
                       boolean force, AmazonEC2 ec2Client) {
  DetachVolumeRequest request = new DetachVolumeRequest()
                    .withDevice(device)
                    .withInstanceId(instanceId)
                    .withVolumeId(volumeId)
                    .withForce(force);
  @SuppressWarnings("unused")
  DetachVolumeResult result = ec2Client.detachVolume(request);
}
origin: com.amazonaws.resources/aws-resources-ec2

@Override
public DetachVolumeResult detachFromInstance(
    ResultCapture<DetachVolumeResult> extractor) {
  DetachVolumeRequest request = new DetachVolumeRequest();
  return detachFromInstance(request, extractor);
}
origin: aws/aws-sdk-java

/**
 * <p>
 * The ID of the instance.
 * </p>
 * 
 * @param instanceId
 *        The ID of the instance.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public DetachVolumeRequest withInstanceId(String instanceId) {
  setInstanceId(instanceId);
  return this;
}
origin: aws-amplify/aws-sdk-android

@Override
public boolean equals(Object obj) {
  if (this == obj) return true;
  if (obj == null) return false;
  if (obj instanceof DetachVolumeRequest == false) return false;
  DetachVolumeRequest other = (DetachVolumeRequest)obj;
  
  if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false;
  if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; 
  if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false;
  if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false; 
  if (other.getDevice() == null ^ this.getDevice() == null) return false;
  if (other.getDevice() != null && other.getDevice().equals(this.getDevice()) == false) return false; 
  if (other.isForce() == null ^ this.isForce() == null) return false;
  if (other.isForce() != null && other.isForce().equals(this.isForce()) == false) return false; 
  return true;
}

origin: amazon-archives/aws-sdk-java-resources

@Override
public DetachVolumeResult detachFromInstance(
    ResultCapture<DetachVolumeResult> extractor) {
  DetachVolumeRequest request = new DetachVolumeRequest();
  return detachFromInstance(request, extractor);
}
origin: com.amazonaws/aws-java-sdk-ec2

/**
 * <p>
 * The ID of the instance.
 * </p>
 * 
 * @param instanceId
 *        The ID of the instance.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public DetachVolumeRequest withInstanceId(String instanceId) {
  setInstanceId(instanceId);
  return this;
}
origin: aws/aws-sdk-java

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (obj instanceof DetachVolumeRequest == false)
    return false;
  DetachVolumeRequest other = (DetachVolumeRequest) obj;
  if (other.getDevice() == null ^ this.getDevice() == null)
    return false;
  if (other.getDevice() != null && other.getDevice().equals(this.getDevice()) == false)
    return false;
  if (other.getForce() == null ^ this.getForce() == null)
    return false;
  if (other.getForce() != null && other.getForce().equals(this.getForce()) == false)
    return false;
  if (other.getInstanceId() == null ^ this.getInstanceId() == null)
    return false;
  if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
    return false;
  if (other.getVolumeId() == null ^ this.getVolumeId() == null)
    return false;
  if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false)
    return false;
  return true;
}
origin: aws-amplify/aws-sdk-android

/**
 * Returns a string representation of this object; useful for testing and
 * debugging.
 *
 * @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: " + getVolumeId() + ",");
  if (getInstanceId() != null) sb.append("InstanceId: " + getInstanceId() + ",");
  if (getDevice() != null) sb.append("Device: " + getDevice() + ",");
  if (isForce() != null) sb.append("Force: " + isForce() );
  sb.append("}");
  return sb.toString();
}

origin: aws/aws-sdk-java

/**
 * <p>
 * The ID of the volume.
 * </p>
 * 
 * @param volumeId
 *        The ID of the volume.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public DetachVolumeRequest withVolumeId(String volumeId) {
  setVolumeId(volumeId);
  return this;
}
origin: com.amazonaws/aws-java-sdk-ec2

/**
 * <p>
 * The device name.
 * </p>
 * 
 * @param device
 *        The device name.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public DetachVolumeRequest withDevice(String device) {
  setDevice(device);
  return this;
}
origin: aws/aws-sdk-java

/**
 * 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 (getDevice() != null)
    sb.append("Device: ").append(getDevice()).append(",");
  if (getForce() != null)
    sb.append("Force: ").append(getForce()).append(",");
  if (getInstanceId() != null)
    sb.append("InstanceId: ").append(getInstanceId()).append(",");
  if (getVolumeId() != null)
    sb.append("VolumeId: ").append(getVolumeId());
  sb.append("}");
  return sb.toString();
}
origin: aws-amplify/aws-sdk-android

  public Request<DetachVolumeRequest> marshall(DetachVolumeRequest detachVolumeRequest) {

    if (detachVolumeRequest == null) {
      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }

    Request<DetachVolumeRequest> request = new DefaultRequest<DetachVolumeRequest>(detachVolumeRequest, "AmazonEC2");
    request.addParameter("Action", "DetachVolume");
    request.addParameter("Version", "2015-10-01");

    if (detachVolumeRequest.getVolumeId() != null) {
      request.addParameter("VolumeId", StringUtils.fromString(detachVolumeRequest.getVolumeId()));
    }
    if (detachVolumeRequest.getInstanceId() != null) {
      request.addParameter("InstanceId", StringUtils.fromString(detachVolumeRequest.getInstanceId()));
    }
    if (detachVolumeRequest.getDevice() != null) {
      request.addParameter("Device", StringUtils.fromString(detachVolumeRequest.getDevice()));
    }
    if (detachVolumeRequest.isForce() != null) {
      request.addParameter("Force", StringUtils.fromBoolean(detachVolumeRequest.isForce()));
    }

    return request;
  }
}
origin: aws-amplify/aws-sdk-android

/**
 * Constructs a new DetachVolumeRequest object.
 * Callers should use the setter or fluent setter (with...) methods to
 * initialize any additional object members.
 * 
 * @param volumeId The ID of the volume.
 */
public DetachVolumeRequest(String volumeId) {
  setVolumeId(volumeId);
}
origin: aws/aws-sdk-java

public Request<DetachVolumeRequest> marshall(DetachVolumeRequest detachVolumeRequest) {
  if (detachVolumeRequest == null) {
    throw new SdkClientException("Invalid argument passed to marshall(...)");
  }
  Request<DetachVolumeRequest> request = new DefaultRequest<DetachVolumeRequest>(detachVolumeRequest, "AmazonEC2");
  request.addParameter("Action", "DetachVolume");
  request.addParameter("Version", "2016-11-15");
  request.setHttpMethod(HttpMethodName.POST);
  if (detachVolumeRequest.getDevice() != null) {
    request.addParameter("Device", StringUtils.fromString(detachVolumeRequest.getDevice()));
  }
  if (detachVolumeRequest.getForce() != null) {
    request.addParameter("Force", StringUtils.fromBoolean(detachVolumeRequest.getForce()));
  }
  if (detachVolumeRequest.getInstanceId() != null) {
    request.addParameter("InstanceId", StringUtils.fromString(detachVolumeRequest.getInstanceId()));
  }
  if (detachVolumeRequest.getVolumeId() != null) {
    request.addParameter("VolumeId", StringUtils.fromString(detachVolumeRequest.getVolumeId()));
  }
  return request;
}
origin: com.amazonaws/aws-java-sdk-ec2

/**
 * <p>
 * The ID of the volume.
 * </p>
 * 
 * @param volumeId
 *        The ID of the volume.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public DetachVolumeRequest withVolumeId(String volumeId) {
  setVolumeId(volumeId);
  return this;
}
com.amazonaws.services.ec2.modelDetachVolumeRequest

Javadoc

Container for the parameters to the com.amazonaws.services.ec2.AmazonEC2#detachVolume(DetachVolumeRequest).

Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so results in the volume being stuck in a busy state while detaching.

If an Amazon EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

When a volume with an AWS Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

For more information, see Detaching an Amazon EBS Volume in the Amazon Elastic Compute Cloud User Guide .

Most used methods

  • <init>
    Constructs a new DetachVolumeRequest object. Callers should use the setter or fluent setter (with...
  • setVolumeId
    The ID of the volume.
  • getDevice
    The device name.
  • getInstanceId
    The ID of the instance.
  • getVolumeId
    The ID of the volume.
  • setDevice
    The device name.
  • setInstanceId
    The ID of the instance.
  • getForce
    Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging in
  • isForce
    Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging in
  • setForce
    Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging in
  • withDevice
    The device name.
  • withForce
    Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging in
  • withDevice,
  • withForce,
  • withInstanceId,
  • withVolumeId

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now