az cosmosdb sql user-defined-function

Manage Azure Cosmos DB SQL user defined functions.

Commands

Name Description Type Status
az cosmosdb sql user-defined-function create

Create an SQL user defined function under an Azure Cosmos DB SQL container.

Core GA
az cosmosdb sql user-defined-function delete

Delete the SQL user defined function under an Azure Cosmos DB SQL container.

Core GA
az cosmosdb sql user-defined-function list

List the SQL user defined functions under an Azure Cosmos DB SQL container.

Core GA
az cosmosdb sql user-defined-function show

Show the details of a SQL user defined function under an Azure Cosmos DB SQL container.

Core GA
az cosmosdb sql user-defined-function update

Creates or Updates an Azure Cosmos DB SQL user defined function.

Core GA

az cosmosdb sql user-defined-function create

Create an SQL user defined function under an Azure Cosmos DB SQL container.

az cosmosdb sql user-defined-function create --account-name
                                             --body
                                             --container-name
                                             --database-name
                                             --name
                                             --resource-group

Examples

Create an Azure Cosmos DB SQL user defined function.

az cosmosdb sql user-defined-function create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyUserDefinedFunction -b UserDefinedFunctionBody

Required Parameters

--account-name -a

Cosmosdb account name.

--body -b

UserDefinedFunction body, you can enter it as a string or as a file, e.g., --body @udfbody-file.json.

--container-name -c

Container name.

--database-name -d

Database name.

--name -n

UserDefinedFunction name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az cosmosdb sql user-defined-function delete

Delete the SQL user defined function under an Azure Cosmos DB SQL container.

az cosmosdb sql user-defined-function delete --account-name
                                             --container-name
                                             --database-name
                                             --name
                                             --resource-group
                                             [--yes]

Required Parameters

--account-name -a

Cosmosdb account name.

--container-name -c

Container name.

--database-name -d

Database name.

--name -n

UserDefinedFunction name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az cosmosdb sql user-defined-function list

List the SQL user defined functions under an Azure Cosmos DB SQL container.

az cosmosdb sql user-defined-function list --account-name
                                           --container-name
                                           --database-name
                                           --resource-group

Required Parameters

--account-name -a

Cosmosdb account name.

--container-name -c

Container name.

--database-name -d

Database name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az cosmosdb sql user-defined-function show

Show the details of a SQL user defined function under an Azure Cosmos DB SQL container.

az cosmosdb sql user-defined-function show --account-name
                                           --container-name
                                           --database-name
                                           --name
                                           --resource-group

Required Parameters

--account-name -a

Cosmosdb account name.

--container-name -c

Container name.

--database-name -d

Database name.

--name -n

UserDefinedFunction name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az cosmosdb sql user-defined-function update

Creates or Updates an Azure Cosmos DB SQL user defined function.

az cosmosdb sql user-defined-function update --account-name
                                             --body
                                             --container-name
                                             --database-name
                                             --name
                                             --resource-group

Required Parameters

--account-name -a

Cosmosdb account name.

--body -b

UserDefinedFunction body, you can enter it as a string or as a file, e.g., --body @udfbody-file.json.

--container-name -c

Container name.

--database-name -d

Database name.

--name -n

UserDefinedFunction name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.