Microsoft.DocumentDB databaseAccounts/sqlDatabases/containers/userDefinedFunctions 2019-08-01

Template format

To create a Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions",
  "apiVersion": "2019-08-01",
  "location": "string",
  "tags": {},
  "properties": {
    "resource": {
      "id": "string",
      "body": "string"
    },
    "options": {}
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions object

Name Type Required Value
name string Yes Cosmos DB userDefinedFunction name.
type enum Yes userDefinedFunctions
-or-
Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/userDefinedFunctions

See Set name and type for child resources.
apiVersion enum Yes 2019-08-01
location string No The location of the resource group to which the resource belongs.
tags object No
properties object Yes Properties to create and update Azure Cosmos DB userDefinedFunction. - SqlUserDefinedFunctionCreateUpdateProperties object

SqlUserDefinedFunctionCreateUpdateProperties object

Name Type Required Value
resource object Yes The standard JSON format of a userDefinedFunction - SqlUserDefinedFunctionResource object
options object Yes A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

SqlUserDefinedFunctionResource object

Name Type Required Value
id string Yes Name of the Cosmos DB SQL userDefinedFunction
body string No Body of the User Defined Function

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create Azure Cosmos Core (SQL) API stored procedures

Deploy to Azure
This template creates an Azure Cosmos account for Core (SQL) API and a container with a stored procedure, trigger and user defined function.