DocumentClient.ReplaceStoredProcedureAsync
Method
Definition
Overloads
| ReplaceStoredProcedureAsync(StoredProcedure, RequestOptions) |
Replaces a StoredProcedure in the Azure DocumentDB database service as an asynchronous operation. |
| ReplaceStoredProcedureAsync(Uri, StoredProcedure, RequestOptions) |
Replace the specified stored procedure in the Azure DocumentDB database service. |
ReplaceStoredProcedureAsync(StoredProcedure, RequestOptions)
Replaces a StoredProcedure in the Azure DocumentDB database service as an asynchronous operation.
public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.StoredProcedure>> ReplaceStoredProcedureAsync (Microsoft.Azure.Documents.StoredProcedure storedProcedure, Microsoft.Azure.Documents.Client.RequestOptions options = null);
- storedProcedure
- StoredProcedure
The updated StoredProcedure to replace the existing resource with.
- options
- RequestOptions
(Optional) The request options for the request.
A System.Threading.Tasks containing a ResourceResponse<TResource> which wraps a StoredProcedure containing the updated resource record.
If storedProcedure is not set.
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:
| StatusCode | Reason for exception |
|---|---|
| 404 | NotFound - This means the resource you tried to delete did not exist. |
ReplaceStoredProcedureAsync(Uri, StoredProcedure, RequestOptions)
Replace the specified stored procedure in the Azure DocumentDB database service.
public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.StoredProcedure>> ReplaceStoredProcedureAsync (Uri storedProcedureUri, Microsoft.Azure.Documents.StoredProcedure storedProcedure, Microsoft.Azure.Documents.Client.RequestOptions options = null);
- storedProcedureUri
- Uri
the URI for the stored procedure to be updated.
- storedProcedure
- StoredProcedure
the updated stored procedure.
- options
- RequestOptions
The request options for the request.
The task object representing the service response for the asynchronous operation.