From 40a5cb8e7bf4bc083f9bcfa4d7cc2528d513a742 Mon Sep 17 00:00:00 2001 From: Ryan Truong Date: Thu, 20 May 2021 11:54:52 -0700 Subject: [PATCH 1/4] Added BeginGetAccess and EndGetAccess for diskRestorePoint --- .../stable/2020-12-01/disk.json | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) 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 17e3b33cf33e..9e08268263fc 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 @@ -1668,6 +1668,100 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess": { + "get": { + "tags": [ + "IncrementalRestorePoints" + ], + "operationId": "DiskRestorePoint_GrantAccess", + "description": "Grants access to a diskRestorePoint.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RestorePointCollectionNameParameter" + }, + { + "$ref": "#/parameters/VmRestorePointNameParameter" + }, + { + "$ref": "#/parameters/DiskRestorePointNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "grantAccessData", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GrantAccessData" + }, + "description": "Access data object supplied in the body of the get disk access operation." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/AccessUri" + } + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess": { + "get": { + "tags": [ + "IncrementalRestorePoints" + ], + "operationId": "DiskRestorePoint_evokeAccess", + "description": "Revokes access to a diskRestorePoint.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RestorePointCollectionNameParameter" + }, + { + "$ref": "#/parameters/VmRestorePointNameParameter" + }, + { + "$ref": "#/parameters/DiskRestorePointNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } } }, "definitions": { From 44505728514098d4cda9161f17a3b15c494710a5 Mon Sep 17 00:00:00 2001 From: Ryan Truong Date: Thu, 20 May 2021 13:16:08 -0700 Subject: [PATCH 2/4] minor fix --- .../Microsoft.Compute/stable/2020-12-01/disk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9e08268263fc..1c0fdf24bcd6 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 @@ -1727,7 +1727,7 @@ "tags": [ "IncrementalRestorePoints" ], - "operationId": "DiskRestorePoint_evokeAccess", + "operationId": "DiskRestorePoint_RevokeAccess", "description": "Revokes access to a diskRestorePoint.", "parameters": [ { From be56130be8907b7d6ab16e03d4d3640e35001af9 Mon Sep 17 00:00:00 2001 From: Ryan Truong Date: Mon, 24 May 2021 11:07:37 -0700 Subject: [PATCH 3/4] added examples --- .../stable/2020-12-01/disk.json | 14 +++++++++-- .../BeginGetAccessDiskRestorePoint.json | 23 +++++++++++++++++++ .../EndGetAccessDiskRestorePoint.json | 15 ++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json 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 1c0fdf24bcd6..ebddf7b68af3 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 @@ -1670,7 +1670,7 @@ } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess": { - "get": { + "post": { "tags": [ "IncrementalRestorePoints" ], @@ -1719,11 +1719,16 @@ "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" + }, + "x-ms-examples": { + "Grants access to a diskRestorePoint.": { + "$ref": "./examples/BeginGetAccessDiskRestorePoint.json" + } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess": { - "get": { + "post": { "tags": [ "IncrementalRestorePoints" ], @@ -1760,6 +1765,11 @@ "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "location" + }, + "x-ms-examples": { + "Revokes access to a diskRestorePoint.": { + "$ref": "./examples/EndGetAccessDiskRestorePoint.json" + } } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json new file mode 100644 index 000000000000..84d5cfc2617b --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "vmRestorePointName": "vmrp", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "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": {} + } +} + \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json new file mode 100644 index 000000000000..0cebcddbe4ca --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "vmRestorePointName": "vmrp", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "api-version": "2020-12-01" + }, + "responses": { + "200": {}, + "202": {} + } +} + \ No newline at end of file From 82c6b5392850e13b730b07c3ac8f34bbdf9a0561 Mon Sep 17 00:00:00 2001 From: Ryan Truong Date: Tue, 25 May 2021 15:04:07 -0700 Subject: [PATCH 4/4] Fixed LintDiff and Prettier errors --- .../stable/2020-12-01/disk.json | 12 ++++++ .../BeginGetAccessDiskRestorePoint.json | 39 +++++++++---------- .../EndGetAccessDiskRestorePoint.json | 25 ++++++------ 3 files changed, 43 insertions(+), 33 deletions(-) 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 ebddf7b68af3..57e581920d07 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 @@ -1714,6 +1714,12 @@ }, "202": { "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-long-running-operation": true, @@ -1760,6 +1766,12 @@ }, "202": { "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-long-running-operation": true, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json index 84d5cfc2617b..39574d184aa7 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json @@ -1,23 +1,22 @@ { - "parameters": { - "subscriptionId": "{subscription-id}", - "resourceGroupName": "myResourceGroup", - "restorePointCollectionName": "rpc", - "vmRestorePointName": "vmrp", - "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", - "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": {} + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "vmRestorePointName": "vmrp", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "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": {} + } } - \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json index 0cebcddbe4ca..2527d728d056 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json @@ -1,15 +1,14 @@ { - "parameters": { - "subscriptionId": "{subscription-id}", - "resourceGroupName": "myResourceGroup", - "restorePointCollectionName": "rpc", - "vmRestorePointName": "vmrp", - "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", - "api-version": "2020-12-01" - }, - "responses": { - "200": {}, - "202": {} - } + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "vmRestorePointName": "vmrp", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "api-version": "2020-12-01" + }, + "responses": { + "200": {}, + "202": {} + } } - \ No newline at end of file