az storage account blob-service-properties cors-rule
Manage the Cross-Origin Resource Sharing (CORS) rules of a storage account's blob service properties.
Commands
Name | Description | Type | Status |
---|---|---|---|
az storage account blob-service-properties cors-rule add |
Add a CORS rule for a storage account. |
Core | GA |
az storage account blob-service-properties cors-rule clear |
Clear all CORS rules for a storage account. |
Core | GA |
az storage account blob-service-properties cors-rule list |
List all CORS rules of a storage account's blob service properties. |
Core | GA |
az storage account blob-service-properties cors-rule add
Add a CORS rule for a storage account.
az storage account blob-service-properties cors-rule add --account-name
--allowed-methods
--allowed-origins
--max-age
[--allowed-headers]
[--exposed-headers]
[--resource-group]
Examples
Add a CORS rule for a storage account
az storage account blob-service-properties cors-rule add --account-name mystorageaccount --resource-group myresourcegroup --allowed-origins "http://*.contoso.com" --allowed-methods PUT GET --max-age 200
Required Parameters
The storage account name.
Space-separated list of HTTP verbs (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 number of seconds that the client/browser should cache a preflight response.
Optional Parameters
Space-separated list of headers allowed to be part of the cross-origin request.
Space-separated list of response headers to expose to CORS clients.
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.
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 account blob-service-properties cors-rule clear
Clear all CORS rules for a storage account.
az storage account blob-service-properties cors-rule clear --account-name
[--resource-group]
Examples
Clear all CORS rules for a storage account
az storage account blob-service-properties cors-rule clear --account-name mystorageaccount --resource-group myresourcegroup
Required Parameters
The storage account name.
Optional Parameters
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.
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 account blob-service-properties cors-rule list
List all CORS rules of a storage account's blob service properties.
az storage account blob-service-properties cors-rule list --account-name
[--resource-group]
Examples
List all CORS rules of a storage account
az storage account blob-service-properties cors-rule list --account-name mystorageaccount --resource-group myresourcegroup
Required Parameters
The storage account name.
Optional Parameters
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.
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.