From 15916268ee79a798b694229e96317203b3c3bf0d Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 1 Jun 2021 20:36:16 -0700 Subject: [PATCH] Added BeginGetAccess and EndGetAccess for diskRestorePoint to 2020-12-01 (#14505) * Added BeginGetAccess and EndGetAccess for diskRestorePoint * minor fix * added examples * Fixed LintDiff and Prettier errors Co-authored-by: Ryan Truong --- .../stable/2020-12-01/disk.json | 116 ++++++++++++++++++ .../BeginGetAccessDiskRestorePoint.json | 22 ++++ .../EndGetAccessDiskRestorePoint.json | 14 +++ 3 files changed, 152 insertions(+) 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 17e3b33cf33e..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 @@ -1668,6 +1668,122 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess": { + "post": { + "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" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "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": { + "post": { + "tags": [ + "IncrementalRestorePoints" + ], + "operationId": "DiskRestorePoint_RevokeAccess", + "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" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "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" + } + } + } } }, "definitions": { 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..39574d184aa7 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/BeginGetAccessDiskRestorePoint.json @@ -0,0 +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": {} + } +} 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..2527d728d056 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/EndGetAccessDiskRestorePoint.json @@ -0,0 +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": {} + } +}