xml/Azure.Cosmos.Scripts/CosmosScripts.xml (1,255 lines of code) (raw):
<Type Name="CosmosScripts" FullName="Azure.Cosmos.Scripts.CosmosScripts">
<TypeSignature Language="C#" Value="public abstract class CosmosScripts" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit CosmosScripts extends System.Object" />
<TypeSignature Language="DocId" Value="T:Azure.Cosmos.Scripts.CosmosScripts" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class CosmosScripts" />
<TypeSignature Language="F#" Value="type CosmosScripts = class" />
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Represents script operations on an Azure Cosmos container.
</summary>
<remarks>To be added.</remarks>
<altmember cref="T:Azure.Cosmos.Scripts.TriggerProperties" />
<altmember cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" />
<altmember cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected CosmosScripts ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateStoredProcedureAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>> CreateStoredProcedureAsync (Azure.Cosmos.Scripts.StoredProcedureProperties storedProcedureProperties, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.StoredProcedureProperties>> CreateStoredProcedureAsync(class Azure.Cosmos.Scripts.StoredProcedureProperties storedProcedureProperties, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.CreateStoredProcedureAsync(Azure.Cosmos.Scripts.StoredProcedureProperties,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function CreateStoredProcedureAsync (storedProcedureProperties As StoredProcedureProperties, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of StoredProcedureProperties))" />
<MemberSignature Language="F#" Value="abstract member CreateStoredProcedureAsync : Azure.Cosmos.Scripts.StoredProcedureProperties * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>>" Usage="cosmosScripts.CreateStoredProcedureAsync (storedProcedureProperties, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="storedProcedureProperties" Type="Azure.Cosmos.Scripts.StoredProcedureProperties" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="storedProcedureProperties">The Stored Procedure to create</param>
<param name="requestOptions">(Optional) The options for the stored procedure request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Creates a stored procedure as an asynchronous operation in the Azure Cosmos DB service.
</summary>
<returns>The <see cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" /> that was created contained within a <see cref="T:System.Threading.Tasks.Task" /> object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="storedProcedureProperties" /> is not set.</exception>
<exception cref="T:System.AggregateException">Represents a consolidation of failures that occurred during async processing. Look within InnerExceptions to find the actual exception(s)</exception>
<exception cref="T:Azure.Cosmos.CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>400</term><description>BadRequest - This means something was wrong with the request supplied. It is likely that an Id was not supplied for the stored procedure or the Body was malformed.</description></item><item><term>403</term><description>Forbidden - You have reached your quota of stored procedures for the collection supplied. Contact support to have this quota increased.</description></item><item><term>409</term><description>Conflict - This means a <see cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" /> with an id matching the id you supplied already existed.</description></item><item><term>413</term><description>RequestEntityTooLarge - This means the body of the <see cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" /> you tried to create was too large.</description></item></list></exception>
<example>
This creates and executes a stored procedure that appends a string to the first item returned from the query.
<code language="c#"><![CDATA[
string sprocBody = @"function simple(prefix)
{
var collection = getContext().getCollection();
// Query documents and take 1st item.
var isAccepted = collection.queryDocuments(
collection.getSelfLink(),
'SELECT * FROM root r',
function(err, feed, options) {
if (err)throw err;
// Check the feed and if it's empty, set the body to 'no docs found',
// Otherwise just take 1st element from the feed.
if (!feed || !feed.length) getContext().getResponse().setBody(""no docs found"");
else getContext().getResponse().setBody(prefix + JSON.stringify(feed[0]));
});
if (!isAccepted) throw new Error(""The query wasn't accepted by the server. Try again/use continuation token between API and script."");
}";
CosmosScripts scripts = this.container.Scripts;
StoredProcedureProperties storedProcedure = new StoredProcedureProperties(id, sprocBody);
Response<StoredProcedureProperties> storedProcedureResponse = await scripts.CreateStoredProcedureAsync(storedProcedure);
// Execute the stored procedure
CosmosItemResponse<string> sprocResponse = await scripts.ExecuteStoredProcedureAsync<string, string>(
id,
"Item as a string: ",
new PartitionKey(testPartitionId));
Console.WriteLine("sprocResponse.Resource");
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateTriggerAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>> CreateTriggerAsync (Azure.Cosmos.Scripts.TriggerProperties triggerProperties, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.TriggerProperties>> CreateTriggerAsync(class Azure.Cosmos.Scripts.TriggerProperties triggerProperties, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.CreateTriggerAsync(Azure.Cosmos.Scripts.TriggerProperties,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function CreateTriggerAsync (triggerProperties As TriggerProperties, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of TriggerProperties))" />
<MemberSignature Language="F#" Value="abstract member CreateTriggerAsync : Azure.Cosmos.Scripts.TriggerProperties * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>>" Usage="cosmosScripts.CreateTriggerAsync (triggerProperties, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="triggerProperties" Type="Azure.Cosmos.Scripts.TriggerProperties" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="triggerProperties">The <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> object.</param>
<param name="requestOptions">(Optional) The options for the stored procedure request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Creates a trigger as an asynchronous operation in the Azure Cosmos DB service.
</summary>
<returns>A task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="triggerProperties" /> is not set.</exception>
<exception cref="T:System.AggregateException">Represents a consolidation of failures that occurred during async processing. Look within InnerExceptions to find the actual exception(s)</exception>
<exception cref="T:Azure.Cosmos.CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>400</term><description>BadRequest - This means something was wrong with the request supplied. It is likely that an Id was not supplied for the new trigger or that the Body was malformed.</description></item><item><term>403</term><description>Forbidden - You have reached your quota of triggers for the collection supplied. Contact support to have this quota increased.</description></item><item><term>409</term><description>Conflict - This means a <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> with an id matching the id you supplied already existed.</description></item><item><term>413</term><description>RequestEntityTooLarge - This means the body of the <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> you tried to create was too large.</description></item></list></exception>
<example>
This creates a trigger then uses the trigger in a create item.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
Response<TriggerProperties> triggerResponse = await scripts.CreateTriggerAsync(
new TriggerProperties
{
Id = "addTax",
Body = @"function AddTax() {
var item = getContext().getRequest().getBody();
// calculate the tax.
item.tax = item.cost * .15;
// Update the request -- this is what is going to be inserted.
getContext().getRequest().setBody(item);
}",
TriggerOperation = TriggerOperation.All,
TriggerType = TriggerType.Pre
});
ItemRequestOptions options = new ItemRequestOptions()
{
PreTriggers = new List<string>() { triggerResponse.Id },
};
// Create a new item with trigger set in the request options
ItemResponse<dynamic> createdItem = await this.container.Items.CreateItemAsync<dynamic>(item.status, item, options);
double itemTax = createdItem.Resource.tax;
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateUserDefinedFunctionAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>> CreateUserDefinedFunctionAsync (Azure.Cosmos.Scripts.UserDefinedFunctionProperties userDefinedFunctionProperties, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.UserDefinedFunctionProperties>> CreateUserDefinedFunctionAsync(class Azure.Cosmos.Scripts.UserDefinedFunctionProperties userDefinedFunctionProperties, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.CreateUserDefinedFunctionAsync(Azure.Cosmos.Scripts.UserDefinedFunctionProperties,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function CreateUserDefinedFunctionAsync (userDefinedFunctionProperties As UserDefinedFunctionProperties, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of UserDefinedFunctionProperties))" />
<MemberSignature Language="F#" Value="abstract member CreateUserDefinedFunctionAsync : Azure.Cosmos.Scripts.UserDefinedFunctionProperties * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>>" Usage="cosmosScripts.CreateUserDefinedFunctionAsync (userDefinedFunctionProperties, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="userDefinedFunctionProperties" Type="Azure.Cosmos.Scripts.UserDefinedFunctionProperties" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="userDefinedFunctionProperties">The <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> object.</param>
<param name="requestOptions">(Optional) The options for the user defined function request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Creates a user defined function as an asynchronous operation in the Azure Cosmos DB service.
</summary>
<returns>A task object representing the service response for the asynchronous operation.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="userDefinedFunctionProperties" /> is not set.</exception>
<exception cref="T:System.AggregateException">Represents a consolidation of failures that occurred during async processing. Look within InnerExceptions to find the actual exception(s)</exception>
<exception cref="T:Azure.Cosmos.CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a user defined function are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>400</term><description>BadRequest - This means something was wrong with the request supplied. It is likely that an Id was not supplied for the new user defined function or that the Body was malformed.</description></item><item><term>403</term><description>Forbidden - You have reached your quota of user defined functions for the collection supplied. Contact support to have this quota increased.</description></item><item><term>409</term><description>Conflict - This means a <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> with an id matching the id you supplied already existed.</description></item><item><term>413</term><description>RequestEntityTooLarge - This means the body of the <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> you tried to create was too large.</description></item></list></exception>
<example>
This creates a user defined function then uses the function in an item query.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
await scripts.UserDefinedFunctions.CreateUserDefinedFunctionAsync(
new UserDefinedFunctionProperties
{
Id = "calculateTax",
Body = @"function(amt) { return amt * 0.05; }"
});
QueryDefinition sqlQuery = new QueryDefinition(
"SELECT VALUE udf.calculateTax(t.cost) FROM toDoActivity t where t.cost > @expensive and t.status = @status")
.WithParameter("@expensive", 9000)
.WithParameter("@status", "Done");
await foreach (double tax in this.container.Items.GetItemsQueryIterator<double>(
sqlQueryDefinition: sqlQuery,
partitionKey: "Done"))
{
Console.WriteLine(tax);
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="DeleteStoredProcedureAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>> DeleteStoredProcedureAsync (string id, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.StoredProcedureProperties>> DeleteStoredProcedureAsync(string id, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.DeleteStoredProcedureAsync(System.String,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function DeleteStoredProcedureAsync (id As String, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of StoredProcedureProperties))" />
<MemberSignature Language="F#" Value="abstract member DeleteStoredProcedureAsync : string * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>>" Usage="cosmosScripts.DeleteStoredProcedureAsync (id, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The identifier of the Stored Procedure to delete.</param>
<param name="requestOptions">(Optional) The options for the stored procedure request <see cref="T:Azure.Cosmos.StoredProcedureRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Delete a <see cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" /> from the Azure Cosmos DB service as an asynchronous operation.
</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Response" /> which will contain the response to the request issued.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="id" /> are not set.</exception>
<exception cref="T:Azure.Cosmos.CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>404</term><description>NotFound - This means the resource you tried to delete did not exist.</description></item></list></exception>
<example>
This examples gets a reference to an existing stored procedure and deletes it.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
Response<StoredProcedureProperties> response = await scripts.DeleteStoredProcedureAsync("taxUdfId");
]]></code></example>
</Docs>
</Member>
<Member MemberName="DeleteTriggerAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>> DeleteTriggerAsync (string id, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.TriggerProperties>> DeleteTriggerAsync(string id, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.DeleteTriggerAsync(System.String,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function DeleteTriggerAsync (id As String, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of TriggerProperties))" />
<MemberSignature Language="F#" Value="abstract member DeleteTriggerAsync : string * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>>" Usage="cosmosScripts.DeleteTriggerAsync (id, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The id of the trigger to delete.</param>
<param name="requestOptions">(Optional) The options for the trigger request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Delete a <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> from the Azure Cosmos service as an asynchronous operation.
</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Response`1" /> which wraps a <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> which will contain information about the request issued.</returns>
<remarks>To be added.</remarks>
<example>
This examples gets a reference to an existing trigger and deletes it.
<code language="c#"><![CDATA[
Scripts scripts = this.container.Scripts;
Response<TriggerProperties> response = await scripts.DeleteTriggerAsync("existingId");
]]></code></example>
</Docs>
</Member>
<Member MemberName="DeleteUserDefinedFunctionAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>> DeleteUserDefinedFunctionAsync (string id, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.UserDefinedFunctionProperties>> DeleteUserDefinedFunctionAsync(string id, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.DeleteUserDefinedFunctionAsync(System.String,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function DeleteUserDefinedFunctionAsync (id As String, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of UserDefinedFunctionProperties))" />
<MemberSignature Language="F#" Value="abstract member DeleteUserDefinedFunctionAsync : string * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>>" Usage="cosmosScripts.DeleteUserDefinedFunctionAsync (id, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The id of the user defined function to delete.</param>
<param name="requestOptions">(Optional) The options for the user defined function request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Delete a <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> from the Azure Cosmos DB service as an asynchronous operation.
</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Response`1" /> which wraps a <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> which will contain information about the request issued.</returns>
<remarks>To be added.</remarks>
<example>
This examples gets a reference to an existing user defined function and deletes it.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
Response<UserDefinedFunctionProperties> response = await this.container.DeleteUserDefinedFunctionAsync("existingId");
]]></code></example>
</Docs>
</Member>
<Member MemberName="ExecuteStoredProcedureAsync<TOutput>">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Cosmos.Scripts.StoredProcedureExecuteResponse<TOutput>> ExecuteStoredProcedureAsync<TOutput> (string storedProcedureId, Azure.Cosmos.PartitionKey partitionKey, object[] parameters, Azure.Cosmos.StoredProcedureRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Cosmos.Scripts.StoredProcedureExecuteResponse`1<!!TOutput>> ExecuteStoredProcedureAsync<TOutput>(string storedProcedureId, valuetype Azure.Cosmos.PartitionKey partitionKey, object[] parameters, class Azure.Cosmos.StoredProcedureRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.ExecuteStoredProcedureAsync``1(System.String,Azure.Cosmos.PartitionKey,System.Object[],Azure.Cosmos.StoredProcedureRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ExecuteStoredProcedureAsync(Of TOutput) (storedProcedureId As String, partitionKey As PartitionKey, parameters As Object(), Optional requestOptions As StoredProcedureRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of StoredProcedureExecuteResponse(Of TOutput))" />
<MemberSignature Language="F#" Value="abstract member ExecuteStoredProcedureAsync : string * Azure.Cosmos.PartitionKey * obj[] * Azure.Cosmos.StoredProcedureRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Cosmos.Scripts.StoredProcedureExecuteResponse<'Output>>" Usage="cosmosScripts.ExecuteStoredProcedureAsync (storedProcedureId, partitionKey, parameters, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Cosmos.Scripts.StoredProcedureExecuteResponse<TOutput>></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TOutput" />
</TypeParameters>
<Parameters>
<Parameter Name="storedProcedureId" Type="System.String" />
<Parameter Name="partitionKey" Type="Azure.Cosmos.PartitionKey" />
<Parameter Name="parameters" Type="System.Object[]" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.StoredProcedureRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="TOutput">The return type that is JSON serializable.</typeparam>
<param name="storedProcedureId">The identifier of the Stored Procedure to execute.</param>
<param name="partitionKey">The partition key for the item. <see cref="T:Azure.Cosmos.PartitionKey" /></param>
<param name="parameters">(Optional) An array of dynamic objects representing the parameters for the stored procedure.</param>
<param name="requestOptions">(Optional) The options for the stored procedure request <see cref="T:Azure.Cosmos.StoredProcedureRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Executes a stored procedure against a container as an asynchronous operation in the Azure Cosmos service.
</summary>
<returns>The task object representing the service response for the asynchronous operation which would contain any response set in the stored procedure.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="storedProcedureId" /> or <paramref name="partitionKey" /> are not set.</exception>
<example>
This creates and executes a stored procedure that appends a string to the first item returned from the query.
<code language="c#"><![CDATA[
string sprocBody = @"function simple(prefix, postfix)
{
var collection = getContext().getCollection();
// Query documents and take 1st item.
var isAccepted = collection.queryDocuments(
collection.getSelfLink(),
'SELECT * FROM root r',
function(err, feed, options) {
if (err)throw err;
// Check the feed and if it's empty, set the body to 'no docs found',
// Otherwise just take 1st element from the feed.
if (!feed || !feed.length) getContext().getResponse().setBody(""no docs found"");
else getContext().getResponse().setBody(prefix + JSON.stringify(feed[0]) + postfix);
});
if (!isAccepted) throw new Error(""The query wasn't accepted by the server. Try again/use continuation token between API and script."");
}";
CosmosScripts scripts = this.container.Scripts;
string sprocId = "appendString";
StoredProcedureResponse storedProcedureResponse = await scripts.CreateStoredProcedureAsync(
sprocId,
sprocBody);
// Execute the stored procedure
StoredProcedureExecuteResponse<string> sprocResponse = await scripts.ExecuteStoredProcedureAsync<string>(
sprocId,
new PartitionKey(testPartitionId),
new dynamic[] {"myPrefixString", "myPostfixString"});
Console.WriteLine(sprocResponse.Resource);
/// ]]></code></example>
</Docs>
</Member>
<Member MemberName="ExecuteStoredProcedureStreamAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response> ExecuteStoredProcedureStreamAsync (string storedProcedureId, Azure.Cosmos.PartitionKey partitionKey, object[] parameters, Azure.Cosmos.StoredProcedureRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> ExecuteStoredProcedureStreamAsync(string storedProcedureId, valuetype Azure.Cosmos.PartitionKey partitionKey, object[] parameters, class Azure.Cosmos.StoredProcedureRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.ExecuteStoredProcedureStreamAsync(System.String,Azure.Cosmos.PartitionKey,System.Object[],Azure.Cosmos.StoredProcedureRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ExecuteStoredProcedureStreamAsync (storedProcedureId As String, partitionKey As PartitionKey, parameters As Object(), Optional requestOptions As StoredProcedureRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member ExecuteStoredProcedureStreamAsync : string * Azure.Cosmos.PartitionKey * obj[] * Azure.Cosmos.StoredProcedureRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>" Usage="cosmosScripts.ExecuteStoredProcedureStreamAsync (storedProcedureId, partitionKey, parameters, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="storedProcedureId" Type="System.String" />
<Parameter Name="partitionKey" Type="Azure.Cosmos.PartitionKey" />
<Parameter Name="parameters" Type="System.Object[]" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.StoredProcedureRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="storedProcedureId">The identifier of the Stored Procedure to execute.</param>
<param name="partitionKey">The partition key for the item. <see cref="T:Azure.Cosmos.PartitionKey" /></param>
<param name="parameters">(Optional) An array of dynamic objects representing the parameters for the stored procedure.</param>
<param name="requestOptions">(Optional) The options for the stored procedure request <see cref="T:Azure.Cosmos.StoredProcedureRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Executes a stored procedure against a container as an asynchronous operation in the Azure Cosmos service and obtains a Stream as response.
</summary>
<returns>The task object representing the service response for the asynchronous operation which would contain any response set in the stored procedure.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="storedProcedureId" /> or <paramref name="partitionKey" /> are not set.</exception>
<example>
This creates and executes a stored procedure that appends a string to the first item returned from the query.
<code language="c#"><![CDATA[
string sprocBody = @"function simple(prefix, postfix)
{
var collection = getContext().getCollection();
// Query documents and take 1st item.
var isAccepted = collection.queryDocuments(
collection.getSelfLink(),
'SELECT * FROM root r',
function(err, feed, options) {
if (err)throw err;
// Check the feed and if it's empty, set the body to 'no docs found',
// Otherwise just take 1st element from the feed.
if (!feed || !feed.length) getContext().getResponse().setBody(""no docs found"");
else getContext().getResponse().setBody(prefix + JSON.stringify(feed[0]) + postfix);
});
if (!isAccepted) throw new Error(""The query wasn't accepted by the server. Try again/use continuation token between API and script."");
}";
CosmosScripts scripts = this.container.Scripts;
string sprocId = "appendString";
Response<StoredProcedureProperties> storedProcedureResponse = await scripts.CreateStoredProcedureAsync(
sprocId,
sprocBody);
// Execute the stored procedure
Response sprocResponse = await scripts.ExecuteStoredProcedureStreamAsync(
sprocId,
new PartitionKey(testPartitionId),
new dynamic[] {"myPrefixString", "myPostfixString"});
using (StreamReader sr = new StreamReader(sprocResponse.ContentStream))
{
string stringResponse = await sr.ReadToEndAsync();
Console.WriteLine(stringResponse);
}
/// ]]></code></example>
</Docs>
</Member>
<Member MemberName="GetStoredProcedureQueryIterator<T>">
<MemberSignature Language="C#" Value="public abstract Azure.AsyncPageable<T> GetStoredProcedureQueryIterator<T> (Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<!!T> GetStoredProcedureQueryIterator<T>(class Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetStoredProcedureQueryIterator``1(Azure.Cosmos.QueryDefinition,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetStoredProcedureQueryIterator(Of T) (queryDefinition As QueryDefinition, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of T)" />
<MemberSignature Language="F#" Value="abstract member GetStoredProcedureQueryIterator : Azure.Cosmos.QueryDefinition * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<'T>" Usage="cosmosScripts.GetStoredProcedureQueryIterator (queryDefinition, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="queryDefinition" Type="Azure.Cosmos.QueryDefinition" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="queryDefinition">The cosmos SQL query definition.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for stored procedures under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the type feed iterator for sproc with queryDefinition as input.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM s where s.id like @testId";
QueryDefinition queryDefinition = new QueryDefinition(queryText);
queryDefinition.WithParameter("@testId", "testSprocId");
AsyncPageable<StoredProcedureProperties> iter = this.scripts.GetStoredProcedureQueryIterator<StoredProcedureProperties>(queryDefinition);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetStoredProcedureQueryIterator<T>">
<MemberSignature Language="C#" Value="public abstract Azure.AsyncPageable<T> GetStoredProcedureQueryIterator<T> (string queryText = default, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<!!T> GetStoredProcedureQueryIterator<T>(string queryText, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetStoredProcedureQueryIterator``1(System.String,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetStoredProcedureQueryIterator(Of T) (Optional queryText As String = Nothing, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of T)" />
<MemberSignature Language="F#" Value="abstract member GetStoredProcedureQueryIterator : string * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<'T>" Usage="cosmosScripts.GetStoredProcedureQueryIterator (queryText, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="queryText" Type="System.String" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="queryText">The cosmos SQL query text.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for stored procedures under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the type feed iterator for sproc with queryText as input.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM s where s.id like '%testId%'";
AsyncPageable<StoredProcedureProperties> iter = this.scripts.GetStoredProcedureQueryIterator<StoredProcedureProperties>(queryText);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetStoredProcedureQueryStreamIterator">
<MemberSignature Language="C#" Value="public abstract System.Collections.Generic.IAsyncEnumerable<Azure.Response> GetStoredProcedureQueryStreamIterator (Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IAsyncEnumerable`1<class Azure.Response> GetStoredProcedureQueryStreamIterator(class Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetStoredProcedureQueryStreamIterator(Azure.Cosmos.QueryDefinition,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetStoredProcedureQueryStreamIterator (queryDefinition As QueryDefinition, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Response)" />
<MemberSignature Language="F#" Value="abstract member GetStoredProcedureQueryStreamIterator : Azure.Cosmos.QueryDefinition * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.Response>" Usage="cosmosScripts.GetStoredProcedureQueryStreamIterator (queryDefinition, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IAsyncEnumerable<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="queryDefinition" Type="Azure.Cosmos.QueryDefinition" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="queryDefinition">The cosmos SQL query definition.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for stored procedures under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the stream feed iterator for sproc with queryDefinition as input.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM s where s.id like @testId";
QueryDefinition queryDefinition = new QueryDefinition(queryText);
queryDefinition.WithParameter("@testId", "testSprocId");
IAsyncEnumerable<Response> iter = this.scripts.GetStoredProcedureQueryStreamIterator(queryDefinition);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetStoredProcedureQueryStreamIterator">
<MemberSignature Language="C#" Value="public abstract System.Collections.Generic.IAsyncEnumerable<Azure.Response> GetStoredProcedureQueryStreamIterator (string queryText = default, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IAsyncEnumerable`1<class Azure.Response> GetStoredProcedureQueryStreamIterator(string queryText, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetStoredProcedureQueryStreamIterator(System.String,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetStoredProcedureQueryStreamIterator (Optional queryText As String = Nothing, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Response)" />
<MemberSignature Language="F#" Value="abstract member GetStoredProcedureQueryStreamIterator : string * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.Response>" Usage="cosmosScripts.GetStoredProcedureQueryStreamIterator (queryText, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IAsyncEnumerable<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="queryText" Type="System.String" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="queryText">The cosmos SQL query text.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for stored procedures under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the stream feed iterator for sproc with queryText as input.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM s where s.id like '%testId%'";
IAsyncEnumerable<Response> iter = this.scripts.GetStoredProcedureQueryStreamIterator(queryText);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTriggerQueryIterator<T>">
<MemberSignature Language="C#" Value="public abstract Azure.AsyncPageable<T> GetTriggerQueryIterator<T> (Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<!!T> GetTriggerQueryIterator<T>(class Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetTriggerQueryIterator``1(Azure.Cosmos.QueryDefinition,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetTriggerQueryIterator(Of T) (queryDefinition As QueryDefinition, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of T)" />
<MemberSignature Language="F#" Value="abstract member GetTriggerQueryIterator : Azure.Cosmos.QueryDefinition * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<'T>" Usage="cosmosScripts.GetTriggerQueryIterator (queryDefinition, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="queryDefinition" Type="Azure.Cosmos.QueryDefinition" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="queryDefinition">The cosmos SQL query definition.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for triggers under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the type feed iterator for Trigger with queryDefinition as input.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM t where t.id like @testId";
QueryDefinition queryDefinition = new QueryDefinition(queryText);
queryDefinition.WithParameter("@testId", "testTriggerId");
AsyncPageable<TriggerProperties> iter = this.scripts.GetTriggerQueryIterator<TriggerProperties>(queryDefinition);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTriggerQueryIterator<T>">
<MemberSignature Language="C#" Value="public abstract Azure.AsyncPageable<T> GetTriggerQueryIterator<T> (string queryText = default, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<!!T> GetTriggerQueryIterator<T>(string queryText, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetTriggerQueryIterator``1(System.String,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetTriggerQueryIterator(Of T) (Optional queryText As String = Nothing, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of T)" />
<MemberSignature Language="F#" Value="abstract member GetTriggerQueryIterator : string * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<'T>" Usage="cosmosScripts.GetTriggerQueryIterator (queryText, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="queryText" Type="System.String" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="queryText">The cosmos SQL query text.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for triggers under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the type feed iterator for Trigger with queryText as input.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM t where t.id like '%testId%'";
AsyncPageable<TriggerProperties> iter = this.scripts.GetTriggerQueryIterator<TriggerProperties>(queryText);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTriggerQueryStreamIterator">
<MemberSignature Language="C#" Value="public abstract System.Collections.Generic.IAsyncEnumerable<Azure.Response> GetTriggerQueryStreamIterator (Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IAsyncEnumerable`1<class Azure.Response> GetTriggerQueryStreamIterator(class Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetTriggerQueryStreamIterator(Azure.Cosmos.QueryDefinition,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetTriggerQueryStreamIterator (queryDefinition As QueryDefinition, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Response)" />
<MemberSignature Language="F#" Value="abstract member GetTriggerQueryStreamIterator : Azure.Cosmos.QueryDefinition * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.Response>" Usage="cosmosScripts.GetTriggerQueryStreamIterator (queryDefinition, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IAsyncEnumerable<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="queryDefinition" Type="Azure.Cosmos.QueryDefinition" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="queryDefinition">The cosmos SQL query definition.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for triggers under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the stream feed iterator for Trigger with queryDefinition as input.
<code language="c#"><![CDATA[
Scripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM t where t.id like @testId";
QueryDefinition queryDefinition = new QueryDefinition(queryText);
queryDefinition.WithParameter("@testId", "testTriggerId");
IAsyncEnumerable<Response> iter = this.scripts.GetTriggerQueryStreamIterator(queryDefinition);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetTriggerQueryStreamIterator">
<MemberSignature Language="C#" Value="public abstract System.Collections.Generic.IAsyncEnumerable<Azure.Response> GetTriggerQueryStreamIterator (string queryText = default, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IAsyncEnumerable`1<class Azure.Response> GetTriggerQueryStreamIterator(string queryText, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetTriggerQueryStreamIterator(System.String,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetTriggerQueryStreamIterator (Optional queryText As String = Nothing, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Response)" />
<MemberSignature Language="F#" Value="abstract member GetTriggerQueryStreamIterator : string * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.Response>" Usage="cosmosScripts.GetTriggerQueryStreamIterator (queryText, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IAsyncEnumerable<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="queryText" Type="System.String" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="queryText">The cosmos SQL query text.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for triggers under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the stream feed iterator for Trigger with queryText as input.
<code language="c#"><![CDATA[
Scripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM t where t.id like '%testId%'";
IAsyncEnumerable<Response> iter = this.scripts.GetTriggerQueryStreamIterator(queryText);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetUserDefinedFunctionQueryIterator<T>">
<MemberSignature Language="C#" Value="public abstract Azure.AsyncPageable<T> GetUserDefinedFunctionQueryIterator<T> (Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<!!T> GetUserDefinedFunctionQueryIterator<T>(class Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetUserDefinedFunctionQueryIterator``1(Azure.Cosmos.QueryDefinition,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetUserDefinedFunctionQueryIterator(Of T) (queryDefinition As QueryDefinition, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of T)" />
<MemberSignature Language="F#" Value="abstract member GetUserDefinedFunctionQueryIterator : Azure.Cosmos.QueryDefinition * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<'T>" Usage="cosmosScripts.GetUserDefinedFunctionQueryIterator (queryDefinition, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="queryDefinition" Type="Azure.Cosmos.QueryDefinition" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="queryDefinition">The cosmos SQL query definition.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for user defined functions under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the type feed iterator for UDF with queryDefinition as input.
<code language="c#"><![CDATA[
Scripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM u where u.id like @testId";
QueryDefinition queryDefinition = new QueryDefinition(queryText);
queryDefinition.WithParameter("@testId", "testUDFId");
AsyncPageable<UserDefinedFunctionProperties> iter = this.scripts.GetUserDefinedFunctionQueryIterator<UserDefinedFunctionProperties>(queryDefinition);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetUserDefinedFunctionQueryIterator<T>">
<MemberSignature Language="C#" Value="public abstract Azure.AsyncPageable<T> GetUserDefinedFunctionQueryIterator<T> (string queryText = default, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1<!!T> GetUserDefinedFunctionQueryIterator<T>(string queryText, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetUserDefinedFunctionQueryIterator``1(System.String,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetUserDefinedFunctionQueryIterator(Of T) (Optional queryText As String = Nothing, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of T)" />
<MemberSignature Language="F#" Value="abstract member GetUserDefinedFunctionQueryIterator : string * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> Azure.AsyncPageable<'T>" Usage="cosmosScripts.GetUserDefinedFunctionQueryIterator (queryText, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.AsyncPageable<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="queryText" Type="System.String" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="queryText">The cosmos SQL query text.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for user defined functions under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the type feed iterator for UDF with queryText as input.
<code language="c#"><![CDATA[
Scripts scripts = this.container.Scripts;
QueryDefinition queryDefinition = new QueryDefinition("SELECT * FROM u where u.id like '%testId%'");
AsyncPageable<UserDefinedFunctionProperties> iter = this.scripts.GetUserDefinedFunctionQueryIterator<UserDefinedFunctionProperties>(queryDefinition);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetUserDefinedFunctionQueryStreamIterator">
<MemberSignature Language="C#" Value="public abstract System.Collections.Generic.IAsyncEnumerable<Azure.Response> GetUserDefinedFunctionQueryStreamIterator (Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IAsyncEnumerable`1<class Azure.Response> GetUserDefinedFunctionQueryStreamIterator(class Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetUserDefinedFunctionQueryStreamIterator(Azure.Cosmos.QueryDefinition,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetUserDefinedFunctionQueryStreamIterator (queryDefinition As QueryDefinition, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Response)" />
<MemberSignature Language="F#" Value="abstract member GetUserDefinedFunctionQueryStreamIterator : Azure.Cosmos.QueryDefinition * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.Response>" Usage="cosmosScripts.GetUserDefinedFunctionQueryStreamIterator (queryDefinition, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IAsyncEnumerable<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="queryDefinition" Type="Azure.Cosmos.QueryDefinition" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="queryDefinition">The cosmos SQL query definition.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for user defined functions under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the stream feed iterator for UDF with queryDefinition as input.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
string queryText = "SELECT * FROM u where u.id like @testId";
QueryDefinition queryDefinition = new QueryDefinition(queryText);
queryDefinition.WithParameter("@testId", "testUdfId");
IAsyncEnumerable<Response> iter = this.scripts.GetUserDefinedFunctionQueryStreamIterator(queryDefinition);
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetUserDefinedFunctionQueryStreamIterator">
<MemberSignature Language="C#" Value="public abstract System.Collections.Generic.IAsyncEnumerable<Azure.Response> GetUserDefinedFunctionQueryStreamIterator (string queryText = default, string continuationToken = default, Azure.Cosmos.QueryRequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IAsyncEnumerable`1<class Azure.Response> GetUserDefinedFunctionQueryStreamIterator(string queryText, string continuationToken, class Azure.Cosmos.QueryRequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.GetUserDefinedFunctionQueryStreamIterator(System.String,System.String,Azure.Cosmos.QueryRequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetUserDefinedFunctionQueryStreamIterator (Optional queryText As String = Nothing, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Response)" />
<MemberSignature Language="F#" Value="abstract member GetUserDefinedFunctionQueryStreamIterator : string * string * Azure.Cosmos.QueryRequestOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.Response>" Usage="cosmosScripts.GetUserDefinedFunctionQueryStreamIterator (queryText, continuationToken, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IAsyncEnumerable<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="queryText" Type="System.String" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.QueryRequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="queryText">The cosmos SQL query text.</param>
<param name="continuationToken">(Optional) The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request <see cref="T:Azure.Cosmos.QueryRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
This method creates a query for user defined functions under a container using a SQL statement. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Azure.Cosmos.QueryDefinition" /> overload.
</summary>
<returns>An iterator to read through the existing stored procedures.</returns>
<remarks>To be added.</remarks>
<example>
This create the stream feed iterator for UDF with queryText as input.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
QueryDefinition queryDefinition = new QueryDefinition("SELECT * FROM u where u.id like '%testId%'");
IAsyncEnumerable<Response> iter = this.scripts.GetUserDefinedFunctionQueryStreamIterator(queryDefinition);
]]></code></example>
</Docs>
</Member>
<Member MemberName="ReadStoredProcedureAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>> ReadStoredProcedureAsync (string id, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.StoredProcedureProperties>> ReadStoredProcedureAsync(string id, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.ReadStoredProcedureAsync(System.String,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ReadStoredProcedureAsync (id As String, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of StoredProcedureProperties))" />
<MemberSignature Language="F#" Value="abstract member ReadStoredProcedureAsync : string * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>>" Usage="cosmosScripts.ReadStoredProcedureAsync (id, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The identifier of the Stored Procedure to read.</param>
<param name="requestOptions">(Optional) The options for the stored procedure request <see cref="T:Azure.Cosmos.StoredProcedureRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Reads a <see cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" /> from the Azure Cosmos service as an asynchronous operation.
</summary>
<returns>
A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" />.
</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="id" /> is not set.</exception>
<exception cref="T:Azure.Cosmos.CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>404</term><description>NotFound - This means the resource you tried to read did not exist.</description></item><item><term>429</term><description>TooManyRequests - This means you have exceeded the number of request units per second. Consult the DocumentClientException.RetryAfter value to see how long you should wait before retrying this operation.</description></item></list></exception>
<example>
This reads an existing stored procedure.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
Response<StoredProcedureProperties> storedProcedure = await scripts.ReadStoredProcedureAsync("ExistingId");
]]></code></example>
</Docs>
</Member>
<Member MemberName="ReadTriggerAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>> ReadTriggerAsync (string id, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.TriggerProperties>> ReadTriggerAsync(string id, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.ReadTriggerAsync(System.String,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ReadTriggerAsync (id As String, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of TriggerProperties))" />
<MemberSignature Language="F#" Value="abstract member ReadTriggerAsync : string * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>>" Usage="cosmosScripts.ReadTriggerAsync (id, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The id of the trigger to read.</param>
<param name="requestOptions">(Optional) The options for the trigger request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Reads a <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> from the Azure Cosmos service as an asynchronous operation.
</summary>
<returns>
A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Response`1" /> which wraps a <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> containing the read resource record.
</returns>
<remarks>To be added.</remarks>
<exception cref="T:Azure.Cosmos.CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>429</term><description>TooManyRequests - This means you have exceeded the number of request units per second. Consult the DocumentClientException.RetryAfter value to see how long you should wait before retrying this operation.</description></item></list></exception>
<example>
This reads an existing trigger
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
Response<TriggerProperties> response = await scripts.ReadTriggerAsync("ExistingId");
TriggerProperties triggerProperties = response;
]]></code></example>
</Docs>
</Member>
<Member MemberName="ReadUserDefinedFunctionAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>> ReadUserDefinedFunctionAsync (string id, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.UserDefinedFunctionProperties>> ReadUserDefinedFunctionAsync(string id, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.ReadUserDefinedFunctionAsync(System.String,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ReadUserDefinedFunctionAsync (id As String, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of UserDefinedFunctionProperties))" />
<MemberSignature Language="F#" Value="abstract member ReadUserDefinedFunctionAsync : string * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>>" Usage="cosmosScripts.ReadUserDefinedFunctionAsync (id, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The id of the user defined function to read</param>
<param name="requestOptions">(Optional) The options for the user defined function request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Reads a <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> from the Azure Cosmos DB service as an asynchronous operation.
</summary>
<returns>
A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Response`1" /> which wraps a <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> containing the read resource record.
</returns>
<remarks>To be added.</remarks>
<exception cref="T:Azure.Cosmos.CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>404</term><description>NotFound - This means the resource you tried to read did not exist.</description></item><item><term>429</term><description>TooManyRequests - This means you have exceeded the number of request units per second. Consult the DocumentClientException.RetryAfter value to see how long you should wait before retrying this operation.</description></item></list></exception>
<example>
This reads an existing user defined function.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
Response<UserDefinedFunctionProperties> response = await scripts.ReadUserDefinedFunctionAsync("ExistingId");
UserDefinedFunctionProperties udfProperties = response;
]]></code></example>
</Docs>
</Member>
<Member MemberName="ReplaceStoredProcedureAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>> ReplaceStoredProcedureAsync (Azure.Cosmos.Scripts.StoredProcedureProperties storedProcedureProperties, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.StoredProcedureProperties>> ReplaceStoredProcedureAsync(class Azure.Cosmos.Scripts.StoredProcedureProperties storedProcedureProperties, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.ReplaceStoredProcedureAsync(Azure.Cosmos.Scripts.StoredProcedureProperties,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ReplaceStoredProcedureAsync (storedProcedureProperties As StoredProcedureProperties, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of StoredProcedureProperties))" />
<MemberSignature Language="F#" Value="abstract member ReplaceStoredProcedureAsync : Azure.Cosmos.Scripts.StoredProcedureProperties * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>>" Usage="cosmosScripts.ReplaceStoredProcedureAsync (storedProcedureProperties, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.StoredProcedureProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="storedProcedureProperties" Type="Azure.Cosmos.Scripts.StoredProcedureProperties" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="storedProcedureProperties">The Stored Procedure to replace</param>
<param name="requestOptions">(Optional) The options for the stored procedure request <see cref="T:Azure.Cosmos.StoredProcedureRequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Replaces a <see cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" /> in the Azure Cosmos service as an asynchronous operation.
</summary>
<returns>
A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Cosmos.Scripts.StoredProcedureProperties" />.
</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="storedProcedureProperties" /> is not set.</exception>
<exception cref="T:Azure.Cosmos.CosmosException">This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
<list type="table"><listheader><term>StatusCode</term><description>Reason for exception</description></listheader><item><term>404</term><description>NotFound - This means the resource you tried to delete did not exist.</description></item></list></exception>
<example>
This examples replaces an existing stored procedure.
<code language="c#"><![CDATA[
//Updated body
string body = @"function AddTax() {
var item = getContext().getRequest().getBody();
// Validate/calculate the tax.
item.tax = item.cost* .15;
// Update the request -- this is what is going to be inserted.
getContext().getRequest().setBody(item);
}";
CosmosScripts scripts = this.container.Scripts;
Response<StoredProcedureProperties> response = await scripts.ReplaceStoredProcedureAsync(new StoredProcedureProperties("testTriggerId", body));
]]></code></example>
</Docs>
</Member>
<Member MemberName="ReplaceTriggerAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>> ReplaceTriggerAsync (Azure.Cosmos.Scripts.TriggerProperties triggerProperties, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.TriggerProperties>> ReplaceTriggerAsync(class Azure.Cosmos.Scripts.TriggerProperties triggerProperties, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.ReplaceTriggerAsync(Azure.Cosmos.Scripts.TriggerProperties,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ReplaceTriggerAsync (triggerProperties As TriggerProperties, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of TriggerProperties))" />
<MemberSignature Language="F#" Value="abstract member ReplaceTriggerAsync : Azure.Cosmos.Scripts.TriggerProperties * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>>" Usage="cosmosScripts.ReplaceTriggerAsync (triggerProperties, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.TriggerProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="triggerProperties" Type="Azure.Cosmos.Scripts.TriggerProperties" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="triggerProperties">The <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> object.</param>
<param name="requestOptions">(Optional) The options for the trigger request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Replaces a <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> in the Azure Cosmos service as an asynchronous operation.
</summary>
<returns>
A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Response`1" /> which wraps a <see cref="T:Azure.Cosmos.Scripts.TriggerProperties" /> containing the updated resource record.
</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">If <paramref name="triggerProperties" /> is not set.</exception>
<example>
This examples replaces an existing trigger.
<code language="c#"><![CDATA[
TriggerProperties triggerProperties = new TriggerProperties
{
Id = "testTriggerId",
Body = @"function AddTax() {
var item = getContext().getRequest().getBody();
// Validate/calculate the tax.
item.tax = item.cost* .15;
// Update the request -- this is what is going to be inserted.
getContext().getRequest().setBody(item);
}",
TriggerOperation = TriggerOperation.All,
TriggerType = TriggerType.Post
};
CosmosScripts scripts = this.container.Scripts;
Response<TriggerProperties> response = await scripts.ReplaceTriggerAsync(triggerSettigs);
]]></code></example>
</Docs>
</Member>
<Member MemberName="ReplaceUserDefinedFunctionAsync">
<MemberSignature Language="C#" Value="public abstract System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>> ReplaceUserDefinedFunctionAsync (Azure.Cosmos.Scripts.UserDefinedFunctionProperties userDefinedFunctionProperties, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Cosmos.Scripts.UserDefinedFunctionProperties>> ReplaceUserDefinedFunctionAsync(class Azure.Cosmos.Scripts.UserDefinedFunctionProperties userDefinedFunctionProperties, class Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Cosmos.Scripts.CosmosScripts.ReplaceUserDefinedFunctionAsync(Azure.Cosmos.Scripts.UserDefinedFunctionProperties,Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function ReplaceUserDefinedFunctionAsync (userDefinedFunctionProperties As UserDefinedFunctionProperties, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of UserDefinedFunctionProperties))" />
<MemberSignature Language="F#" Value="abstract member ReplaceUserDefinedFunctionAsync : Azure.Cosmos.Scripts.UserDefinedFunctionProperties * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>>" Usage="cosmosScripts.ReplaceUserDefinedFunctionAsync (userDefinedFunctionProperties, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Cosmos</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Cosmos.Scripts.UserDefinedFunctionProperties>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="userDefinedFunctionProperties" Type="Azure.Cosmos.Scripts.UserDefinedFunctionProperties" />
<Parameter Name="requestOptions" Type="Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="userDefinedFunctionProperties">The <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> object.</param>
<param name="requestOptions">(Optional) The options for the user defined function request <see cref="T:Azure.Cosmos.RequestOptions" /></param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Replaces a <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> in the Azure Cosmos DB service as an asynchronous operation.
</summary>
<returns>
A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Azure.Response`1" /> which wraps a <see cref="T:Azure.Cosmos.Scripts.UserDefinedFunctionProperties" /> containing the updated resource record.
</returns>
<remarks>To be added.</remarks>
<example>
This examples replaces an existing user defined function.
<code language="c#"><![CDATA[
CosmosScripts scripts = this.container.Scripts;
UserDefinedFunctionProperties udfProperties = new UserDefinedFunctionProperties
{
Id = "testUserDefinedFunId",
Body = "function(amt) { return amt * 0.15; }",
};
Response<UserDefinedFunctionProperties> response = await scripts.ReplaceUserDefinedFunctionAsync(udfProperties);
UserDefinedFunctionProperties udfProperties = response;
]]></code></example>
</Docs>
</Member>
</Members>
</Type>