@Generated(value="software.amazon.awssdk:codegen") public class DetachVolumeRequest extends EC2Request implements ToCopyableBuilder<DetachVolumeRequest.Builder,DetachVolumeRequest>
Contains the parameters for DetachVolume.
Modifier and Type | Class and Description |
---|---|
static interface |
DetachVolumeRequest.Builder |
Modifier and Type | Method and Description |
---|---|
static DetachVolumeRequest.Builder |
builder() |
String |
device()
The device name.
|
boolean |
equals(Object obj) |
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).
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
int |
hashCode() |
String |
instanceId()
The ID of the instance.
|
static Class<? extends DetachVolumeRequest.Builder> |
serializableBuilderClass() |
DetachVolumeRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
String |
volumeId()
The ID of the volume.
|
requestOverrideConfig
copy
public String device()
The device name.
public 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.
public String instanceId()
The ID of the instance.
public String volumeId()
The ID of the volume.
public DetachVolumeRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<DetachVolumeRequest.Builder,DetachVolumeRequest>
toBuilder
in class EC2Request
public static DetachVolumeRequest.Builder builder()
public static Class<? extends DetachVolumeRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.