Deletes a transfer location resource from DataSync.
Parameters:
-
location_arn
(LocationArn)
–
The Amazon Resource Name (ARN) of the location to delete.
Raises:
Source code in docs_src/capo_datasync/_services/async_data_sync.py
| async def delete_location(
self,
location_arn: "capo_datasync.types.location_arn.LocationArn",
*,
config_overrides: Optional[AsyncDataSyncClientConfig] = None,
) -> "capo_datasync.types.delete_location_response.DeleteLocationResponse":
"""<p>Deletes a transfer location resource from DataSync. </p>
Args:
location_arn: <p>The Amazon Resource Name (ARN) of the location to delete.</p>
Raises:
capo_datasync.errors.internal_exception.InternalException: <p>This exception is thrown when an error occurs in the DataSync service.</p>
capo_datasync.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
capo_datasync.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_datasync.types.delete_location_request.DeleteLocationRequest]",
) -> AsyncOperationResponse[
"capo_datasync.types.delete_location_response.DeleteLocationResponse"
]:
import capo_datasync._operations.fmrs_service.delete_location
(
output,
http_response,
) = await capo_datasync._operations.fmrs_service.delete_location.async_delete_location(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteLocation")
)
input_: capo_datasync.types.delete_location_request.DeleteLocationRequest = {
"location_arn": location_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|