Dijeli putem


az staticwebapp dbconnection

Note

This reference is part of the staticwebapp extension for the Azure CLI (version 2.39.0 or higher). The extension will automatically install the first time you run an az staticwebapp dbconnection command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Static Web App database connections.

Commands

Name Description Type Status
az staticwebapp dbconnection create

Create a Static Web App database connection.

Extension Preview
az staticwebapp dbconnection delete

Delete a Static Web App database connection.

Extension Preview
az staticwebapp dbconnection show

Get details for a Static Web App database connection.

Extension Preview

az staticwebapp dbconnection create

Preview

Command group 'staticwebapp dbconnection' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a Static Web App database connection.

az staticwebapp dbconnection create --db-resource-id
                                    --name
                                    --resource-group
                                    [--db-name]
                                    [--environment]
                                    [--mi-system-assigned]
                                    [--mi-user-assigned]
                                    [--password]
                                    [--username]

Required Parameters

--db-resource-id -d

The azure resource ID for the database server/account to connect to e.g. '/subscriptions/MySubId/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/servers/MyServer' for an Azure SQL database.

--name -n

Name of the Static Web App.

--resource-group -g

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

Optional Parameters

--db-name -b

The name of the database to connect to. Not required for CosmosDB.

--environment -e

Name of the environment of Static Web App.

--mi-system-assigned -s

Use the Static Web App's system-assigned identity for auth with the database. Must be assigned to the Static Web App and have the right permissions on the database.

Default value: False
--mi-user-assigned -i

A resource ID for a user-assigned managed identity to use for auth with the database. Must be assigned to the Static Web App and have the right permissions on the database.

--password -p

The password to use for authentication with the database. Not required for all databases.

--username -u

The username to use for authentication with the database. Not required for all databases.

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 staticwebapp dbconnection delete

Preview

Command group 'staticwebapp dbconnection' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a Static Web App database connection.

az staticwebapp dbconnection delete --name
                                    --resource-group
                                    [--environment]
                                    [--yes]

Required Parameters

--name -n

Name of the Static Web App.

--resource-group -g

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

Optional Parameters

--environment -e

Name of the environment of Static Web App.

--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 staticwebapp dbconnection show

Preview

Command group 'staticwebapp dbconnection' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get details for a Static Web App database connection.

az staticwebapp dbconnection show --name
                                  --resource-group
                                  [--detailed]
                                  [--environment]

Required Parameters

--name -n

Name of the Static Web App.

--resource-group -g

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

Optional Parameters

--detailed -d

Get detailed information on database connections.

Default value: False
--environment -e

Name of the environment of Static Web App.

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.