Skip to content

Commit a9c6da3

Browse files
authored
Add missing examples for disk.json (#15309)
* Add missing examples for disk.json * Update UpdateASnapshot.json
1 parent 23ff943 commit a9c6da3

File tree

8 files changed

+180
-0
lines changed

8 files changed

+180
-0
lines changed

specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@
251251
"description": "If the disk is deleted, this is an expected error code."
252252
}
253253
},
254+
"x-ms-examples": {
255+
"Delete a managed disk.": {
256+
"$ref": "./examples/DeleteAManagedDisk.json"
257+
}
258+
},
254259
"x-ms-long-running-operation": true
255260
}
256261
},
@@ -364,6 +369,11 @@
364369
"description": "Accepted"
365370
}
366371
},
372+
"x-ms-examples": {
373+
"Get a sas on a managed disk.": {
374+
"$ref": "./examples/BeginGetAccessManagedDisk.json"
375+
}
376+
},
367377
"x-ms-long-running-operation": true,
368378
"x-ms-long-running-operation-options": {
369379
"final-state-via": "location"
@@ -399,6 +409,11 @@
399409
"description": "Accepted"
400410
}
401411
},
412+
"x-ms-examples": {
413+
"Revoke access to a managed disk.": {
414+
"$ref": "./examples/EndGetAccessManagedDisk.json"
415+
}
416+
},
402417
"x-ms-long-running-operation": true,
403418
"x-ms-long-running-operation-options": {
404419
"final-state-via": "location"
@@ -505,6 +520,11 @@
505520
}
506521
}
507522
},
523+
"x-ms-examples": {
524+
"Update a snapshot.": {
525+
"$ref": "./examples/UpdateASnapshot.json"
526+
}
527+
},
508528
"x-ms-long-running-operation": true
509529
},
510530
"get": {
@@ -572,6 +592,11 @@
572592
"description": "If the snapshot is deleted, this is an expected error code."
573593
}
574594
},
595+
"x-ms-examples": {
596+
"Delete a snapshot.": {
597+
"$ref": "./examples/DeleteASnapshot.json"
598+
}
599+
},
575600
"x-ms-long-running-operation": true
576601
}
577602
},
@@ -685,6 +710,11 @@
685710
"description": "Accepted"
686711
}
687712
},
713+
"x-ms-examples": {
714+
"Get a sas on a snapshot.": {
715+
"$ref": "./examples/BeginGetAccessSnapshot.json"
716+
}
717+
},
688718
"x-ms-long-running-operation": true,
689719
"x-ms-long-running-operation-options": {
690720
"final-state-via": "location"
@@ -720,6 +750,11 @@
720750
"description": "Accepted"
721751
}
722752
},
753+
"x-ms-examples": {
754+
"Revoke access to a snapshot.": {
755+
"$ref": "./examples/EndGetAccessSnapshot.json"
756+
}
757+
},
723758
"x-ms-long-running-operation": true,
724759
"x-ms-long-running-operation-options": {
725760
"final-state-via": "location"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"diskName": "myDisk",
6+
"api-version": "2020-12-01",
7+
"grantAccessData": {
8+
"access": "Read",
9+
"durationInSeconds": 300
10+
}
11+
},
12+
"responses": {
13+
"200": {
14+
"body": {
15+
"accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r"
16+
}
17+
},
18+
"202": {}
19+
}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"snapshotName": "mySnapshot",
6+
"api-version": "2020-12-01",
7+
"grantAccessData": {
8+
"access": "Read",
9+
"durationInSeconds": 300
10+
}
11+
},
12+
"responses": {
13+
"200": {
14+
"body": {
15+
"accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r"
16+
}
17+
},
18+
"202": {}
19+
}
20+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"diskName": "myDisk",
6+
"api-version": "2020-12-01"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {},
11+
"204": {}
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"snapshotName": "mySnapshot",
6+
"api-version": "2020-12-01"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {},
11+
"204": {}
12+
}
13+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"diskName": "myDisk",
6+
"api-version": "2020-12-01"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {}
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"snapshotName": "mySnapshot",
6+
"api-version": "2020-12-01"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {}
11+
}
12+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"snapshotName": "mySnapshot",
6+
"api-version": "2020-12-01",
7+
"snapshot": {
8+
"properties": {
9+
"diskSizeGB": 20
10+
},
11+
"tags": {
12+
"department": "Development",
13+
"project": "UpdateSnapshots"
14+
}
15+
}
16+
},
17+
"responses": {
18+
"202": {
19+
"body": {
20+
"properties": {
21+
"creationData": {
22+
"createOption": "Copy",
23+
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
24+
},
25+
"diskSizeGB": 20,
26+
"provisioningState": "Updating"
27+
},
28+
"tags": {
29+
"department": "Development",
30+
"project": "UpdateSnapshots"
31+
},
32+
"location": "West US",
33+
"name": "mySnapshot"
34+
}
35+
},
36+
"200": {
37+
"body": {
38+
"properties": {
39+
"creationData": {
40+
"createOption": "Copy",
41+
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
42+
},
43+
"diskSizeGB": 20,
44+
"provisioningState": "Succeeded"
45+
},
46+
"tags": {
47+
"department": "Development",
48+
"project": "UpdateSnapshots"
49+
},
50+
"location": "West US",
51+
"name": "mySnapshot"
52+
}
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)