共用方式為


Azure ARM template for Cool Storage

Azure Cool Blob Storage has been made available a few weeks ago. With this new type of Azure Storage account, you can store your cool objects at a lower price than typical hot data while still being able to use the same performance in accessing the data when needed.

I wanted to have my Azure Resource Manager template leverage this new storage tier, so I looked up details on the latest version of the REST API and ARM schema. The BlobStorage account with the access level of Hot or Cool is supported if you are using schema version 2016-01-01 (or later when applicable).
Check out the details for the latest API version: https://msdn.microsoft.com/en-us/library/azure/mt163553.aspx, or more in detail the Github commit for this version: https://github.com/Azure/azure-rest-api-specs/blob/master/arm-storage/2016-01-01/swagger/storage.json

Here's an ARM template that creates a Blob storage account of type Cool (or Hot), depending on the parameters your specify:

 

If you're like me I typically use the Azure Resource Explorer a lot to review and update my resources. Unfortunately the Resource Explorer does not by default use the newest schema for Storage so you won't see the Sku, AccessType and Kind properties that are needed. Instead you can use a tool like Fiddler or Postman to get your resource and validate the properties.

HTTP GET for details for your storage account:

https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}?api-version={api-version}

In order to call the Azure REST API you must supply the access token. One way of getting this one for local testing is to use the ARMClient tool (if you're on Windows). It's a command line tool that will copy the token to the clipboard with this call:

ARMClient.exe token [tenant|subscription]

With this info you can now send the request through Postman and add your authorization header.

 

Postman