com.amazonaws.services.ec2.model
Class AttachVolumeRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.AttachVolumeRequest

public class AttachVolumeRequest
extends AmazonWebServiceRequest

Container for the parameters to the AttachVolume operation.

Attach a previously created volume to a running instance.

See Also:
AmazonEC2.attachVolume(AttachVolumeRequest)

Constructor Summary
AttachVolumeRequest()
          Default constructor for a new AttachVolumeRequest object.
AttachVolumeRequest(String volumeId, String instanceId, String device)
          Constructs a new AttachVolumeRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getDevice()
          Specifies how the device is exposed to the instance (e.g., /dev/sdh).
 String getInstanceId()
          The ID of the instance to which the volume attaches.
 String getVolumeId()
          The ID of the Amazon EBS volume.
 int hashCode()
           
 void setDevice(String device)
          Specifies how the device is exposed to the instance (e.g., /dev/sdh).
 void setInstanceId(String instanceId)
          The ID of the instance to which the volume attaches.
 void setVolumeId(String volumeId)
          The ID of the Amazon EBS volume.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 AttachVolumeRequest withDevice(String device)
          Specifies how the device is exposed to the instance (e.g., /dev/sdh).
 AttachVolumeRequest withInstanceId(String instanceId)
          The ID of the instance to which the volume attaches.
 AttachVolumeRequest withVolumeId(String volumeId)
          The ID of the Amazon EBS volume.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttachVolumeRequest

public AttachVolumeRequest()
Default constructor for a new AttachVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


AttachVolumeRequest

public AttachVolumeRequest(String volumeId,
                           String instanceId,
                           String device)
Constructs a new AttachVolumeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
volumeId - The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.
instanceId - The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.
device - Specifies how the device is exposed to the instance (e.g., /dev/sdh).
Method Detail

getVolumeId

public String getVolumeId()
The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.

Returns:
The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.

setVolumeId

public void setVolumeId(String volumeId)
The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.

Parameters:
volumeId - The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.

withVolumeId

public AttachVolumeRequest withVolumeId(String volumeId)
The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.

Returns a reference to this object so that method calls can be chained together.

Parameters:
volumeId - The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstanceId

public String getInstanceId()
The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.

Returns:
The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.

setInstanceId

public void setInstanceId(String instanceId)
The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.

Parameters:
instanceId - The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.

withInstanceId

public AttachVolumeRequest withInstanceId(String instanceId)
The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceId - The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.
Returns:
A reference to this updated object so that method calls can be chained together.

getDevice

public String getDevice()
Specifies how the device is exposed to the instance (e.g., /dev/sdh).

Returns:
Specifies how the device is exposed to the instance (e.g., /dev/sdh).

setDevice

public void setDevice(String device)
Specifies how the device is exposed to the instance (e.g., /dev/sdh).

Parameters:
device - Specifies how the device is exposed to the instance (e.g., /dev/sdh).

withDevice

public AttachVolumeRequest withDevice(String device)
Specifies how the device is exposed to the instance (e.g., /dev/sdh).

Returns a reference to this object so that method calls can be chained together.

Parameters:
device - Specifies how the device is exposed to the instance (e.g., /dev/sdh).
Returns:
A reference to this updated object so that method calls can be chained together.

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:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.