Share via


az cognitiveservices account connection

Manage Azure Cognitive Services connection and its more specific derivatives.

Azure Cognitive Services connection provides a secure way to store authentication and configuration information needed to connect and interact with the external resources.

Commands

Name Description Type Status
az cognitiveservices account connection create

Create a connection.

Core GA
az cognitiveservices account connection delete

Delete a connection.

Core GA
az cognitiveservices account connection list

List all connections.

Core GA
az cognitiveservices account connection show

Show details of a connection.

Core GA
az cognitiveservices account connection update

Update a connection.

Core GA

az cognitiveservices account connection create

Create a connection.

az cognitiveservices account connection create --connection-name
                                               --file
                                               --name
                                               --resource-group

Examples

Create a connection from a YAML specification file.

az cognitiveservices account connection create --file connection.yml --connection-name my-connection-name --resource-group my-resource-group --name my-cogsvc-account

Required Parameters

--connection-name

Cognitive Services account connection name.

--file

Path to the connection file in JSON or YAML format.

--name -n

Cognitive service account 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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az cognitiveservices account connection delete

Delete a connection.

az cognitiveservices account connection delete --connection-name
                                               --name
                                               --resource-group

Examples

Delete a connection.

az cognitiveservices account connection delete --resource-group my-resource-group --connection-name my-connection-name --name my-cogsvc-account

Required Parameters

--connection-name

Cognitive Services account connection name.

--name -n

Cognitive service account 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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az cognitiveservices account connection list

List all connections.

The list of connections in an Azure AI Foundry account.

az cognitiveservices account connection list --name
                                             --resource-group
                                             [--category]
                                             [--include-all]
                                             [--target]

Examples

List all connections in an Azure AI Foundry account

az cognitiveservices account connection list --resource-group my-resource-group --name my-cogsvc-account

List all the connections in an Azure AI Foundry account using --query argument to execute a JMESPath query on the results of commands.

az cognitiveservices account connection list --query "[].{Name:name}"  --output table --resource-group my-resource-group --name my-cogsvc-account

Required Parameters

--name -n

Cognitive service account name.

--resource-group -g

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--category

Category of the connection. Default value is None.

--include-all

Query parameter that indicates if get connection call should return both connections and datastores. Default value is False.

Property Value
Default value: False
--target

Target of the connection. Default value is None.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az cognitiveservices account connection show

Show details of a connection.

az cognitiveservices account connection show --connection-name
                                             --name
                                             --resource-group

Examples

Show details of a connection.

az cognitiveservices account connection show --resource-group my-resource-group --connection-name my-connection-name --name my-cogsvc-account

Required Parameters

--connection-name

Cognitive Services account connection name.

--name -n

Cognitive service account 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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az cognitiveservices account connection update

Update a connection.

az cognitiveservices account connection update --connection-name
                                               --name
                                               --resource-group
                                               [--add]
                                               [--force-string]
                                               [--remove]
                                               [--set]

Examples

Update a connection API Key.

az cognitiveservices account connection update --resource-group my-resource-group --connection-name my-connection-name --name my-cogsvc-account --set properties.credentials.key=<new-key>

Required Parameters

--connection-name

Cognitive Services account connection name.

--name -n

Cognitive service account name.

--resource-group -g

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False