Skip to content

start_remote_move async

start_remote_move(
    connector_id: ConnectorId,
    source_path: FilePath,
    target_path: FilePath,
    *,
    config_overrides: Optional[AsyncTransferClientConfig] = None,
) -> StartRemoteMoveResponse

Moves or renames a file or directory on the remote SFTP server.

Parameters:

  • connector_id (ConnectorId) –

    The unique identifier for the connector.

  • source_path (FilePath) –

    The absolute path of the file or directory to move or rename. You can only specify one path per call to this operation.

  • target_path (FilePath) –

    The absolute path for the target of the move/rename operation.

Raises:

Source code in docs_src/capo_transfer/_services/async_transfer.py
async def start_remote_move(
    self,
    connector_id: "capo_transfer.types.connector_id.ConnectorId",
    source_path: "capo_transfer.types.file_path.FilePath",
    target_path: "capo_transfer.types.file_path.FilePath",
    *,
    config_overrides: Optional[AsyncTransferClientConfig] = None,
) -> "capo_transfer.types.start_remote_move_response.StartRemoteMoveResponse":
    """<p>Moves or renames a file or directory on the remote SFTP server.</p>

    Args:
        connector_id: <p>The unique identifier for the connector.</p>
        source_path: <p>The absolute path of the file or directory to move or rename. You can only specify one path per call to this operation.</p>
        target_path: <p>The absolute path for the target of the move/rename operation.</p>

    Raises:
        capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
        capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
        capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
        capo_transfer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed because the Amazon Web ServicesTransfer Family service is not available.</p>
        capo_transfer.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_transfer.types.start_remote_move_request.StartRemoteMoveRequest]",
    ) -> AsyncOperationResponse[
        "capo_transfer.types.start_remote_move_response.StartRemoteMoveResponse"
    ]:
        import capo_transfer._operations.transfer_service.start_remote_move

        (
            output,
            http_response,
        ) = await capo_transfer._operations.transfer_service.start_remote_move.async_start_remote_move(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartRemoteMove")
    )
    input_: capo_transfer.types.start_remote_move_request.StartRemoteMoveRequest = {
        "connector_id": connector_id,
        "source_path": source_path,
        "target_path": target_path,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output