Scripts.ReadStoredProcedureStreamAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads a StoredProcedureProperties from the Azure Cosmos service as an asynchronous operation.
public abstract System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ResponseMessage> ReadStoredProcedureStreamAsync(string id, Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadStoredProcedureStreamAsync : string * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ResponseMessage>
Public MustOverride Function ReadStoredProcedureStreamAsync (id As String, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResponseMessage)
Parameters
- id
- String
- requestOptions
- RequestOptions
- cancellationToken
- CancellationToken
Returns
A Task containing a ResponseMessage.
Examples
This reads an existing stored procedure.
Scripts scripts = this.container.Scripts;
ResponseMessage storedProcedure = await scripts.ReadStoredProcedureStreamAsync("ExistingId");
if (!response.IsSuccessStatusCode)
{
//Handle and log exception
return;
}