diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json index 57e581920d07..d88c793f8e2b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json @@ -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 } }, @@ -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" @@ -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" @@ -505,6 +520,11 @@ } } }, + "x-ms-examples": { + "Update a snapshot.": { + "$ref": "./examples/UpdateASnapshot.json" + } + }, "x-ms-long-running-operation": true }, "get": { @@ -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 } }, @@ -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" @@ -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" diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessManagedDisk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessManagedDisk.json new file mode 100644 index 000000000000..d3468610efd4 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessManagedDisk.json @@ -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": {} + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessSnapshot.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessSnapshot.json new file mode 100644 index 000000000000..08eb6fbf141f --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessSnapshot.json @@ -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": {} + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/DeleteAManagedDisk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/DeleteAManagedDisk.json new file mode 100644 index 000000000000..bf0cc769ef69 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/DeleteAManagedDisk.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "diskName": "myDisk", + "api-version": "2020-12-01" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/DeleteASnapshot.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/DeleteASnapshot.json new file mode 100644 index 000000000000..a4531262115f --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/DeleteASnapshot.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "api-version": "2020-12-01" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessManagedDisk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessManagedDisk.json new file mode 100644 index 000000000000..68e1820621d8 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessManagedDisk.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "diskName": "myDisk", + "api-version": "2020-12-01" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessSnapshot.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessSnapshot.json new file mode 100644 index 000000000000..29fe90a3dc5f --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessSnapshot.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "api-version": "2020-12-01" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateASnapshot.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateASnapshot.json new file mode 100644 index 000000000000..411ba6166e8b --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateASnapshot.json @@ -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" + } + } + } +}