Last active
November 21, 2022 12:53
-
-
Save subudear/f5aa031ab9c471166f6699e78a1a1a6f to your computer and use it in GitHub Desktop.
postman collection for creating azure eventhubs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "05e77eff-391e-4804-8ac9-d64969d38575", | |
"name": "Event Hubs Namespace", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Get Access Token For Event Hubs Namespace", | |
"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": [ | |
{ | |
"key": "Content-Type", | |
"value": "application/x-www-form-urlencoded", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "urlencoded", | |
"urlencoded": [ | |
{ | |
"key": "grant_type", | |
"value": "{{grant_type}}", | |
"type": "text" | |
}, | |
{ | |
"key": "client_id", | |
"value": "{{client_id}}", | |
"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 Event Hubs Namespace", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "{{access_token}}", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "PUT", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"name\": \"eventhubusingpostman\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard\"\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"resources\": []\r\n}", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.EventHub/namespaces/{{eventhubNamespace}}?api-version=2021-01-01-preview", | |
"protocol": "https", | |
"host": [ | |
"management", | |
"azure", | |
"com" | |
], | |
"path": [ | |
"subscriptions", | |
"{{subscriptionId}}", | |
"resourceGroups", | |
"{{resourceGroupName}}", | |
"providers", | |
"Microsoft.EventHub", | |
"namespaces", | |
"{{eventhubNamespace}}" | |
], | |
"query": [ | |
{ | |
"key": "api-version", | |
"value": "2021-01-01-preview" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Get Event Hubs Namespace", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "{{access_token}}", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.EventHub/namespaces/{{eventhubNamespace}}?api-version=2021-01-01-preview", | |
"protocol": "https", | |
"host": [ | |
"management", | |
"azure", | |
"com" | |
], | |
"path": [ | |
"subscriptions", | |
"{{subscriptionId}}", | |
"resourceGroups", | |
"{{resourceGroupName}}", | |
"providers", | |
"Microsoft.EventHub", | |
"namespaces", | |
"{{eventhubNamespace}}" | |
], | |
"query": [ | |
{ | |
"key": "api-version", | |
"value": "2021-01-01-preview" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "List Event Hubs Namespaces", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "{{access_token}}", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/providers/Microsoft.EventHub/namespaces?api-version=2021-01-01-preview", | |
"protocol": "https", | |
"host": [ | |
"management", | |
"azure", | |
"com" | |
], | |
"path": [ | |
"subscriptions", | |
"{{subscriptionId}}", | |
"providers", | |
"Microsoft.EventHub", | |
"namespaces" | |
], | |
"query": [ | |
{ | |
"key": "api-version", | |
"value": "2021-01-01-preview" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "List Event Hubs Namespaces By RG", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "{{access_token}}", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "GET", | |
"header": [], | |
"url": { | |
"raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.EventHub/namespaces?api-version=2021-01-01-preview", | |
"protocol": "https", | |
"host": [ | |
"management", | |
"azure", | |
"com" | |
], | |
"path": [ | |
"subscriptions", | |
"{{subscriptionId}}", | |
"resourceGroups", | |
"{{resourceGroupName}}", | |
"providers", | |
"Microsoft.EventHub", | |
"namespaces" | |
], | |
"query": [ | |
{ | |
"key": "api-version", | |
"value": "2021-01-01-preview" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Update Event Hubs Namespace", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "{{access_token}}", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "PATCH", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "{\r\n \"name\": \"eventhubusingpostman\",\r\n \"type\": \"Microsoft.EventHub/namespaces\",\r\n \"location\": \"West US\",\r\n \"tags\": {\"Env\":\"Dev\"},\r\n \"sku\": {\r\n \"name\": \"Basic\"\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"resources\": []\r\n}", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.EventHub/namespaces/{{eventhubNamespace}}?api-version=2021-01-01-preview", | |
"protocol": "https", | |
"host": [ | |
"management", | |
"azure", | |
"com" | |
], | |
"path": [ | |
"subscriptions", | |
"{{subscriptionId}}", | |
"resourceGroups", | |
"{{resourceGroupName}}", | |
"providers", | |
"Microsoft.EventHub", | |
"namespaces", | |
"{{eventhubNamespace}}" | |
], | |
"query": [ | |
{ | |
"key": "api-version", | |
"value": "2021-01-01-preview" | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Delete Event Hubs Namespace", | |
"request": { | |
"auth": { | |
"type": "bearer", | |
"bearer": [ | |
{ | |
"key": "token", | |
"value": "{{access_token}}", | |
"type": "string" | |
} | |
] | |
}, | |
"method": "DELETE", | |
"header": [], | |
"url": { | |
"raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.EventHub/namespaces/{{eventhubNamespace}}?api-version=2021-01-01-preview", | |
"protocol": "https", | |
"host": [ | |
"management", | |
"azure", | |
"com" | |
], | |
"path": [ | |
"subscriptions", | |
"{{subscriptionId}}", | |
"resourceGroups", | |
"{{resourceGroupName}}", | |
"providers", | |
"Microsoft.EventHub", | |
"namespaces", | |
"{{eventhubNamespace}}" | |
], | |
"query": [ | |
{ | |
"key": "api-version", | |
"value": "2021-01-01-preview" | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment