detach_volume
async
¶
detach_volume(
volume_arn: VolumeARN,
*,
config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
force_detach: Optional[Boolean] = None,
) -> DetachVolumeOutput
Disconnects a volume from an iSCSI connection and then detaches the volume from the specified gateway. Detaching and attaching a volume enables you to recover your data from one gateway to a different gateway without creating a snapshot. It also makes it easier to move your volumes from an on-premises gateway to a gateway hosted on an Amazon EC2 instance. This operation is only supported in the volume gateway type.
Parameters:
-
volume_arn(VolumeARN) –The Amazon Resource Name (ARN) of the volume to detach from the gateway.
-
force_detach(Optional[Boolean], default:None) –Set to
trueto forcibly remove the iSCSI connection of the target volume and detach the volume. The default isfalse. If this value is set tofalse, you must manually disconnect the iSCSI connection from the target volume.Valid Values:
true|false
Raises:
-
InternalServerError–An internal server error has occurred during the request. For more information, see the error and message fields.
-
InvalidGatewayRequestException–An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
-
UnknownServiceError–The service returned an error code this client does not model.