az storage cors
Manage storage service Cross-Origin Resource Sharing (CORS).
Commands
Name | Description | Type | Status |
---|---|---|---|
az storage cors add |
Add a CORS rule to a storage account. |
Core | GA |
az storage cors clear |
Remove all CORS rules from a storage account. |
Core | GA |
az storage cors list |
List all CORS rules for a storage account. |
Core | GA |
az storage cors add
Add a CORS rule to a storage account.
az storage cors add --methods
--origins
--services
[--account-key]
[--account-name]
[--allowed-headers]
[--connection-string]
[--exposed-headers]
[--max-age]
[--sas-token]
[--timeout]
Required Parameters
Space-separated list of HTTP methods allowed to be executed by the origin.
Space-separated list of origin domains that will be allowed via CORS, or '*' to allow all domains.
The storage service(s) to add rules to. Allowed options are: (b)lob, (f)ile, (q)ueue, (t)able. Can be combined.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Space-separated list of response headers allowed to be part of the cross-origin request.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Space-separated list of response headers to expose to CORS clients.
The maximum number of seconds the client/browser should cache a preflight response.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az storage cors clear
Remove all CORS rules from a storage account.
az storage cors clear --services
[--account-key]
[--account-name]
[--connection-string]
[--sas-token]
[--timeout]
Examples
Remove all CORS rules from a storage account. (autogenerated)
az storage cors clear --account-name MyAccount --services bfqt
Required Parameters
The storage service(s) to remove rules from. Allowed options are: (b)lob, (f)ile, (q)ueue, (t)able. Can be combined.
Optional Parameters
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az storage cors list
List all CORS rules for a storage account.
az storage cors list [--account-key]
[--account-name]
[--connection-string]
[--sas-token]
[--services]
[--timeout]
Examples
List all CORS rules for a storage account. (autogenerated)
az storage cors list --account-key 00000000 --account-name mystorageaccount
Optional Parameters
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
The storage service(s) to list rules for. Allowed options are: (b)lob, (f)ile, (q)ueue, (t)able. Can be combined.
Request timeout in seconds. Applies to each call to the service.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.