Request

Response

    BaseReadWriteExchangeModel.CreateExchangeAsync method

    Creates a new exchange from the supplied input.

    public virtual Task<DataExchange> CreateExchangeAsync(ExchangeInput exchange, 
        CancellationToken cancellationToken = default)
    
    parameterdescription
    exchange Creation input describing the exchange.
    cancellationToken Token used to cancel the operation.

    Return Value

    A task whose result is the created DataExchange.

    Exceptions

    exceptioncondition
    ApiException Thrown when the underlying exchange API request fails.
    DataSyncException Thrown when exchange creation fails without a more specific underlying exception.
    OperationCanceledException Thrown when the operation is cancelled through cancellationToken.

    Remarks

    When the underlying API returns an unclassified error, the implementation may rethrow the original exception type.

    See Also