Skip to content

Commit

Permalink
Add missing examples for disk.json (#15309)
Browse files Browse the repository at this point in the history
* Add missing examples for disk.json

* Update UpdateASnapshot.json
  • Loading branch information
laurawu19 authored Jul 23, 2021
1 parent 23ff943 commit a9c6da3
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@
"description": "If the disk is deleted, this is an expected error code."
}
},
"x-ms-examples": {
"Delete a managed disk.": {
"$ref": "./examples/DeleteAManagedDisk.json"
}
},
"x-ms-long-running-operation": true
}
},
Expand Down Expand Up @@ -364,6 +369,11 @@
"description": "Accepted"
}
},
"x-ms-examples": {
"Get a sas on a managed disk.": {
"$ref": "./examples/BeginGetAccessManagedDisk.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
Expand Down Expand Up @@ -399,6 +409,11 @@
"description": "Accepted"
}
},
"x-ms-examples": {
"Revoke access to a managed disk.": {
"$ref": "./examples/EndGetAccessManagedDisk.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
Expand Down Expand Up @@ -505,6 +520,11 @@
}
}
},
"x-ms-examples": {
"Update a snapshot.": {
"$ref": "./examples/UpdateASnapshot.json"
}
},
"x-ms-long-running-operation": true
},
"get": {
Expand Down Expand Up @@ -572,6 +592,11 @@
"description": "If the snapshot is deleted, this is an expected error code."
}
},
"x-ms-examples": {
"Delete a snapshot.": {
"$ref": "./examples/DeleteASnapshot.json"
}
},
"x-ms-long-running-operation": true
}
},
Expand Down Expand Up @@ -685,6 +710,11 @@
"description": "Accepted"
}
},
"x-ms-examples": {
"Get a sas on a snapshot.": {
"$ref": "./examples/BeginGetAccessSnapshot.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
Expand Down Expand Up @@ -720,6 +750,11 @@
"description": "Accepted"
}
},
"x-ms-examples": {
"Revoke access to a snapshot.": {
"$ref": "./examples/EndGetAccessSnapshot.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"diskName": "myDisk",
"api-version": "2020-12-01",
"grantAccessData": {
"access": "Read",
"durationInSeconds": 300
}
},
"responses": {
"200": {
"body": {
"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"
}
},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"snapshotName": "mySnapshot",
"api-version": "2020-12-01",
"grantAccessData": {
"access": "Read",
"durationInSeconds": 300
}
},
"responses": {
"200": {
"body": {
"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"
}
},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"diskName": "myDisk",
"api-version": "2020-12-01"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"snapshotName": "mySnapshot",
"api-version": "2020-12-01"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"diskName": "myDisk",
"api-version": "2020-12-01"
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"snapshotName": "mySnapshot",
"api-version": "2020-12-01"
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"snapshotName": "mySnapshot",
"api-version": "2020-12-01",
"snapshot": {
"properties": {
"diskSizeGB": 20
},
"tags": {
"department": "Development",
"project": "UpdateSnapshots"
}
}
},
"responses": {
"202": {
"body": {
"properties": {
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
},
"diskSizeGB": 20,
"provisioningState": "Updating"
},
"tags": {
"department": "Development",
"project": "UpdateSnapshots"
},
"location": "West US",
"name": "mySnapshot"
}
},
"200": {
"body": {
"properties": {
"creationData": {
"createOption": "Copy",
"sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1"
},
"diskSizeGB": 20,
"provisioningState": "Succeeded"
},
"tags": {
"department": "Development",
"project": "UpdateSnapshots"
},
"location": "West US",
"name": "mySnapshot"
}
}
}
}

0 comments on commit a9c6da3

Please sign in to comment.