public class AttachVolumeRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<AttachVolumeRequest>
AttachVolume operation
.
Attach a previously created volume to a running instance.
Constructor and Description |
---|
AttachVolumeRequest()
Default constructor for a new AttachVolumeRequest object.
|
AttachVolumeRequest(String volumeId,
String instanceId,
String device)
Constructs a new AttachVolumeRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDevice()
Specifies how the device is exposed to the instance (e.g.,
/dev/sdh ). |
Request<AttachVolumeRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
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.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public AttachVolumeRequest()
public AttachVolumeRequest(String volumeId, String instanceId, String device)
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
).public String getVolumeId()
public void setVolumeId(String volumeId)
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.public AttachVolumeRequest withVolumeId(String volumeId)
Returns a reference to this object so that method calls can be chained together.
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.public String getInstanceId()
public void setInstanceId(String instanceId)
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.public AttachVolumeRequest withInstanceId(String instanceId)
Returns a reference to this object so that method calls can be chained together.
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.public String getDevice()
/dev/sdh
)./dev/sdh
).public void setDevice(String device)
/dev/sdh
).device
- Specifies how the device is exposed to the instance (e.g.,
/dev/sdh
).public AttachVolumeRequest withDevice(String device)
/dev/sdh
).
Returns a reference to this object so that method calls can be chained together.
device
- Specifies how the device is exposed to the instance (e.g.,
/dev/sdh
).public Request<AttachVolumeRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AttachVolumeRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.