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 of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
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 of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az containerapp env storage remove
Remove a storage from an environment.
az containerapp env storage remove --name
--resource-group
--storage-name
[--acquire-policy-token]
[--change-reference]
[--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 of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name of the storage.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az containerapp env storage remove (containerapp extension)
Remove a storage from an environment.
az containerapp env storage remove --name
--resource-group
--storage-name
[--acquire-policy-token]
[--change-reference]
[--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 of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name of the storage.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az containerapp env storage set
Create or update a storage.
az containerapp env storage set --access-mode {ReadOnly, ReadWrite}
--account-name --azure-file-account-name
--azure-file-account-key --storage-account-key
--azure-file-share-name --file-share
--name
--resource-group
--storage-name
[--acquire-policy-token]
[--change-reference]
[--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 for the AzureFile storage.
| Property | Value |
|---|---|
| Accepted values: | ReadOnly, ReadWrite |
Name of the AzureFile storage account.
Key of the AzureFile storage account.
Name of the share on the AzureFile storage.
Name of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name of the storage.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az containerapp env storage set (containerapp extension)
Create or update a storage.
AzureFile storage supports account key, Azure Key Vault secret, or managed identity authentication. Before using Azure Files managed identity authentication with --azure-file-identity, assign the identity to the managed environment, enable Managed Identity for SMB on the storage account, and grant the identity the Storage File Data SMB MI Admin role (a235d3ee-5935-4cfb-8cc5-a3303ad5995e) at storage account scope.
az containerapp env storage set --name
--resource-group
--storage-name
[--access-mode {ReadOnly, ReadWrite}]
[--account-name --azure-file-account-name]
[--acquire-policy-token]
[--azure-file-account-key --storage-account-key]
[--azure-file-identity]
[--azure-file-key-vault-identity --key-vault-identity]
[--azure-file-key-vault-secret-url --key-vault-secret-url]
[--azure-file-share-name --file-share]
[--change-reference]
[--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 an Azure Files storage using an account key stored in Azure Key Vault.
az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --access-mode ReadOnly --azure-file-account-name MyAccountName --azure-file-share-name MyShareName --azure-file-key-vault-secret-url https://MyVault.vault.azure.net/secrets/MyStorageAccountKey --azure-file-key-vault-identity MyIdentityResourceId
Create an Azure Files storage using a user-assigned managed identity.
az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --access-mode ReadWrite --azure-file-account-name MyAccountName --azure-file-share-name MyShareName --azure-file-identity MyIdentityResourceId
Create an Azure Files storage using the system-assigned managed identity.
az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --access-mode ReadWrite --azure-file-account-name MyAccountName --azure-file-share-name MyShareName --azure-file-identity system
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 of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name of the storage.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Access mode for the AzureFile or nfs AzureFile storage.
| Property | Value |
|---|---|
| Accepted values: | ReadOnly, ReadWrite |
Name of the AzureFile storage account.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Key of the AzureFile storage account.
Managed identity to authenticate with Azure Files. Use 'system' or a user-assigned identity. The identity must be assigned to the managed environment and have the Storage File Data SMB MI Admin role on the storage account. Managed Identity for SMB must be enabled on the storage account.
Managed identity to authenticate with Azure Key Vault. Use 'system' or a user-assigned identity. Defaults to 'system'.
Azure Key Vault secret URL containing the Azure Files storage account key.
Name of the share on the AzureFile or nfs AzureFile storage.
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Default value: | False |
Server of the NfsAzureFile storage account.
Type of the storage. Assumed to be AzureFile if not specified.
| Property | Value |
|---|---|
| Accepted values: | AzureFile, NfsAzureFile |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
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 of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name of the storage.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
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 of the Container Apps environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name of the storage.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |