-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconcile ManagedDatabaseRestoreDetails swagger specs #8560
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ad6c500
fixing type in example
xaliciayang 67d5faa
More fixes for LTR MI example
xaliciayang 6c68bd6
making fixes for restore details changes
xaliciayang 541444d
Merge branch 'master' into ayang-ltr
xaliciayang 8f7932a
adding ProxyResource reference'
xaliciayang 0b72fc7
update api version in example file
xaliciayang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...ager/Microsoft.Sql/preview/2019-06-01-preview/examples/ManagedDatabaseRestoreDetails.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "Default-SQL-SouthEastAsia", | ||
"managedInstanceName": "managedInstance", | ||
"databaseName": "testdb", | ||
"restoreDetailsName": "Default", | ||
"api-version": "2019-06-01-preview", | ||
"parameters": { | ||
"tags": { | ||
"tagKey1": "TagValue1" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"properties": { | ||
"status": "Restoring", | ||
"currentRestoringFileName": "full_0", | ||
"percentCompleted": 0.0, | ||
"unrestorableFiles": [], | ||
"numberOfFilesDetected": 26, | ||
"lastUploadedFileName": "log2_3", | ||
"lastUploadedFileTime": "2018-06-15T11:38:33Z" | ||
}, | ||
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/testdb/restoreDetails/current", | ||
"name": "current", | ||
"type": "Microsoft.Sql/managedInstances/databases/restoreDetails" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,62 @@ | |
"application/json" | ||
], | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}": { | ||
"get": { | ||
"tags": [ | ||
"ManagedDatabaseRestoreDetails" | ||
], | ||
"description": "Gets managed database restore details.", | ||
"operationId": "ManagedDatabaseRestoreDetails_Get", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ResourceGroupParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ManagedInstanceNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/DatabaseNameParameter" | ||
}, | ||
{ | ||
"name": "restoreDetailsName", | ||
"in": "path", | ||
"description": "The name of the restore details to retrieve.", | ||
"required": true, | ||
"type": "string", | ||
"enum": [ | ||
"Default" | ||
], | ||
"x-ms-enum": { | ||
"name": "RestoreDetailsName", | ||
"modelAsString": true | ||
} | ||
}, | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully retrieved restore details.", | ||
"schema": { | ||
"$ref": "#/definitions/ManagedDatabaseRestoreDetailsResult" | ||
} | ||
}, | ||
"default": { | ||
"description": "*** Error Responses: ***\n\n * 400 MissingThumbprint - Can not find server certificate.\n\n * 400 PartiallyContainedDatabaseUnsupported - \"Backup for a partially contained database is not supported.\"\n\n * 400 RequiredBackupIsNotLastRestored - Migration cannot be completed because provided backup file name is not the name of the last backup file that is restored.\n\n * 400 IncompatiblePhysicalLayoutTooFewDataFiles - Database backup contains incompatible physical layout. No data files are found in the backup.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineDataFilesExist - Database backup contains incompatible physical layout. Non-online data files exist.\n\n * 400 IncompatiblePhysicalLayoutWrongNumberOfLogFiles - Database backup contains incompatible physical layout. Multiple log files are not supported.\n\n * 400 IncompatiblePhysicalLayoutNonOnlineLogFilesExist - Database backup contains incompatible physical layout. Non-online log files exist.\n\n * 400 IncompatiblePhysicalLayoutTooManyNonDataLogFiles - Database backup contains incompatible physical layout. Too many non-data/log files.\n\n * 400 BackupSetNotFound - \"No backups were found to restore the database. Please contact support to restore the database.\n\n * 400 ExternalBackupAlreadySignaledToComplete - The restore request has already been signaled to complete.\n\n * 400 FullBackupNotFound - Full backup can not be found.\n\n * 400 ExternalBackupRestoreHasNotBeenStarted - The restore request can only be completed once the restore has started.\n\n * 400 RestoreFromStripedBackupsNotEnabled - Restoring from striped backups is not supported.\n\n * 400 BrokenRestorePlanNoFullBackup - The restore plan is broken because there is no full backup.\n\n * 400 BrokenRestorePlanWrongLogBackupLSN - The restore plan is broken because firstLsn of current log backup is not <= lastLsn of next log backup.\n\n * 400 BrokenRestorePlanWrongDiffBackupLSN - The restore plan is broken because firstLsn of diff backup is not >= firstLsn of full backup.\n\n * 400 BrokenRestorePlanGapInLogBackups - The restore plan is broken because firstLsn of current log backup is not equal to lastLsn of prev log backup.\n\n * 400 XtpInitializedDuringRestore - Memory-optimized filegroup must be empty in order to be restored on General Purpose tier of SQL Database Managed Instance.\n\n * 400 ManagedInstanceStorageLimitHit - The managed instance has reached its storage limit.\n\n * 400 ManagedDatabaseNotInRestoringState - Managed database is not in Restoring state." | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"Managed database restore details.": { | ||
"$ref": "./examples/ManagedDatabaseRestoreDetails.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases": { | ||
"get": { | ||
"tags": [ | ||
|
@@ -370,6 +426,95 @@ | |
} | ||
}, | ||
"definitions": { | ||
"ManagedDatabaseRestoreDetailsProperties": { | ||
"description": "The managed database's restore details properties.", | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"description": "Restore status.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"currentRestoringFileName": { | ||
"description": "Current restoring file name.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"lastRestoredFileName": { | ||
"description": "Last restored file name.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"lastRestoredFileTime": { | ||
"format": "date-time", | ||
"description": "Last restored file time.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"percentCompleted": { | ||
"format": "double", | ||
"description": "Percent completed.", | ||
"type": "number", | ||
"readOnly": true | ||
}, | ||
"unrestorableFiles": { | ||
"description": "List of unrestorable files.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"readOnly": true | ||
}, | ||
"numberOfFilesDetected": { | ||
"format": "int64", | ||
"description": "Number of files detected.", | ||
"type": "integer", | ||
"readOnly": true | ||
}, | ||
"lastUploadedFileName": { | ||
"description": "Last uploaded file name.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"lastUploadedFileTime": { | ||
"format": "date-time", | ||
"description": "Last uploaded file time.", | ||
"type": "string", | ||
"readOnly": true | ||
}, | ||
"blockReason": { | ||
"description": "The reason why restore is in Blocked state.", | ||
"type": "string", | ||
"readOnly": true | ||
} | ||
} | ||
}, | ||
"ProxyResource": { | ||
"description": "ARM proxy resource.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/Resource" | ||
} | ||
], | ||
"properties": {} | ||
}, | ||
"ManagedDatabaseRestoreDetailsResult": { | ||
"description": "A managed database restore details.", | ||
"type": "object", | ||
"allOf": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you give me some contexts why we need extra "ProxyResource" definition? |
||
{ | ||
"$ref": "#/definitions/ProxyResource" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/ManagedDatabaseRestoreDetailsProperties", | ||
"description": "Resource properties.", | ||
"x-ms-client-flatten": true | ||
} | ||
} | ||
}, | ||
"ManagedDatabaseListResult": { | ||
"description": "A list of managed databases.", | ||
"type": "object", | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused about this part. Do we really need this list?