openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 48.9 kB
JSON
{"openapi":"3.0.0","info":{"description":"The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.","title":"SqlManagementClient","version":"2018-06-01-preview","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabases.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"sql-managedDatabases","x-tags":["Azure","Microsoft"]},"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases":{"get":{"description":"Gets a list of managed databases.","operationId":"ManagedDatabases_ListByInstance","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ManagedInstanceNameParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved the list of databases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabaseListResult"},"examples":{"List databases by managed instances":{"$ref":"#/components/examples/List_databases_by_managed_instances"}}}}},"default":{"description":"*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription."}},"tags":["ManagedDatabases"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}":{"delete":{"description":"Deletes a managed database.","operationId":"ManagedDatabases_Delete","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ManagedInstanceNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully deleted the managed database."},"202":{"description":"Deleting the managed database is in progress."},"204":{"description":"The specified managed database does not exist."},"default":{"description":"*** Error Responses: ***\n\n * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.\n\n * 400 GeoReplicationDatabaseNotPrimary - The operation cannot be performed since the database '{0}' is a replication target.\n\n * 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 DropDisallowedDuringFailover - Can not drop database because a failover operation is in progress on the failover group.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout."}},"tags":["ManagedDatabases"],"x-ms-long-running-operation":true},"get":{"description":"Gets a managed database.","operationId":"ManagedDatabases_Get","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ManagedInstanceNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved the specified managed database.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabase"},"examples":{"Gets a managed database":{"$ref":"#/components/examples/Gets_a_managed_database"}}}}},"default":{"description":"*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found."}},"tags":["ManagedDatabases"]},"patch":{"description":"Updates an existing database.","operationId":"ManagedDatabases_Update","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ManagedInstanceNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabaseUpdate"}}},"description":"The requested database resource state.","required":true},"responses":{"200":{"description":"Successfully updated the database.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabase"},"examples":{"Updates a managed database with maximal properties":{"$ref":"#/components/examples/Updates_a_managed_database_with_maximal_properties"},"Updates a managed database with minimal properties":{"$ref":"#/components/examples/Updates_a_managed_database_with_minimal_properties"}}}}},"202":{"description":"Updating the managed database is in progress."},"default":{"description":"*** Error Responses: ***\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout."}},"tags":["ManagedDatabases"],"x-ms-long-running-operation":true},"put":{"description":"Creates a new database or updates an existing database.","operationId":"ManagedDatabases_CreateOrUpdate","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ManagedInstanceNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabase"}}},"description":"The requested database resource state.","required":true},"responses":{"200":{"description":"Successfully updated the database.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabase"},"examples":{"Creates a new managed database by restoring from an external backup":{"$ref":"#/components/examples/Creates_a_new_managed_database_by_restoring_from_an_external_backup"},"Creates a new managed database from restoring a geo-replicated backup":{"$ref":"#/components/examples/Creates_a_new_managed_database_from_restoring_a_geo-replicated_backup"},"Creates a new managed database using point in time restore":{"$ref":"#/components/examples/Creates_a_new_managed_database_using_point_in_time_restore"},"Creates a new managed database with maximal properties":{"$ref":"#/components/examples/Creates_a_new_managed_database_with_maximal_properties"},"Creates a new managed database with minimal properties":{"$ref":"#/components/examples/Creates_a_new_managed_database_with_minimal_properties"}}}}},"201":{"description":"Successfully created the database.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabase"},"examples":{"Creates a new managed database by restoring from an external backup":{"$ref":"#/components/examples/Creates_a_new_managed_database_by_restoring_from_an_external_backup"},"Creates a new managed database from restoring a geo-replicated backup":{"$ref":"#/components/examples/Creates_a_new_managed_database_from_restoring_a_geo-replicated_backup"},"Creates a new managed database using point in time restore":{"$ref":"#/components/examples/Creates_a_new_managed_database_using_point_in_time_restore"},"Creates a new managed database with maximal properties":{"$ref":"#/components/examples/Creates_a_new_managed_database_with_maximal_properties"},"Creates a new managed database with minimal properties":{"$ref":"#/components/examples/Creates_a_new_managed_database_with_minimal_properties"}}}}},"202":{"description":"Accepted"},"default":{"description":"*** Error Responses: ***\n\n * 400 PitrPointInTimeInvalid - The point in time {0} is not valid. Valid point in time range from {1} days early to now and not before source server creation time.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 InvalidBackupRetentionPeriod - The retention days of {0} is not a valid configuration. Valid backup retention in days must be between {1} and {2}\n\n * 400 ManagedDatabaseNameInUse - Database '{0}' already exists. Choose a different database name.\n\n * 400 NoMoreSpaceInManagedInstance - The managed instance has reached its storage limit. The storage usage for the managed instance cannot exceed (%d) MBs.\n\n * 400 ManagedInstanceUpdateSloInProgress - \"The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again.\"\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.\n\n * 400 PasswordNotComplex - The provided password is not complex enough.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 SubscriptionNotFound - The requested subscription was not found.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.\n\n * 400 InvalidCollation - Collation is not recognized by the server.\n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\n\n * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.\n\n * 400 DatabaseNumberLimitReached - Maximum number of databases for SQL Database Managed Instance reached.\n\n * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 InvalidSourceDatabaseId - Invalid source database identifier.\n\n * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MissingCollation - Collation is required.\n\n * 400 MissingSourceDatabaseId - Missing source database identifier.\n\n * 400 MissingRestorePointInTime - Missing restore point in time\n\n * 400 MissingStorageContainerSasToken - Missing storage container SAS token\n\n * 400 MissingStorageContainerUri - Missing storage container URI\n\n * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 CannotFindServerCertificateWithThumbprint - Cannot find server certificate with thumbprint '{0}'. Please use PowerShell Cmdlet 'Add-AzureRmSqlManagedInstanceTransparentDataEncryptionCertificate' to create the certificate.\n\n * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 404 RestoreSourceDatabaseNotFound - Could not find database '{0}' at time '{1}' that can be restored.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 409 ManagementServiceDatabaseBusy - Database '{0}' is busy with another operation. Please try your operation later.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout."}},"tags":["ManagedDatabases"],"x-ms-long-running-operation":true}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore":{"post":{"description":"Completes the restore operation on a managed database.","operationId":"ManagedDatabases_CompleteRestore","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ManagedInstanceNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteDatabaseRestoreDefinition"}}},"description":"The definition for completing the restore of this managed database.","required":true},"responses":{"200":{"description":"Successfully completed restore request."},"202":{"description":"Completing restore request is in progress."},"default":{"description":"*** Error Responses: ***\n\n * 400 InvalidDatabaseCompleteRestoreRequest - The complete database restore request is invalid\n\n * 400 InvalidDatabaseCompleteRestoreRequestLastBackupName - The last backup name is invalid\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 SourceDatabaseNotFound - The source database does not exist.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.\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."}},"tags":["ManagedDatabases"],"x-ms-long-running-operation":true}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/restoreDetails/{restoreDetailsName}":{"get":{"description":"Gets managed database restore details.","operationId":"ManagedDatabaseRestoreDetails_Get","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ManagedInstanceNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"description":"The name of the restore details to retrieve.","in":"path","name":"restoreDetailsName","required":true,"x-ms-enum":{"modelAsString":true,"name":"RestoreDetailsName"},"schema":{"type":"string","enum":["Default"]},"examples":{"Managed database restore details.":{"value":"Default"}}},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved restore details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabaseRestoreDetailsResult"},"examples":{"Managed database restore details.":{"$ref":"#/components/examples/Managed_database_restore_details."}}}}},"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."}},"tags":["ManagedDatabaseRestoreDetails"]}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"List_databases_by_managed_instances":{"value":{"value":[{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1","location":"southeastasia","name":"testdb1","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","creationDate":"2017-08-04T15:00:17.73Z","defaultSecondaryLocation":"North Europe","status":"Online"},"type":"Microsoft.Sql/managedInstances/databases"},{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2","location":"southeastasia","name":"testdb2","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","creationDate":"2017-08-04T15:00:17.73Z","defaultSecondaryLocation":"North Europe","status":"Online"},"type":"Microsoft.Sql/managedInstances/databases"}]}},"Gets_a_managed_database":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1","location":"southeastasia","name":"testdb1","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","creationDate":"2017-08-04T15:00:17.73Z","defaultSecondaryLocation":"North Europe","status":"Online"},"type":"Microsoft.Sql/managedInstances/databases"}},"Updates_a_managed_database_with_maximal_properties":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb","location":"southeastasia","name":"testdb","tags":{"tagKey1":"TagValue1"}}},"Updates_a_managed_database_with_minimal_properties":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb","location":"southeastasia","name":"testdb","tags":{"tagKey1":"TagValue1"}}},"Creates_a_new_managed_database_by_restoring_from_an_external_backup":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb2","location":"southeastasia","name":"testdb2","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","creationDate":"2017-06-07T04:41:33.937Z","defaultSecondaryLocation":"North Europe","status":"Online"},"tags":{"tagKey1":"TagValue1"},"type":"Microsoft.Sql/servers/databases"}},"Creates_a_new_managed_database_from_restoring_a_geo-replicated_backup":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb_recovered","location":"southeastasia","name":"testdb_recovered","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","creationDate":"2018-11-07T04:41:33.937Z","status":"Online"},"tags":{"tagKey1":"TagValue1"},"type":"Microsoft.Sql/managedInstances/databases"}},"Creates_a_new_managed_database_using_point_in_time_restore":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb2","location":"southeastasia","name":"testdb2","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","creationDate":"2017-06-07T04:41:33.937Z","defaultSecondaryLocation":"North Europe","status":"Online"},"tags":{"tagKey1":"TagValue1"},"type":"Microsoft.Sql/servers/databases"}},"Creates_a_new_managed_database_with_maximal_properties":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb2","location":"southeastasia","name":"testdb2","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","creationDate":"2017-06-07T04:41:33.937Z","defaultSecondaryLocation":"North Europe","status":"Online"},"tags":{"tagKey1":"TagValue1"},"type":"Microsoft.Sql/servers/databases"}},"Creates_a_new_managed_database_with_minimal_properties":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb2","location":"southeastasia","name":"testdb2","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","creationDate":"2017-06-07T04:41:33.937Z","defaultSecondaryLocation":"North Europe","status":"Online"},"type":"Microsoft.Sql/servers/databases"}},"Managed_database_restore_details.":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/testdb/restoreDetails/current","name":"current","properties":{"currentRestoringFileName":"full_0","lastUploadedFileName":"log2_3","lastUploadedFileTime":"2018-06-15T11:38:33Z","numberOfFilesDetected":26,"percentCompleted":0,"status":"Restoring","unrestorableFiles":[]},"type":"Microsoft.Sql/managedInstances/databases/restoreDetails"}}},"parameters":{"ApiVersionParameter":{"description":"The API version to use for the request.","in":"query","name":"api-version","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"List databases by managed instances":{"value":"2015-05-01-preview"},"Delete managed database":{"value":"2017-03-01-preview"},"Gets a managed database":{"value":"2015-05-01-preview"},"Updates a managed database with maximal properties":{"value":"2017-03-01-preview"},"Updates a managed database with minimal properties":{"value":"2017-03-01-preview"},"Creates a new managed database by restoring from an external backup":{"value":"2017-03-01-preview"},"Creates a new managed database from restoring a geo-replicated backup":{"value":"2017-03-01-preview"},"Creates a new managed database using point in time restore":{"value":"2017-03-01-preview"},"Creates a new managed database with maximal properties":{"value":"2017-03-01-preview"},"Creates a new managed database with minimal properties":{"value":"2017-03-01-preview"},"Completes a managed database external backup restore.":{"value":"2018-06-01-preview"},"Managed database restore details.":{"value":"2018-06-01-preview"}}},"BlobAuditingPolicyNameParameter":{"description":"The name of the blob auditing policy.","in":"path","name":"blobAuditingPolicyName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","enum":["default"]}},"DatabaseNameParameter":{"description":"The name of the database.","in":"path","name":"databaseName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Delete managed database":{"value":"testdb"},"Gets a managed database":{"value":"managedDatabase"},"Updates a managed database with maximal properties":{"value":"testdb"},"Updates a managed database with minimal properties":{"value":"testdb"},"Creates a new managed database by restoring from an external backup":{"value":"managedDatabase"},"Creates a new managed database from restoring a geo-replicated backup":{"value":"testdb_recovered"},"Creates a new managed database using point in time restore":{"value":"managedDatabase"},"Creates a new managed database with maximal properties":{"value":"managedDatabase"},"Creates a new managed database with minimal properties":{"value":"managedDatabase"},"Completes a managed database external backup restore.":{"value":"myDatabase"},"Managed database restore details.":{"value":"testdb"}}},"ManagedInstanceNameParameter":{"description":"The name of the managed instance.","in":"path","name":"managedInstanceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List databases by managed instances":{"value":"managedInstance"},"Delete managed database":{"value":"managedInstance"},"Gets a managed database":{"value":"managedInstance"},"Updates a managed database with maximal properties":{"value":"managedInstance"},"Updates a managed database with minimal properties":{"value":"managedInstance"},"Creates a new managed database by restoring from an external backup":{"value":"managedInstance"},"Creates a new managed database from restoring a geo-replicated backup":{"value":"server1"},"Creates a new managed database using point in time restore":{"value":"managedInstance"},"Creates a new managed database with maximal properties":{"value":"managedInstance"},"Creates a new managed database with minimal properties":{"value":"managedInstance"},"Completes a managed database external backup restore.":{"value":"myManagedInstanceName"},"Managed database restore details.":{"value":"managedInstance"}}},"ResourceGroupParameter":{"description":"The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List databases by managed instances":{"value":"Test1"},"Delete managed database":{"value":"Default-SQL-SouthEastAsia"},"Gets a managed database":{"value":"Test1"},"Updates a managed database with maximal properties":{"value":"Default-SQL-SouthEastAsia"},"Updates a managed database with minimal properties":{"value":"Default-SQL-SouthEastAsia"},"Creates a new managed database by restoring from an external backup":{"value":"Default-SQL-SouthEastAsia"},"Creates a new managed database from restoring a geo-replicated backup":{"value":"Default-SQL-SouthEastAsia"},"Creates a new managed database using point in time restore":{"value":"Default-SQL-SouthEastAsia"},"Creates a new managed database with maximal properties":{"value":"Default-SQL-SouthEastAsia"},"Creates a new managed database with minimal properties":{"value":"Default-SQL-SouthEastAsia"},"Completes a managed database external backup restore.":{"value":"myRG"},"Managed database restore details.":{"value":"Default-SQL-SouthEastAsia"}}},"ServerNameParameter":{"description":"The name of the server.","in":"path","name":"serverName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"SqlVirtualMachineContainerNameParameter":{"description":"The name of the SqlVirtualMachineContainer.","in":"path","name":"sqlVirtualMachineContainerName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"SqlVirtualMachineInstanceNameParameter":{"description":"The name of the SqlVirtualMachineInstance.","in":"path","name":"sqlVirtualMachineInstanceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"SubscriptionIdParameter":{"description":"The subscription ID that identifies an Azure subscription.","in":"path","name":"subscriptionId","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"List databases by managed instances":{"value":"00000000-1111-2222-3333-444444444444"},"Delete managed database":{"value":"00000000-1111-2222-3333-444444444444"},"Gets a managed database":{"value":"00000000-1111-2222-3333-444444444444"},"Updates a managed database with maximal properties":{"value":"00000000-1111-2222-3333-444444444444"},"Updates a managed database with minimal properties":{"value":"00000000-1111-2222-3333-444444444444"},"Creates a new managed database by restoring from an external backup":{"value":"00000000-1111-2222-3333-444444444444"},"Creates a new managed database from restoring a geo-replicated backup":{"value":"00000000-1111-2222-3333-444444444444"},"Creates a new managed database using point in time restore":{"value":"00000000-1111-2222-3333-444444444444"},"Creates a new managed database with maximal properties":{"value":"00000000-1111-2222-3333-444444444444"},"Creates a new managed database with minimal properties":{"value":"00000000-1111-2222-3333-444444444444"},"Completes a managed database external backup restore.":{"value":"00000000-1111-2222-3333-444444444444"},"Managed database restore details.":{"value":"00000000-1111-2222-3333-444444444444"}}},"VirtualClusterNameParameter":{"description":"The name of the virtual cluster.","in":"path","name":"virtualClusterName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"CompleteDatabaseRestoreDefinition":{"description":"Contains the information necessary to perform a complete database restore operation.","properties":{"lastBackupName":{"description":"The last backup name to apply","type":"string"}},"required":["lastBackupName"],"type":"object"},"ManagedDatabase":{"allOf":[{"$ref":"#/components/schemas/TrackedResource"}],"description":"A managed database resource.","properties":{"properties":{"$ref":"#/components/schemas/ManagedDatabaseProperties"}},"required":["location"],"type":"object"},"ManagedDatabaseListResult":{"description":"A list of managed databases.","properties":{"nextLink":{"description":"Link to retrieve next page of results.","readOnly":true,"type":"string"},"value":{"description":"Array of results.","items":{"$ref":"#/components/schemas/ManagedDatabase"},"readOnly":true,"type":"array"}},"type":"object"},"ManagedDatabaseProperties":{"description":"The managed database's properties.","properties":{"catalogCollation":{"description":"Collation of the metadata catalog.","enum":["DATABASE_DEFAULT","SQL_Latin1_General_CP1_CI_AS"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"CatalogCollationType"},"x-ms-mutability":["read","create"]},"collation":{"description":"Collation of the managed database.","type":"string","x-ms-mutability":["read","create"]},"createMode":{"description":"Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore.","enum":["Default","RestoreExternalBackup","PointInTimeRestore","Recovery"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"ManagedDatabaseCreateMode"},"x-ms-mutability":["create"]},"creationDate":{"description":"Creation date of the database.","format":"date-time","readOnly":true,"type":"string"},"defaultSecondaryLocation":{"description":"Geo paired region.","readOnly":true,"type":"string"},"earliestRestorePoint":{"description":"Earliest restore point in time for point in time restore.","format":"date-time","readOnly":true,"type":"string"},"failoverGroupId":{"description":"Instance Failover Group resource identifier that this managed database belongs to.","readOnly":true,"type":"string"},"recoverableDatabaseId":{"description":"The resource identifier of the recoverable database associated with create operation of this database.","type":"string","x-ms-mutability":["create"]},"restorableDroppedDatabaseId":{"description":"The restorable dropped database resource id to restore when creating this database.","type":"string","x-ms-mutability":["create"]},"restorePointInTime":{"description":"Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.","format":"date-time","type":"string","x-ms-mutability":["create"]},"sourceDatabaseId":{"description":"The resource identifier of the source database associated with create operation of this database.","type":"string","x-ms-mutability":["create"]},"status":{"description":"Status of the database.","enum":["Online","Offline","Shutdown","Creating","Inaccessible","Restoring","Updating"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":true,"name":"ManagedDatabaseStatus"}},"storageContainerSasToken":{"description":"Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.","type":"string","x-ms-mutability":["create"]},"storageContainerUri":{"description":"Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.","type":"string","x-ms-mutability":["create"]}},"type":"object"},"ManagedDatabaseRestoreDetailsProperties":{"description":"The managed database's restore details properties.","properties":{"blockReason":{"description":"The reason why restore is in Blocked state.","readOnly":true,"type":"string"},"currentRestoringFileName":{"description":"Current restoring file name.","readOnly":true,"type":"string"},"lastRestoredFileName":{"description":"Last restored file name.","readOnly":true,"type":"string"},"lastRestoredFileTime":{"description":"Last restored file time.","format":"date-time","readOnly":true,"type":"string"},"lastUploadedFileName":{"description":"Last uploaded file name.","readOnly":true,"type":"string"},"lastUploadedFileTime":{"description":"Last uploaded file time.","format":"date-time","readOnly":true,"type":"string"},"numberOfFilesDetected":{"description":"Number of files detected.","format":"int64","readOnly":true,"type":"integer"},"percentCompleted":{"description":"Percent completed.","format":"double","readOnly":true,"type":"number"},"status":{"description":"Restore status.","readOnly":true,"type":"string"},"unrestorableFiles":{"description":"List of unrestorable files.","items":{"type":"string"},"readOnly":true,"type":"array"}},"type":"object"},"ManagedDatabaseRestoreDetailsResult":{"allOf":[{"$ref":"#/components/schemas/ProxyResource"}],"description":"A managed database restore details.","properties":{"properties":{"$ref":"#/components/schemas/ManagedDatabaseRestoreDetailsProperties"}},"type":"object"},"ManagedDatabaseUpdate":{"description":"An managed database update.","properties":{"properties":{"$ref":"#/components/schemas/ManagedDatabaseProperties"},"tags":{"additionalProperties":{"type":"string"},"description":"Resource tags.","type":"object"}},"type":"object"},"ProxyResource":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"ARM proxy resource.","properties":{},"type":"object"},"Resource":{"description":"ARM resource.","properties":{"id":{"description":"Resource ID.","readOnly":true,"type":"string"},"name":{"description":"Resource name.","readOnly":true,"type":"string"},"type":{"description":"Resource type.","readOnly":true,"type":"string"}},"type":"object","x-ms-azure-resource":true},"TrackedResource":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"ARM tracked top level resource.","properties":{"location":{"description":"Resource location.","type":"string","x-ms-mutability":["read","create"]},"tags":{"additionalProperties":{"type":"string"},"description":"Resource tags.","type":"object"}},"required":["location"],"type":"object"}}}}