Skip to content

Commit

Permalink
Added BeginGetAccess and EndGetAccess for diskRestorePoint to 2020-12…
Browse files Browse the repository at this point in the history
…-01 (Azure#14505)

* Added BeginGetAccess and EndGetAccess for diskRestorePoint

* minor fix

* added examples

* Fixed LintDiff and Prettier errors

Co-authored-by: Ryan Truong <rytruong@microsoft.com>
  • Loading branch information
2 people authored and mkarmark committed Jul 20, 2021
1 parent b580ac6 commit ca9b08d
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
Original file line number Diff line number Diff line change
@@ -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": {}
}
}

0 comments on commit ca9b08d

Please sign in to comment.