Repository navigation
Expand file tree
/
Copy pathvm-checkdeleted.json
More file actions
128 lines (128 loc) · 2.78 KB
/
Copy pathvm-checkdeleted.json
File metadata and controls
128 lines (128 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"info": {
"_postman_id": "25741be4-a12e-495e-ae92-fca1806206b5",
"name": "6. Check VM Deleted?",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Create AAD",
"event": [
{
"listen": "test",
"script": {
"id": "3c73a939-95d7-430c-a805-55e1aa26f7a7",
"exec": [
"// Retrieve access_token and set PM environment variable for all subsequent request",
"pm.test(\"Successful POST request\", function () {",
" pm.expect(pm.response.code).to.be.oneOf([200]);",
"})",
"var json = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"bearerToken\", json.access_token);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "grant_type",
"value": "client_credentials",
"type": "text"
},
{
"key": "client_id",
"value": "{{clientId}}",
"type": "text"
},
{
"key": "client_secret",
"value": "{{clientSecret}}",
"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": "View Instance",
"event": [
{
"listen": "test",
"script": {
"id": "87fbbc58-8bf4-44d9-933f-fa50e6506fda",
"exec": [
"pm.test(\"Resource been removed\", function () {",
" pm.expect(pm.response.code).to.be.oneOf([404]);",
"})"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"type": "text",
"value": "Bearer {{bearerToken}}"
}
],
"url": {
"raw": "https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroupName}}/providers/Microsoft.Compute/virtualMachines/{{vmName}}/InstanceView?api-version=2017-12-01",
"protocol": "https",
"host": [
"management",
"azure",
"com"
],
"path": [
"subscriptions",
"{{subscriptionId}}",
"resourceGroups",
"{{resourceGroupName}}",
"providers",
"Microsoft.Compute",
"virtualMachines",
"{{vmName}}",
"InstanceView"
],
"query": [
{
"key": "api-version",
"value": "2017-12-01"
}
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}