|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.AttachVolumeRequest
public class AttachVolumeRequest
Container for the parameters to the AttachVolume operation
.
Attaches an Amazon EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.
Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
For a list of supported device names, see Attaching an Amazon EBS Volume to an Instance . Any device names that aren't reserved for instance store volumes can be used for Amazon EBS volumes. For more information, see Amazon EC2 Instance Store in the Amazon Elastic Compute Cloud User Guide .
If a volume has an AWS Marketplace product code:
For an overview of the AWS Marketplace, see https://aws.amazon.com/marketplace/help/200900000 . For more information about how to use the AWS Marketplace, see AWS Marketplace .
For more information about Amazon EBS volumes, see Attaching Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide .
AmazonEC2.attachVolume(AttachVolumeRequest)
,
Serialized FormConstructor Summary | |
---|---|
AttachVolumeRequest()
Default constructor for a new AttachVolumeRequest object. |
|
AttachVolumeRequest(java.lang.String volumeId,
java.lang.String instanceId,
java.lang.String device)
Constructs a new AttachVolumeRequest object. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDevice()
The device name to expose to the instance (for example, /dev/sdh or xvdh ). |
Request<AttachVolumeRequest> |
getDryRunRequest()
This method is intended for internal use only. |
java.lang.String |
getInstanceId()
The ID of the instance. |
java.lang.String |
getVolumeId()
The ID of the Amazon EBS volume. |
int |
hashCode()
|
void |
setDevice(java.lang.String device)
The device name to expose to the instance (for example, /dev/sdh or xvdh ). |
void |
setInstanceId(java.lang.String instanceId)
The ID of the instance. |
void |
setVolumeId(java.lang.String volumeId)
The ID of the Amazon EBS volume. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
AttachVolumeRequest |
withDevice(java.lang.String device)
The device name to expose to the instance (for example, /dev/sdh or xvdh ). |
AttachVolumeRequest |
withInstanceId(java.lang.String instanceId)
The ID of the instance. |
AttachVolumeRequest |
withVolumeId(java.lang.String volumeId)
The ID of the Amazon EBS volume. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttachVolumeRequest()
public AttachVolumeRequest(java.lang.String volumeId, java.lang.String instanceId, java.lang.String device)
volumeId
- The ID of the Amazon EBS volume. The volume and
instance must be within the same Availability Zone.instanceId
- The ID of the instance.device
- The device name to expose to the instance (for example,
/dev/sdh
or xvdh
).Method Detail |
---|
public java.lang.String getVolumeId()
public void setVolumeId(java.lang.String volumeId)
volumeId
- The ID of the Amazon EBS volume. The volume and instance must be
within the same Availability Zone.public AttachVolumeRequest withVolumeId(java.lang.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.
public java.lang.String getInstanceId()
public void setInstanceId(java.lang.String instanceId)
instanceId
- The ID of the instance.public AttachVolumeRequest withInstanceId(java.lang.String instanceId)
Returns a reference to this object so that method calls can be chained together.
instanceId
- The ID of the instance.
public java.lang.String getDevice()
/dev/sdh
or xvdh
).
/dev/sdh
or xvdh
).public void setDevice(java.lang.String device)
/dev/sdh
or xvdh
).
device
- The device name to expose to the instance (for example,
/dev/sdh
or xvdh
).public AttachVolumeRequest withDevice(java.lang.String device)
/dev/sdh
or xvdh
).
Returns a reference to this object so that method calls can be chained together.
device
- The device name to expose to the instance (for example,
/dev/sdh
or xvdh
).
public Request<AttachVolumeRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AttachVolumeRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |