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 {CONNECT, DELETE, GET, HEAD, MERGE, OPTIONS, PATCH, POST, PUT, TRACE}
--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.
Property | Value |
---|---|
Accepted values: | CONNECT, DELETE, GET, HEAD, MERGE, OPTIONS, PATCH, POST, PUT, TRACE |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
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.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
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.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
Space-separated list of response headers to expose to CORS clients.
The maximum number of seconds the client/browser should cache a preflight response.
Property | Value |
---|---|
Default value: | 0 |
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
Request timeout in seconds. Applies to each call to the service.
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 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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
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.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
Request timeout in seconds. Applies to each call to the service.
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 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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
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.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.
Property | Value |
---|---|
Parameter group: | Storage Account Arguments |
The storage service(s) to list rules for. Allowed options are: (b)lob, (f)ile, (q)ueue, (t)able. Can be combined.
Property | Value |
---|---|
Default value: | bfqt |
Request timeout in seconds. Applies to each call to the service.
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 |