Skip to content

Commit

Permalink
Compute Swagger changes to include cross-region Restore Points scenar…
Browse files Browse the repository at this point in the history
…ios (#16682)

* RRP changes in swagger

* Fix conflicts

* fix validations

* Fix instance view

* change instance view

* Fix example

* Fix prettier

* Fix and modify description

* Review comments
  • Loading branch information
sukodava authored Dec 28, 2021
1 parent 3ef81af commit 130dee5
Show file tree
Hide file tree
Showing 24 changed files with 360 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"location": "eastus"
},
"restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
},
Expand All @@ -51,7 +51,7 @@
"location": "eastus"
},
"restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"location": "eastus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"location": "eastus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful",
"provisioningState": "Succeeded",
"restorePoints": [
{
"name": "restorePointName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"location": "westus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"location": "westus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"location": "eastus"
},
"restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
},
Expand All @@ -51,7 +51,7 @@
"location": "eastus"
},
"restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"location": "eastus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"location": "eastus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful",
"provisioningState": "Succeeded",
"restorePoints": [
{
"name": "restorePointName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"location": "westus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"location": "westus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"location": "eastus"
},
"restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
},
Expand All @@ -51,7 +51,7 @@
"location": "eastus"
},
"restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"location": "eastus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"location": "eastus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful",
"provisioningState": "Succeeded",
"restorePoints": [
{
"name": "restorePointName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"location": "westus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"location": "westus"
},
"restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3940,6 +3940,9 @@
"x-ms-examples": {
"Create or update a restore point collection.": {
"$ref": "./examples/compute/CreateOrUpdateARestorePointCollection.json"
},
"Create or update a restore point collection for cross region copy.": {
"$ref": "./examples/compute/CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json"
}
},
"parameters": [
Expand Down Expand Up @@ -4267,6 +4270,9 @@
"x-ms-examples": {
"Create a restore point": {
"$ref": "./examples/compute/CreateARestorePoint.json"
},
"Copy a restore point to a different region": {
"$ref": "./examples/compute/CopyRestorePointBetweenRegions.json"
}
},
"parameters": [
Expand Down Expand Up @@ -4410,13 +4416,30 @@
"type": "string",
"description": "The name of the restore point."
},
{
"name": "$expand",
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation. 'InstanceView' retrieves information about the run-time state of a restore point.",
"enum": [
"instanceView"
],
"x-ms-enum": {
"name": "RestorePointExpandOptions",
"modelAsString": true
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"x-ms-examples": {
"Get a restore point": {
"$ref": "./examples/compute/GetRestorePoint.json"
},
"Get restore point with instance view": {
"$ref": "./examples/compute/GetRestorePointWithInstanceView.json"
}
},
"responses": {
Expand Down Expand Up @@ -9177,6 +9200,56 @@
],
"description": "Restore Point details."
},
"RestorePointInstanceView": {
"type": "object",
"properties": {
"diskRestorePoints": {
"type": "array",
"items": {
"$ref": "#/definitions/DiskRestorePointInstanceView"
},
"description": "The disk restore points information."
},
"statuses": {
"type": "array",
"items": {
"$ref": "#/definitions/InstanceViewStatus"
},
"description": "The resource status information."
}
},
"description": "The instance view of a restore point."
},
"DiskRestorePointInstanceView": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Disk restore point Id."
},
"replicationStatus": {
"type": "object",
"items": {
"$ref": "#/definitions/DiskRestorePointReplicationStatus"
},
"description": "The disk restore point replication status information."
}
},
"description": "The instance view of a disk restore point."
},
"DiskRestorePointReplicationStatus": {
"type": "object",
"properties": {
"status": {
"type": "object",
"items": {
"$ref": "#/definitions/InstanceViewStatus"
},
"description": "The resource status information."
}
},
"description": "The instance view of a disk restore point."
},
"RestorePointProperties": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -9215,6 +9288,15 @@
"type": "string",
"format": "date-time",
"description": "Gets the creation time of the restore point."
},
"sourceRestorePoint": {
"$ref": "#/definitions/ApiEntityReference",
"description": "Resource Id of the source restore point from which a copy needs to be created."
},
"instanceView": {
"$ref": "#/definitions/RestorePointInstanceView",
"readOnly": true,
"description": "The restore point instance view."
}
},
"description": "The restore point properties."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"restorePointCollectionName": "rpcName",
"restorePointName": "rpName",
"api-version": "2021-11-01",
"parameters": {
"properties": {
"sourceRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName/restorePoints/sourceRpName"
}
}
}
},
"responses": {
"201": {
"body": {
"name": "rpName",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName",
"properties": {
"sourceRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName/restorePoints/sourceRpName"
},
"sourceMetadata": {
"vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7",
"hardwareProfile": {
"vmSize": "Standard_B1s"
},
"storageProfile": {
"osDisk": {
"osType": "Windows",
"name": "osDisk123",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk123"
},
"diskRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/osDisk123_22b4bdfe-6c54-4f72-84d8-85d8860f0c57"
}
},
"dataDisks": [
{
"lun": 1,
"name": "dataDisk123",
"caching": "None",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/dataDisk123"
},
"diskRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/dataDisk123_68785190-1acb-4d5e-a8ae-705b45f3dca5"
}
}
]
},
"osProfile": {
"computerName": "computerName",
"adminUsername": "admin",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true
}
},
"location": "westus"
},
"provisioningState": "Creating",
"consistencyMode": "ApplicationConsistent",
"timeCreated": "2021-10-25T23:54:29.2796325+00:00"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"location": "eastus"
},
"restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
},
Expand All @@ -51,7 +51,7 @@
"location": "eastus"
},
"restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c",
"provisioningState": "Successful"
"provisioningState": "Succeeded"
}
}
}
Expand Down
Loading

0 comments on commit 130dee5

Please sign in to comment.