Share via


az containerapp env storage

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Commands to manage storage for the Container Apps environment.

Commands

Name Description Type Status
az containerapp env storage list

List the storages for an environment.

Core GA
az containerapp env storage list (containerapp extension)

List the storages for an environment.

Extension GA
az containerapp env storage remove

Remove a storage from an environment.

Core GA
az containerapp env storage remove (containerapp extension)

Remove a storage from an environment.

Extension GA
az containerapp env storage set

Create or update a storage.

Core GA
az containerapp env storage set (containerapp extension)

Create or update a storage.

Extension GA
az containerapp env storage show

Show the details of a storage.

Core GA
az containerapp env storage show (containerapp extension)

Show the details of a storage.

Extension GA

az containerapp env storage list

List the storages for an environment.

az containerapp env storage list --name
                                 --resource-group

Examples

List the storages for an environment.

az containerapp env storage list -g MyResourceGroup -n MyEnvironment

Required Parameters

--name -n

Name of the Container Apps environment.

--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 containerapp env storage list (containerapp extension)

List the storages for an environment.

az containerapp env storage list --name
                                 --resource-group

Examples

List the storages for an environment.

az containerapp env storage list -g MyResourceGroup -n MyEnvironment

Required Parameters

--name -n

Name of the Container Apps environment.

--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 containerapp env storage remove

Remove a storage from an environment.

az containerapp env storage remove --name
                                   --resource-group
                                   --storage-name
                                   [--yes]

Examples

Remove a storage from a Container Apps environment.

az containerapp env storage remove -g MyResourceGroup --storage-name MyStorageName -n MyEnvironment

Required Parameters

--name -n

Name of the Container Apps environment.

--resource-group -g

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

--storage-name

Name of the storage.

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 containerapp env storage remove (containerapp extension)

Remove a storage from an environment.

az containerapp env storage remove --name
                                   --resource-group
                                   --storage-name
                                   [--yes]

Examples

Remove a storage from a Container Apps environment.

az containerapp env storage remove -g MyResourceGroup --storage-name MyStorageName -n MyEnvironment

Required Parameters

--name -n

Name of the Container Apps environment.

--resource-group -g

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

--storage-name

Name of the storage.

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 containerapp env storage set

Create or update a storage.

az containerapp env storage set --access-mode {ReadOnly, ReadWrite}
                                --account-name
                                --azure-file-account-key
                                --azure-file-share-name
                                --name
                                --resource-group
                                --storage-name
                                [--no-wait]

Examples

Create a storage.

az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --access-mode ReadOnly --azure-file-account-key MyAccountKey --azure-file-account-name MyAccountName --azure-file-share-name MyShareName

Required Parameters

--access-mode

Access mode for the AzureFile storage.

Accepted values: ReadOnly, ReadWrite
--account-name --azure-file-account-name -a

Name of the AzureFile storage account.

--azure-file-account-key --storage-account-key -k

Key of the AzureFile storage account.

--azure-file-share-name --file-share -f

Name of the share on the AzureFile storage.

--name -n

Name of the Container Apps environment.

--resource-group -g

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

--storage-name

Name of the storage.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

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 containerapp env storage set (containerapp extension)

Create or update a storage.

az containerapp env storage set --name
                                --resource-group
                                --storage-name
                                [--access-mode {ReadOnly, ReadWrite}]
                                [--account-name]
                                [--azure-file-account-key]
                                [--azure-file-share-name]
                                [--no-wait]
                                [--server]
                                [--storage-type {AzureFile, NfsAzureFile}]

Examples

Create a azure file storage.

az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --access-mode ReadOnly --azure-file-account-key MyAccountKey --azure-file-account-name MyAccountName --azure-file-share-name MyShareName

Create a nfs azure file storage.

az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --storage-type NfsAzureFile --access-mode ReadOnly --server MyNfsServer.file.core.windows.net --file-share /MyNfsServer/MyShareName

Required Parameters

--name -n

Name of the Container Apps environment.

--resource-group -g

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

--storage-name

Name of the storage.

Optional Parameters

--access-mode

Access mode for the AzureFile or nfs AzureFile storage.

Accepted values: ReadOnly, ReadWrite
--account-name --azure-file-account-name -a

Name of the AzureFile storage account.

--azure-file-account-key --storage-account-key -k

Key of the AzureFile storage account.

--azure-file-share-name --file-share -f

Name of the share on the AzureFile or nfs AzureFile storage.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--server -s
Preview

Server of the NfsAzureFile storage account.

--storage-type
Preview

Type of the storage. Assumed to be AzureFile if not specified.

Accepted values: AzureFile, NfsAzureFile
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 containerapp env storage show

Show the details of a storage.

az containerapp env storage show --name
                                 --resource-group
                                 --storage-name

Examples

Show the details of a storage.

az containerapp env storage show -g MyResourceGroup --storage-name MyStorageName -n MyEnvironment

Required Parameters

--name -n

Name of the Container Apps environment.

--resource-group -g

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

--storage-name

Name of the storage.

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 containerapp env storage show (containerapp extension)

Show the details of a storage.

az containerapp env storage show --name
                                 --resource-group
                                 --storage-name

Examples

Show the details of a storage.

az containerapp env storage show -g MyResourceGroup --storage-name MyStorageName -n MyEnvironment

Required Parameters

--name -n

Name of the Container Apps environment.

--resource-group -g

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

--storage-name

Name of the storage.

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.