Skip to content

Instantly share code, notes, and snippets.

@subudear
Created September 23, 2021 09:55
Show Gist options
  • Save subudear/792ca44d58a145502e51c5603a9e68a7 to your computer and use it in GitHub Desktop.
Save subudear/792ca44d58a145502e51c5603a9e68a7 to your computer and use it in GitHub Desktop.
postman_collection for azure storage account
{
"info": {
"_postman_id": "bfba77ea-dd5a-40a4-93f8-4a603619df84",
"name": "Azure Storage Account",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get Access Token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = JSON.parse(responseBody);\r",
"postman.setEnvironmentVariable(\"access_token\", data.access_token);"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "client_id",
"value": "{{client_id}}",
"type": "text"
},
{
"key": "grant_type",
"value": "{{grant_type}}",
"type": "text"
},
{
"key": "client_secret",
"value": "{{client_secret}}",
"type": "text"
},
{
"key": "resource",
"value": "{{resource}}",
"type": "text"
}
]
},
"url": {
"raw": "https://login.microsoftonline.com/{{tenantid}}/oauth2/token",
"protocol": "https",
"host": [
"login",
"microsoftonline",
"com"
],
"path": [
"{{tenantid}}",
"oauth2",
"token"
]
}
},
"response": []
},
{
"name": "Create Storage Account",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{access_token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"sku\": {\r\n \"name\": \"Standard_GRS\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \"location\": \"australiaeast\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.Storage/storageAccounts/{{accountName}}?api-version=2018-02-01",
"protocol": "https",
"host": [
"management",
"azure",
"com"
],
"path": [
"subscriptions",
"{{subscriptionId}}",
"resourceGroups",
"{{resourceGroupName}}",
"providers",
"Microsoft.Storage",
"storageAccounts",
"{{accountName}}"
],
"query": [
{
"key": "api-version",
"value": "2018-02-01"
}
]
}
},
"response": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment