Skip to content

Commit

Permalink
Microsoft.DataProtection swagger changes (Azure#13334)
Browse files Browse the repository at this point in the history
* Microsoft.DataProtection swagger changes

* Added example file FindRestorableTimeRanges.json

* Adding 202 GetOperationResult (#1)

* adding 202 GetOperationResult

* added headers

Co-authored-by: Mayank Aggarwal <mayaggar@microsoft.com>

* pr comments fixes

* prettier fixes

* adding fix for x-ms-error-response

* Added missed DppWorkerRequest object in swagger json

* Validation fixes

* changes for request

* removing objectType

Co-authored-by: Mayank Aggarwal <mayankagg9722@gmail.com>
Co-authored-by: Mayank Aggarwal <mayaggar@microsoft.com>
  • Loading branch information
3 people authored Mar 12, 2021
1 parent 542fa4e commit 26128b7
Show file tree
Hide file tree
Showing 3 changed files with 271 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,24 @@
}
],
"responses": {
"202": {
"description": "Accepted",
"headers": {
"Location": {
"description": "The URL of the resource used to check the status of the asynchronous operation.",
"type": "string"
},
"Azure-AsyncOperation": {
"description": "The URL of the resource used to check the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.",
"type": "integer",
"format": "int32"
}
}
},
"200": {
"description": "Contains additional information like job Id",
"schema": {
Expand Down Expand Up @@ -260,7 +278,7 @@
"BackupVaults"
],
"description": "Creates or updates a BackupVault resource belonging to a resource group.",
"operationId": "BackupVaults_Put",
"operationId": "BackupVaults_CreateOrUpdate",
"consumes": [
"application/json"
],
Expand Down Expand Up @@ -720,7 +738,7 @@
"tags": [
"BackupPolicies"
],
"operationId": "BackupPolicies_Put",
"operationId": "BackupPolicies_CreateOrUpdate",
"summary": "Creates or Updates a backup policy belonging to a backup vault",
"produces": [
"application/json"
Expand Down Expand Up @@ -830,7 +848,7 @@
"BackupInstances"
],
"description": "Gets a backup instances belonging to a backup vault",
"operationId": "BackupInstances_GetBackupInstancesInVault",
"operationId": "BackupInstances_List",
"produces": [
"application/json"
],
Expand Down Expand Up @@ -927,7 +945,7 @@
"tags": [
"BackupInstances"
],
"operationId": "BackupInstances_Put",
"operationId": "BackupInstances_CreateOrUpdate",
"produces": [
"application/json"
],
Expand Down Expand Up @@ -1628,6 +1646,65 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstances}/findRestorableTimeRanges": {
"post": {
"tags": [
"FindRestorableTimeRanges"
],
"operationId": "FindRestorableTimeRanges_Post",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/VaultName"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/SubscriptionId"
},
{
"name": "backupInstances",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "parameters",
"in": "body",
"description": "Request body for operation",
"required": true,
"schema": {
"$ref": "#/definitions/AzureBackupFindRestorableTimeRangesRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/AzureBackupFindRestorableTimeRangesResponseResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Find Restorable Time Ranges": {
"$ref": "./examples/BackupInstanceOperations/FindRestorableTimeRanges.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}": {
"get": {
"tags": [
Expand Down Expand Up @@ -1935,6 +2012,82 @@
"type": "object",
"x-ms-discriminator-value": "AzureBackupDiscreteRecoveryPoint"
},
"AzureBackupFindRestorableTimeRangesRequest": {
"description": "List Restore Ranges Request",
"required": [
"sourceDataStoreType",
"startTime",
"endTime"
],
"type": "object",
"properties": {
"sourceDataStoreType": {
"description": "Gets or sets the type of the source data store.",
"enum": [
"OperationalStore",
"VaultStore",
"ArchiveStore"
],
"type": "string",
"x-ms-enum": {
"name": "RestoreSourceDataStoreType",
"modelAsString": true
}
},
"startTime": {
"description": "Start time for the List Restore Ranges request",
"type": "string"
},
"endTime": {
"description": "End time for the List Restore Ranges request",
"type": "string"
}
}
},
"AzureBackupFindRestorableTimeRangesRequestResource": {
"description": "List Restore Ranges Request",
"allOf": [
{
"$ref": "#/definitions/DppWorkerRequest"
}
],
"properties": {
"content": {
"$ref": "#/definitions/AzureBackupFindRestorableTimeRangesRequest",
"description": "AzureBackupFindRestorableTimeRangesRequestResource content"
}
}
},
"AzureBackupFindRestorableTimeRangesResponse": {
"description": "List Restore Ranges Response",
"type": "object",
"properties": {
"restorableTimeRanges": {
"description": "Returns the Restore Ranges available on the Backup Instance.",
"type": "array",
"items": {
"$ref": "#/definitions/RestorableTimeRange"
}
},
"objectType": {
"type": "string"
}
}
},
"AzureBackupFindRestorableTimeRangesResponseResource": {
"description": "List Restore Ranges Response",
"allOf": [
{
"$ref": "#/definitions/DppResource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/AzureBackupFindRestorableTimeRangesResponse",
"description": "AzureBackupFindRestorableTimeRangesResponseResource properties"
}
}
},
"AzureBackupJob": {
"description": "AzureBackup Job Class",
"properties": {
Expand Down Expand Up @@ -2298,6 +2451,26 @@
"type": "object",
"x-ms-discriminator-value": "AzureBackupRestoreWithRehydrationRequest"
},
"AzureBackupRecoveryTimeBasedRestoreRequest": {
"allOf": [
{
"$ref": "#/definitions/AzureBackupRestoreRequest"
}
],
"description": "AzureBackup RecoveryPointTime Based Restore Request",
"properties": {
"recoveryPointTime": {
"description": "The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z.",
"type": "string"
}
},
"required": [
"recoveryPointTime"
],
"title": "AzureBackupRecoveryTimeBasedRestoreRequest",
"type": "object",
"x-ms-discriminator-value": "AzureBackupRecoveryTimeBasedRestoreRequest"
},
"AzureBackupRule": {
"allOf": [
{
Expand Down Expand Up @@ -3227,6 +3400,44 @@
},
"type": "object"
},
"DppWorkerRequest": {
"type": "object",
"properties": {
"subscriptionId": {
"type": "string"
},
"uri": {
"type": "string"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"supportedGroupVersions": {
"type": "array",
"items": {
"type": "string"
}
},
"cultureInfo": {
"type": "string"
},
"parameters": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"httpMethod": {
"type": "string"
}
}
},
"Error": {
"description": "The resource management error response.",
"properties": {
Expand Down Expand Up @@ -3806,6 +4017,26 @@
],
"type": "object"
},
"RestorableTimeRange": {
"required": [
"startTime",
"endTime"
],
"type": "object",
"properties": {
"startTime": {
"description": "Start time for the available restore range",
"type": "string"
},
"endTime": {
"description": "End time for the available restore range",
"type": "string"
},
"objectType": {
"type": "string"
}
}
},
"RetentionTag": {
"description": "Retention tag",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"subscriptionId": "04cf684a-d41f-4550-9f70-7708a3a2283b",
"resourceGroupName": "Blob-Backup",
"vaultName": "ZBlobBackupVaultBVTD3",
"backupInstances": "zblobbackuptestsa58",
"api-version": "2021-02-01-preview",
"parameters": {
"sourceDataStoreType": "OperationalStore",
"startTime": "2020-10-17T23:28:17.6829685Z",
"endTime": "2021-02-24T00:35:17.6829685Z"
}
},
"responses": {
"200": {
"body": {
"id": "zblobbackuptestsa58",
"type": "Microsoft.DataProtection/backupVaults/backupInstances/findRestorableTimeRanges",
"properties": {
"restorableTimeRanges": [
{
"startTime": "2021-02-23T18:33:51.6349708Z",
"endTime": "2021-02-24T00:35:17.0000000Z",
"objectType": "RestorableTimeRange"
}
],
"objectType": "AzureBackupFindRestorableTimeRangesResponse"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
"api-version": "2021-02-01-preview"
},
"responses": {
"200": {
"202": {
"headers": {
"Location": "https://api-dogfood.resources.windows-int.net/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/operationResults/ZTA4YjQ0ZGYtYmNkNS00YTk1LWFjZTMtOTc1MjNmZWIxYWZlO2Y1ODg1MzA3LWJkNjItNDQ2OC05ZjZlLTJkMGM2NjNiNmJmNg==?api-version=2021-02-01-preview",
"Azure-AsyncOperation": "https://api-dogfood.resources.windows-int.net/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZTA4YjQ0ZGYtYmNkNS00YTk1LWFjZTMtOTc1MjNmZWIxYWZlO2Y1ODg1MzA3LWJkNjItNDQ2OC05ZjZlLTJkMGM2NjNiNmJmNg==?api-version=2021-02-01-preview",
"Retry-After": "60"
},
}
},
"200": {
"body": {
"jobId": "c60cb49-63e8-4b21-b9bd-26277b3fdfae"
}
Expand Down

0 comments on commit 26128b7

Please sign in to comment.