swagger: "2.0"
schemes:
  - https
host: management.azure.com
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: 2017-10-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/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/2017-10-01-preview/databases.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: sql-databases
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
parameters:
  ApiVersionParameter:
    description: The API version to use for the request.
    in: query
    name: api-version
    required: true
    type: string
    x-ms-parameter-location: client
  BlobAuditingPolicyNameParameter:
    description: The name of the blob auditing policy.
    enum:
      - default
    in: path
    name: blobAuditingPolicyName
    required: true
    type: string
    x-ms-parameter-location: method
  DatabaseNameParameter:
    description: The name of the database.
    in: path
    name: databaseName
    required: true
    type: string
    x-ms-parameter-location: method
  ManagedInstanceNameParameter:
    description: The name of the managed instance.
    in: path
    name: managedInstanceName
    required: true
    type: string
    x-ms-parameter-location: method
  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
    type: string
    x-ms-parameter-location: method
  ServerNameParameter:
    description: The name of the server.
    in: path
    name: serverName
    required: true
    type: string
    x-ms-parameter-location: method
  SqlVirtualMachineContainerNameParameter:
    description: The name of the SqlVirtualMachineContainer.
    in: path
    name: sqlVirtualMachineContainerName
    required: true
    type: string
    x-ms-parameter-location: method
  SqlVirtualMachineInstanceNameParameter:
    description: The name of the SqlVirtualMachineInstance.
    in: path
    name: sqlVirtualMachineInstanceName
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: The subscription ID that identifies an Azure subscription.
    in: path
    name: subscriptionId
    required: true
    type: string
    x-ms-parameter-location: client
  VirtualClusterNameParameter:
    description: The name of the virtual cluster.
    in: path
    name: virtualClusterName
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases":
    get:
      description: Gets a list of databases.
      operationId: Databases_ListByServer
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved the list of databases.
          schema:
            $ref: "#/definitions/DatabaseListResult"
        default:
          description: |-
            *** Error Responses: ***

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.
      tags:
        - Databases
      x-ms-examples:
        Gets a list of databases.:
          parameters:
            api-version: 2017-10-01-preview
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                    kind: v12.0,user,vcore
                    location: southeastasia
                    name: testdb
                    properties:
                      catalogCollation: SQL_Latin1_General_CP1_CI_AS
                      collation: SQL_Latin1_General_CP1_CI_AS
                      creationDate: 2017-06-07T04:41:33.937Z
                      currentServiceObjectiveName: BC_Gen4_2
                      databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                      defaultSecondaryLocation: North Europe
                      licenseType: LicenseIncluded
                      maxLogSizeBytes: 104857600
                      maxSizeBytes: 268435456000
                      readReplicaCount: 1
                      readScale: Enabled
                      status: Online
                    sku:
                      capacity: 2
                      name: BC_Gen4
                      tier: BusinessCritical
                    type: Microsoft.Sql/servers/databases
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/master
                    kind: v12.0,system
                    location: southeastasia
                    name: master
                    properties:
                      catalogCollation: SQL_Latin1_General_CP1_CI_AS
                      collation: SQL_Latin1_General_CP1_CI_AS
                      creationDate: 2017-06-07T04:23:42.537Z
                      currentServiceObjectiveName: System0
                      databaseId: e6be351f-2cc9-4604-9e52-b0b28b2710b0
                      defaultSecondaryLocation: North Europe
                      maxSizeBytes: 32212254720
                      status: Online
                    sku:
                      name: System0
                      tier: System
                    type: Microsoft.Sql/servers/databases
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}":
    delete:
      description: Deletes the database.
      operationId: Databases_Delete
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/DatabaseNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully deleted the database.
        "202":
          description: Deleting the database is in progress.
        "204":
          description: The specified database does not exist.
        default:
          description: |-
            *** Error Responses: ***

             * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.

             * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.

             * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.

             * 404 OperationIdNotFound - The operation with Id does not exist.

             * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 409 OperationCancelled - The operation has been cancelled by user.

             * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

             * 409 ServerDisabled - Server is disabled.

             * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

             * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.
      tags:
        - Databases
      x-ms-examples:
        Deletes a database.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdb
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets a database.
      operationId: Databases_Get
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/DatabaseNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved the specified database.
          schema:
            $ref: "#/definitions/Database"
        default:
          description: |-
            *** Error Responses: ***

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 404 ResourceNotFound - The requested resource was not found.
      tags:
        - Databases
      x-ms-examples:
        Gets a database.:
          parameters:
            api-version: 2017-10-01-preview
            databaseName: testdb
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: BC_Gen4_2
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxLogSizeBytes: 104857600
                  maxSizeBytes: 268435456000
                  readReplicaCount: 1
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 2
                  name: BC_Gen4
                  tier: BusinessCritical
                type: Microsoft.Sql/servers/databases
    patch:
      description: Updates an existing database.
      operationId: Databases_Update
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/DatabaseNameParameter"
        - description: The requested database resource state.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/DatabaseUpdate"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully updated the database.
          schema:
            $ref: "#/definitions/Database"
        "202":
          description: Updating the database is in progress.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.

             * 400 InvalidResourceId - Invalid resource identifier.

             * 400 InvalidSourceDatabaseId - Invalid source database identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 MissingCollation - Collation is required.

             * 400 MissingMaxSizeBytes - MaxSizeBytes is required.

             * 400 MissingSkuName - Sku name is required.

             * 400 MissingSourceDatabaseId - Missing source database identifier.

             * 400 InvalidSkuName - Invalid SKU name.

             * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.

             * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.

             * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.

             * 400 DatabaseNameDoesNotMatchSourceDatabaseId - The database name specified doesn’t match the database name in sourceDatabaseId.

             * 400 ElasticPoolNotSupportedForExternalBackupRestore - Elastic pool is not supported for external backup restore

             * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.

             * 400 InvalidRecoveryServicesRecoveryPointId - Invalid recovery services recovery point identifier.

             * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid

             * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier

             * 400 MissingRecoverableDatabaseId - Missing recoverable database identifier.

             * 400 MissingRecoveryServicesRecoveryPointId - Missing recovery services recovery point Id.

             * 400 MissingRestorableDroppedDatabaseId - Missing restorableDroppedDatabaseId

             * 400 MissingRestorePointInTime - Missing restore point in time

             * 400 MissingSourceDatabaseDeletionDate - Missing source database deletion date

             * 400 MissingStorageContainerSasToken - Missing storage container SAS token

             * 400 MissingStorageContainerUri - Missing storage container URI

             * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode

             * 400 InvalidCollation - Collation is not recognized by the server.

             * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes

             * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.

             * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.

             * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.

             * 400 SourceDatabaseNotFound - The source database does not exist.

             * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.

             * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.

             * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.

             * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.

             * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.

             * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.

             * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.

             * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.

             * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.

             * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.

             * 400 TokenTooLong - The provided token is too long.

             * 400 InvalidSku - The user specified an invalid sku.

             * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.

             * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.

             * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.

             * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.

             * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.

             * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.

             * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.

             * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.

             * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.

             * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.

             * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.

             * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.

             * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.

             * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.

             * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.

             * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.

             * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.

             * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.

             * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.

             * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.

             * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.

             * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.

             * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.

             * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.

             * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.

             * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.

             * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.

             * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.

             * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.

             * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.

             * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 and Key Type is RSA.

             * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.

             * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.

             * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.

             * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).

             * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.

             * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.

             * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.

             * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.

             * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.

             * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.

             * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.

             * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.

             * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.

             * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.

             * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.

             * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.

             * 400 ServerNotFound - The requested server was not found.

             * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.

             * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.

             * 400 SubscriptionNotFound - The requested subscription was not found.

             * 400 InvalidServerName - Invalid server name specified.

             * 401 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.

             * 401 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.

             * 401 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. 

             * 401 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.

             * 401 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.

             * 404 OperationIdNotFound - The operation with Id does not exist.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

             * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.

             * 409 OperationCancelled - The operation has been cancelled by user.

             * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

             * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.

             * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.

             * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.

             * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.

             * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.

             * 409 SubscriptionDisabled - Subscription is disabled.

             * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.

             * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.

             * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.

             * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.

             * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.

             * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.

             * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.

             * 409 ServerKeyDoesNotExists - The server key does not exist.

             * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.

             * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.

             * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.

             * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.

             * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool

             * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.

             * 409 ServerDisabled - Server is disabled.

             * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.

             * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

             * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

             * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows

             * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed

             * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .

             * 503 DatabaseUnavailable - The operation failed because the database is unavailable.

             * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 504 RequestTimeout - Service request exceeded the allowed timeout.
      tags:
        - Databases
      x-ms-examples:
        Updates a database.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdb
            parameters:
              properties:
                collation: SQL_Latin1_General_CP1_CI_AS
                maxSizeBytes: 1073741824
              sku:
                name: S1
                tier: Standard
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S1
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 1073741824
                  status: Online
                sku:
                  name: S1
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
      x-ms-long-running-operation: true
    put:
      description: Creates a new database or updates an existing database.
      operationId: Databases_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/DatabaseNameParameter"
        - description: The requested database resource state.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/Database"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully updated the database.
          schema:
            $ref: "#/definitions/Database"
        "201":
          description: Successfully created the database.
          schema:
            $ref: "#/definitions/Database"
        "202":
          description: Creating or updating the database is in progress.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidDatabaseCreateOrUpdateRequest - The request body for the create or update database operation is invalid.

             * 400 InvalidResourceId - Invalid resource identifier.

             * 400 InvalidSourceDatabaseId - Invalid source database identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 MissingCollation - Collation is required.

             * 400 MissingMaxSizeBytes - MaxSizeBytes is required.

             * 400 MissingSkuName - Sku name is required.

             * 400 MissingSourceDatabaseId - Missing source database identifier.

             * 400 InvalidSkuName - Invalid SKU name.

             * 400 MismatchedSkuNameAndCapacity - Mismatch between SKU name and capacity.

             * 400 MismatchedSkuNameAndTier - Mismatch between SKU name and tier.

             * 400 MismatchedSkuNameAndFamily - Mismatch between SKU name and family.

             * 400 DatabaseNameDoesNotMatchSourceDatabaseId - The database name specified doesn’t match the database name in sourceDatabaseId.

             * 400 ElasticPoolNotSupportedForExternalBackupRestore - Elastic pool is not supported for external backup restore

             * 400 InvalidRecoverableDatabaseId - Invalid recoverable database identifier.

             * 400 InvalidRecoveryServicesRecoveryPointId - Invalid recovery services recovery point identifier.

             * 400 InvalidRestorableDroppedDatabaseDeletionDate - The restorable dropped database deletion date given is invalid

             * 400 InvalidRestorableDroppedDatabaseId - Invalid restorable dropped database identifier

             * 400 MissingRecoverableDatabaseId - Missing recoverable database identifier.

             * 400 MissingRecoveryServicesRecoveryPointId - Missing recovery services recovery point Id.

             * 400 MissingRestorableDroppedDatabaseId - Missing restorableDroppedDatabaseId

             * 400 MissingRestorePointInTime - Missing restore point in time

             * 400 MissingSourceDatabaseDeletionDate - Missing source database deletion date

             * 400 MissingStorageContainerSasToken - Missing storage container SAS token

             * 400 MissingStorageContainerUri - Missing storage container URI

             * 400 RestorableDroppedDatabaseIdGivenForRestoreWithSourceDatabaseId - Cannot specify restorableDroppedDatabaseId when sourceDatabaseId is already given in restore create mode

             * 400 InvalidCollation - Collation is not recognized by the server.

             * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes

             * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.

             * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.

             * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.

             * 400 SourceDatabaseNotFound - The source database does not exist.

             * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.

             * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.

             * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.

             * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.

             * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.

             * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.

             * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.

             * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.

             * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.

             * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.

             * 400 TokenTooLong - The provided token is too long.

             * 400 InvalidSku - The user specified an invalid sku.

             * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.

             * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.

             * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.

             * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.

             * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.

             * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.

             * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.

             * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.

             * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.

             * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.

             * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.

             * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.

             * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.

             * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.

             * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.

             * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.

             * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.

             * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.

             * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.

             * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.

             * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.

             * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.

             * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.

             * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.

             * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.

             * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.

             * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.

             * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.

             * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.

             * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.

             * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 and Key Type is RSA.

             * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.

             * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.

             * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.

             * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).

             * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.

             * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.

             * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.

             * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.

             * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.

             * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.

             * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.

             * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.

             * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.

             * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.

             * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.

             * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.

             * 400 ServerNotFound - The requested server was not found.

             * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.

             * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.

             * 400 SubscriptionNotFound - The requested subscription was not found.

             * 400 InvalidServerName - Invalid server name specified.

             * 401 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.

             * 401 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.

             * 401 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. 

             * 401 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.

             * 401 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.

             * 404 OperationIdNotFound - The operation with Id does not exist.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

             * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.

             * 409 OperationCancelled - The operation has been cancelled by user.

             * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

             * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.

             * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.

             * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.

             * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.

             * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.

             * 409 SubscriptionDisabled - Subscription is disabled.

             * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.

             * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.

             * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.

             * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.

             * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.

             * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.

             * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.

             * 409 ServerKeyDoesNotExists - The server key does not exist.

             * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.

             * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.

             * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.

             * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.

             * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool

             * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.

             * 409 ServerDisabled - Server is disabled.

             * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.

             * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

             * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

             * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows

             * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed

             * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .

             * 503 DatabaseUnavailable - The operation failed because the database is unavailable.

             * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 504 RequestTimeout - Service request exceeded the allowed timeout.
      tags:
        - Databases
      x-ms-examples:
        Creates a Hyperscale database and specifies the number of readonly replicas.:
          parameters:
            api-version: 2017-10-01-preview
            databaseName: testdb
            parameters:
              location: southeastasia
              properties:
                readReplicaCount: 3
              sku:
                capacity: 1
                name: HS_Gen4
                tier: Hyperscale
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user,vcore,hyperscale
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: HS_Gen4_1
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxSizeBytes: -1
                  readReplicaCount: 3
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 1
                  family: Gen4
                  name: HS_Gen4
                  tier: Hyperscale
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user,vcore,hyperscale
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: HS_Gen4_1
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxSizeBytes: -1
                  readReplicaCount: 3
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 1
                  family: Gen4
                  name: HS_Gen4
                  tier: Hyperscale
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a VCore database by specifying service objective name.:
          parameters:
            api-version: 2017-10-01-preview
            databaseName: testdb
            parameters:
              location: southeastasia
              sku:
                capacity: 2
                family: Gen4
                name: BC
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: BC_Gen4_2
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxLogSizeBytes: 104857600
                  maxSizeBytes: 1073741824
                  readReplicaCount: 1
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 2
                  family: Gen4
                  name: BC_Gen4
                  tier: BusinessCritical
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: BC_Gen4_2
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxLogSizeBytes: 104857600
                  maxSizeBytes: 1073741824
                  readReplicaCount: 1
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 2
                  family: Gen4
                  name: BC_Gen4
                  tier: BusinessCritical
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a VCore database by specifying sku name and capacity.:
          parameters:
            api-version: 2017-10-01-preview
            databaseName: testdb
            parameters:
              location: southeastasia
              sku:
                capacity: 2
                name: BC_Gen4
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: BC_Gen4_2
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxLogSizeBytes: 104857600
                  maxSizeBytes: 1073741824
                  readReplicaCount: 1
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 2
                  family: Gen4
                  name: BC_Gen4
                  tier: BusinessCritical
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: BC_Gen4_2
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxLogSizeBytes: 104857600
                  maxSizeBytes: 1073741824
                  readReplicaCount: 1
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 2
                  family: Gen4
                  name: BC_Gen4
                  tier: BusinessCritical
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a VCore database by specifying sku name.:
          parameters:
            api-version: 2017-10-01-preview
            databaseName: testdb
            parameters:
              location: southeastasia
              sku:
                name: BC_Gen4_2
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: BC_Gen4_2
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxLogSizeBytes: 104857600
                  maxSizeBytes: 1073741824
                  readReplicaCount: 1
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 2
                  family: Gen4
                  name: BC_Gen4
                  tier: BusinessCritical
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: BC_Gen4_2
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  licenseType: LicenseIncluded
                  maxLogSizeBytes: 104857600
                  maxSizeBytes: 1073741824
                  readReplicaCount: 1
                  readScale: Enabled
                  status: Online
                sku:
                  capacity: 2
                  family: Gen4
                  name: BC_Gen4
                  tier: BusinessCritical
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a data warehouse by specifying service objective name.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdw
            parameters:
              location: westus
              sku:
                name: DW1000c
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw
                kind: v12.0,user,datawarehouse,gen2
                location: westus
                name: testdw
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2019-04-24T06:46:14.99Z
                  currentServiceObjectiveName: DW1000c
                  currentSku:
                    capacity: 9000
                    name: DataWarehouse
                    tier: DataWarehouse
                  databaseId: 188784c9-d602-4684-86cf-e67b6f03551a
                  defaultSecondaryLocation: eastus
                  maxSizeBytes: 263882790666240
                  readScale: Disabled
                  requestedServiceObjectiveName: DW1000c
                  status: Online
                sku:
                  capacity: 9000
                  name: DataWarehouse
                  tier: DataWarehouse
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw
                kind: v12.0,user,datawarehouse,gen2
                location: westus
                name: testdw
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2019-04-24T06:46:14.99Z
                  currentServiceObjectiveName: DW1000c
                  currentSku:
                    capacity: 9000
                    name: DataWarehouse
                    tier: DataWarehouse
                  databaseId: 188784c9-d602-4684-86cf-e67b6f03551a
                  defaultSecondaryLocation: eastus
                  maxSizeBytes: 263882790666240
                  readScale: Disabled
                  requestedServiceObjectiveName: DW1000c
                  status: Online
                sku:
                  capacity: 9000
                  name: DataWarehouse
                  tier: DataWarehouse
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a database as a copy.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: dbcopy
            parameters:
              location: southeastasia
              properties:
                createMode: Copy
                sourceDatabaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
              sku:
                name: S0
                tier: Standard
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy
                kind: v12.0,user
                location: southeastasia
                name: dbcopy
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy
                kind: v12.0,user
                location: southeastasia
                name: dbcopy
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a database as an on-line secondary.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdb
            parameters:
              location: southeastasia
              properties:
                createMode: Secondary
                sourceDatabaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb
              sku:
                name: S0
                tier: Standard
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a database from PointInTimeRestore.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: dbpitr
            parameters:
              location: southeastasia
              properties:
                createMode: PointInTimeRestore
                restorePointInTime: 2017-07-14T05:35:31.503Z
                sourceDatabaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
              sku:
                name: S0
                tier: Standard
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr
                kind: v12.0,user
                location: southeastasia
                name: dbpitr
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr
                kind: v12.0,user
                location: southeastasia
                name: dbpitr
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a database from recoverableDatabaseId.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: dbrestore
            parameters:
              location: southeastasia
              properties:
                createMode: Restore
                restorableDroppedDatabaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb2,131444841315030000
              sku:
                name: S0
                tier: Standard
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbrestore
                kind: v12.0,user
                location: southeastasia
                name: dbrestore
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbrestore
                kind: v12.0,user
                location: southeastasia
                name: dbrestore
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a database from restore with database deletion time.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: dbrestore
            parameters:
              location: southeastasia
              properties:
                createMode: Restore
                sourceDatabaseDeletionDate: 2017-07-14T06:41:06.613Z
                sourceDatabaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
              sku:
                name: S0
                tier: Standard
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbrestore
                kind: v12.0,user
                location: southeastasia
                name: dbrestore
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbrestore
                kind: v12.0,user
                location: southeastasia
                name: dbrestore
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a database from restore with restorableDroppedDatabaseId.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: dbcopy
            parameters:
              location: southeastasia
              properties:
                createMode: Copy
                sourceDatabaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
              sku:
                name: S0
                tier: Standard
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy
                kind: v12.0,user
                location: southeastasia
                name: dbcopy
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy
                kind: v12.0,user
                location: southeastasia
                name: dbcopy
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a database with default mode.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdb
            parameters:
              location: southeastasia
              properties:
                collation: SQL_Latin1_General_CP1_CI_AS
                createMode: Default
                maxSizeBytes: 1073741824
              sku:
                name: S0
                tier: Standard
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 1073741824
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 1073741824
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
        Creates a database with minimum number of parameters.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdb
            parameters:
              location: southeastasia
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb
                kind: v12.0,user
                location: southeastasia
                name: testdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-06-07T04:41:33.937Z
                  currentServiceObjectiveName: S0
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 268435456000
                  status: Online
                sku:
                  name: S0
                  tier: Standard
                type: Microsoft.Sql/servers/databases
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move":
    post:
      description: Renames a database.
      operationId: Databases_Rename
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database to rename.
          in: path
          name: databaseName
          required: true
          type: string
        - description: The resource move definition for renaming this database.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ResourceMoveDefinition"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully renamed the database.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidResourceMoveRequest - The resource move request is invalid.

             * 400 InvalidMoveTargetResourceId - The target resource identifier in move request is invalid.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.

             * 400 DatabaseNameInUse - Database already exists. Choose a different database name.

             * 400 TokenTooLong - The provided token is too long.

             * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.

             * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.

             * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.

             * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.

             * 404 SourceDatabaseNotFound - The source database does not exist.

             * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.
      tags:
        - Databases
      x-ms-examples:
        Renames a database.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdb
            parameters:
              id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/newtestdb
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200": {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause":
    post:
      description: Pauses a database.
      operationId: Databases_Pause
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database to be paused.
          in: path
          name: databaseName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully paused the database.
          schema:
            $ref: "#/definitions/Database"
        "202":
          description: Pausing the database is in progress.
        default:
          description: |-
            *** Error Responses: ***

             * 400 CannotDeactivateWhenDeactivatingInProgress - Deactivation workflow failed because there is a deactivate workflow already running.

             * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.

             * 404 SourceDatabaseNotFound - The source database does not exist.

             * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows
      tags:
        - Databases
      x-ms-examples:
        Pauses a database.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdwdb
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb
                kind: v12.0,user,datawarehouse
                location: southeastasia
                name: testdwdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-07-13T02:04:26.187Z
                  currentServiceObjectiveName: D1
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 10995116277760
                  status: Paused
                sku:
                  name: DW100
                  tier: DataWarehouse
                type: Microsoft.Sql/servers/databases
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume":
    post:
      description: Resumes a database.
      operationId: Databases_Resume
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database to be resumed.
          in: path
          name: databaseName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully resumed the database.
          schema:
            $ref: "#/definitions/Database"
        "202":
          description: Resuming the database is in progress.
        default:
          description: |-
            *** Error Responses: ***

             * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.

             * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

             * 404 SourceDatabaseNotFound - The source database does not exist.

             * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows
      tags:
        - Databases
      x-ms-examples:
        Resumes a database.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdwdb
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb
                kind: v12.0,user,datawarehouse
                location: southeastasia
                name: testdwdb
                properties:
                  catalogCollation: SQL_Latin1_General_CP1_CI_AS
                  collation: SQL_Latin1_General_CP1_CI_AS
                  creationDate: 2017-07-13T02:04:26.187Z
                  currentServiceObjectiveName: D1
                  databaseId: 6c764297-577b-470f-9af4-96d3d41e2ba3
                  defaultSecondaryLocation: North Europe
                  maxSizeBytes: 10995116277760
                  status: Online
                sku:
                  name: DW100
                  tier: DataWarehouse
                type: Microsoft.Sql/servers/databases
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse":
    post:
      description: Upgrades a data warehouse.
      operationId: Databases_UpgradeDataWarehouse
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database to be upgraded.
          in: path
          name: databaseName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully upgraded the data warehouse.
        "202":
          description: Upgrading the data warehouse is in progress.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidCollation - Collation is not recognized by the server.

             * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes

             * 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.

             * 400 ElasticPoolOverStorageUsage - Attempting to write data to a database when the storage limit of the elastic pool has been reached.

             * 400 RemoteDatabaseCopyPermission - User does not have sufficient permission to create a database copy on the specified server.

             * 400 SourceDatabaseNotFound - The source database does not exist.

             * 400 UpdateNotAllowedInCurrentReplicationState - The operation is disallowed on the database in its current replication state.

             * 400 GeoReplicaLimitReached - The per-replica replication limit was reached.

             * 400 ReplicationSourceAndTargetMustHaveSameName - The replication source and target databases must have the same name.

             * 400 ReplicationSourceAndTargetMustBeInDifferentServers - The replication source and target databases must be in different logical servers.

             * 400 ChangeUnsupportedOnEntity - User attempted an unsupported create/update/delete operation on a given entity.

             * 400 TierChangeUnsupportedDueToMemoryOptimizedObject - The database cannot update its sku because it has memory-optimized objects.

             * 400 SourceServerNotFound - The server part of a source database id provided in a CreateDatabaseAsCopy API call doesn't map to an existing server.

             * 400 InvalidAddSecondaryPermission - User does not have sufficient permission to add secondary on the specified server.

             * 400 UnsupportedServiceName - The specified name is an invalid name because it contains one or more unsupported unicode characters.

             * 400 CurrentDatabaseLogSizeExceedsMaxSize - User attempted to change the database to a sku with lower max log size than the current usage.

             * 400 TokenTooLong - The provided token is too long.

             * 400 InvalidSku - The user specified an invalid sku.

             * 400 InvalidTierSkuCombination - The specified tier does not support the specified sku.

             * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.

             * 400 OfferDisabledOnSubscription - Subscription offer type is restricted from provisioning the requested resource.

             * 400 InvalidTargetSubregion - The target server of a non-readable secondary is not in a DR paired Azure region.

             * 400 PartnerServerNotCompatible - The user is attempting to copy a database from a SAWA V1 server to a Sterling server or vice versa.

             * 400 IncorrectReplicationLinkState - The operation expects the database to be in an expected state on the replication link.

             * 400 TargetElasticPoolDoesNotExist - The elastic pool does not exist on a server.

             * 400 CurrentDatabaseSizeExceedsMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.

             * 400 ElasticPoolSkuCombinationInvalid - Elastic pool and sku can be specified together only if sku is specified as 'ElasticPool'.

             * 400 ElasticPoolTierCombinationInvalid - The database tier is different than the elastic pool service tier.

             * 400 AzureKeyVaultInvalidExpirationDate - The operation could not be completed because the Azure Key Vault key expiration date is invalid.

             * 400 SecurityAzureKeyVaultUrlNullOrEmpty - The operation could not be completed because the Azure Key Vault Uri is null or empty.

             * 400 AzureKeyVaultInvalidUri - An invalid response from Azure Key Vault. Please use a valid Azure Key Vault URI.

             * 400 InvalidReadScaleEdition - User attempted to enable read scale on a database type that does not support it.

             * 400 InvalidReadScaleUnits - User attempted to provide a read scale value that is not supported.

             * 400 SecurityAzureKeyVaultInvalidKeyName - The operation could not be completed because of an invalid Server Key name.

             * 400 ElasticPoolDatabaseCountOverLimit - Attempting to create or add database to elastic pool when the database count limit of the elastic pool has been reached.

             * 400 CannotChangeToOrFromDataWarehouseTier - User attempted to change the sku of a database from DataWarehouse tier to non DataWarehouse tiers or vice versa.

             * 400 AzureKeyVaultMalformedVaultUri - The provided Key Vault uri is not valid.

             * 400 ElasticPoolDecreaseStorageLimitBelowUsage - Attempting to decrease the storage limit of the elastic pool below its storage usage.

             * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.

             * 400 RequestedDatabaseSizeRequiresShrink - User attempted to ALTER DATABASE MODIFY MAXSIZE to modify the MAXSIZE for a database to a smaller size then the current size.

             * 400 CurrentDatabaseSizeExceedsDbMaxSize - User attempted to reduce the max size for a database to a size smaller than the current usage.

             * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.

             * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.

             * 400 SecurityAdalPrincipalCertExpiredError - The operation could not be completed because the Azure Key Vault principal certificate has expired.

             * 400 SecurityInvalidAzureKeyVaultRecoveryLevel - The provided Key Vault uri is not valid.

             * 400 KeyMaterialNotFoundOnRemoteServer - Remote server does not have access to key material used as a TDE protector.

             * 400 AzureKeyVaultMismatchError - Unexpected Key Vault region found in the http response.

             * 400 SourceDatabaseEditionCouldNotBeUpgraded - The source database cannot have higher edition than the target database.

             * 400 AzureKeyVaultRsaKeyNotSupported - The provided key vault uses unsupported RSA Key Size or Key Type. The supported RSA key size is 2048 and Key Type is RSA.

             * 400 TargetDatabaseEditionCouldNotBeDowngraded - The target database cannot have lower edition than the source database.

             * 400 UpdateNotAllowedIfGeoDrOperationInProgress - The operation is disallowed because copy or failover operation for database '{0}' on server '{1}' is currently in progress.

             * 400 ElasticPoolOverFileSpace - Insufficient file space in the elastic pool.

             * 400 SecurityAzureKeyVaultGeoChainError - Creating secondary of secondary (a process known as chaining) is not supported when enabling Transparent Data Encryption using Azure Key Vault (BYOK).

             * 400 InvalidLicenseType - User tried to create or update a database or elastic pool with unsupported license type.

             * 400 UnsupportedCapacity - User tried to create or update database with capacity which is not supported.

             * 400 RestoreToFreeEditionNotSupported - Restore and GeoRestore target cannot be free database.

             * 400 RestoreNotSupportedForFreeEdition - Restore and GeoRestore are not supported for free database.

             * 400 InvalidDroppedDatabase - Source database dropped does not exist on server within the supported recovery period.

             * 400 InvalidLiveDatabase - Source database does not exist on server within the supported recovery period. If restoring a dropped database, please specify its deletion date.

             * 400 InvalidVldbRecoverySlo - The Hyperscale edition recovery requires both source and target databases to use Hyperscale service level objective.

             * 400 InvalidVldbRestoreSlo - The Hyperscale edition Point-In-Time restore requires both source and target databases to use Hyperscale service level objective.

             * 400 CannotSpecifyPoolOrSlo - Specifying an elastic pool and/or changing the service level objective or edition is not supported for edition.

             * 400 CannotMoveOrDropJobAccountDatabase - Cannot drop database associated with job account.

             * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.

             * 400 CannotUpdateToFreeDatabase - Updating a database to the free sku is not supported.

             * 400 ServerNotFound - The requested server was not found.

             * 400 CannotMoveOrDropSyncMetadataDatabase - Cannot drop database used as sync metadata database.

             * 400 InvalidMaxSizeTierCombination - The specified tier does not support the specified database max size.

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.

             * 400 SubscriptionNotFound - The requested subscription was not found.

             * 400 InvalidServerName - Invalid server name specified.

             * 400 UpgradeOnlyAllowedOnDataWarehouseInstances - User attempted to upgrade non-datawarehouse instance.

             * 401 AzureKeyVaultKeyDisabled - The operation could not be completed on the server because the Azure Key Vault key is disabled.

             * 401 AzureKeyVaultNoServerIdentity - The server identity is not correctly configured.

             * 401 AzureKeyVaultMissingPermissions - The server is missing required permissions on the Azure Key Vault. 

             * 401 AdalGenericError - The operation could not be completed because an Azure Active Directory error was encountered.

             * 401 AdalServicePrincipalNotFound - The operation could not be completed because an Azure Active Directory library Service Principal not found error was encountered.

             * 404 OperationIdNotFound - The operation with Id does not exist.

             * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

             * 405 UnsupportedReplicationOperation - An unsupported replication operation was initiated on the database.

             * 409 OperationCancelled - The operation has been cancelled by user.

             * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

             * 409 InvalidOperationForDatabaseNotInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.

             * 409 InvalidOperationForDatabaseInReplicationRelationship - A replication seeding operation was performed on a database that is already in a replication relationship.

             * 409 RemoteDatabaseExists - The destination database name already exists on the destination server.

             * 409 DuplicateGeoDrRelation - The databases are already in a replication relation. This is a duplicate request.

             * 409 FreeDbAlreadyExists - Only one free database can exist for a subscription per region.

             * 409 SubscriptionDisabled - Subscription is disabled.

             * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.

             * 409 SkuAssignmentInProgress - The current assignment request cannot be processed because a previous request has not completed.

             * 409 CurrentMemoryUsageExceedsSkuQuota - User attempted an sku update operation that cannot be completed due to the higher resource consumption.

             * 409 ServerDtuQuotaExceeded - Could not perform the operation because server would exceed the allowed Database Throughput Unit quota.

             * 409 ServerKeyNameAlreadyExists - The server key already exists on the server.

             * 409 ServerKeyUriAlreadyExists - The server key URI already exists on the server.

             * 409 UnableToAlterDatabaseInReplication - User altered edition on a database in a replication relationship.

             * 409 ServerKeyDoesNotExists - The server key does not exist.

             * 409 UpdateSloInProgress - User tried to initiate an incompatible operation while a SLO update was in progress.

             * 409 AzureKeyVaultKeyNameNotFound - The operation could not be completed because the Azure Key Vault Key name does not exist.

             * 409 AzureKeyVaultKeyInUse - The key is currently being used by the server.

             * 409 SimultaneousSkuChangeNotAllowed - Service objective change operations cannot run on both databases of a replication relationship at the same time.

             * 409 TargetElasticPoolBeingUpdated - The update of elastic pool cannot be started because there is copy operation in progress for one of the databases in this elastic pool

             * 409 DatabaseCopyLimitPerReplicaReached - User reached the limit of concurrent database copies.

             * 409 ServerDisabled - Server is disabled.

             * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.

             * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

             * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

             * 500 ActivateOrDeactivateWorkflowThrottling - Activation or deactivation workflow failed because there are too many concurrent workflows

             * 503 AzureKeyVaultConnectionFailed - The operation could not be completed on the server because attempts to connect to Azure Key Vault have failed

             * 503 AzureKeyVaultGenericConnectionError - The operation could not be completed because an error was encountered when attempting to retrieve Key Vault information .

             * 503 DatabaseUnavailable - The operation failed because the database is unavailable.

             * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 504 RequestTimeout - Service request exceeded the allowed timeout.
      tags:
        - Databases
      x-ms-examples:
        Upgrades a data warehouse.:
          parameters:
            api-version: 2017-03-01-preview
            databaseName: testdwdb
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200": {}
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases":
    get:
      description: Gets a list of databases in an elastic pool.
      operationId: Databases_ListByElasticPool
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the elastic pool.
          in: path
          name: elasticPoolName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved a list of databases in an elastic pool.
          schema:
            $ref: "#/definitions/DatabaseListResult"
        default:
          description: |-
            *** Error Responses: ***

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

             * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

             * 404 CannotFindObject - Cannot find the object because it does not exist or you do not have permissions

             * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

             * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 504 RequestTimeout - Service request exceeded the allowed timeout.
      tags:
        - Databases
      x-ms-examples:
        Gets a list of databases in an elastic pool.:
          parameters:
            api-version: 2017-03-01-preview
            elasticPoolName: pool1
            resourceGroupName: Default-SQL-SouthEastAsia
            serverName: testsvr
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/DB001
                    kind: v12.0,user
                    location: southeastasia
                    name: DB001
                    properties:
                      catalogCollation: SQL_Latin1_General_CP1_CI_AS
                      collation: SQL_Latin1_General_CP1_CI_AS
                      creationDate: 2017-07-12T22:08:39.163Z
                      currentServiceObjectiveName: ElasticPool
                      databaseId: bfe0735f-bc87-447f-b2c2-481f4b100614
                      defaultSecondaryLocation: North Europe
                      elasticPoolId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/elasticPools/Pool1
                      maxSizeBytes: 268435456000
                      status: Online
                    sku:
                      name: ElasticPool
                      tier: Standard
                    type: Microsoft.Sql/servers/databases
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/DB002
                    kind: v12.0,user
                    location: southeastasia
                    name: DB002
                    properties:
                      catalogCollation: SQL_Latin1_General_CP1_CI_AS
                      collation: SQL_Latin1_General_CP1_CI_AS
                      creationDate: 2017-07-12T22:10:10.773Z
                      currentServiceObjectiveName: ElasticPool
                      databaseId: 82246152-3177-4357-b81c-a16d87ce3593
                      defaultSecondaryLocation: North Europe
                      elasticPoolId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/elasticPools/Pool1
                      maxSizeBytes: 268435456000
                      status: Online
                    sku:
                      name: ElasticPool
                      tier: Standard
                    type: Microsoft.Sql/servers/databases
      x-ms-pageable:
        nextLinkName: nextLink
definitions:
  Database:
    allOf:
      - $ref: "#/definitions/TrackedResource"
    description: A database resource.
    properties:
      kind:
        description: Kind of database. This is metadata used for the Azure portal experience.
        readOnly: true
        type: string
      managedBy:
        description: Resource that manages the database.
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/DatabaseProperties"
        description: Resource properties.
        x-ms-client-flatten: true
      sku:
        $ref: "#/definitions/Sku"
        description: "The database SKU.\r

          \r

          The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:\r

          \r

          ```azurecli\r

          az sql db list-editions -l <location> -o table\r

          ````\r

          \r

          ```powershell\r

          Get-AzSqlServerServiceObjective -Location <location>\r

          ````\r\n"
    required:
      - location
    type: object
  DatabaseListResult:
    description: A list of databases.
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/Database"
        readOnly: true
        type: array
    type: object
  DatabaseProperties:
    description: The database's properties.
    properties:
      autoPauseDelay:
        description: Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled
        format: int32
        type: integer
      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: The collation of the database.
        type: string
        x-ms-mutability:
          - read
          - create
      createMode:
        description: "Specifies the mode of database creation.\r

          \r

          Default: regular database creation.\r

          \r

          Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.\r

          \r

          Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.\r

          \r

          PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.\r

          \r

          Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.\r

          \r

          Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.\r

          \r

          RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.\r

          \r

          Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition."
        enum:
          - Default
          - Copy
          - Secondary
          - PointInTimeRestore
          - Restore
          - Recovery
          - RestoreExternalBackup
          - RestoreExternalBackupSecondary
          - RestoreLongTermRetentionBackup
          - OnlineSecondary
        type: string
        x-ms-enum:
          modelAsString: true
          name: CreateMode
        x-ms-mutability:
          - create
      creationDate:
        description: The creation date of the database (ISO8601 format).
        format: date-time
        readOnly: true
        type: string
      currentServiceObjectiveName:
        description: The current service level objective name of the database.
        readOnly: true
        type: string
      currentSku:
        $ref: "#/definitions/Sku"
        description: The name and tier of the SKU.
        readOnly: true
      databaseId:
        description: The ID of the database.
        format: uuid
        readOnly: true
        type: string
      defaultSecondaryLocation:
        description: The default secondary region for this database.
        readOnly: true
        type: string
      earliestRestoreDate:
        description: This records the earliest start date and time that restore is available for this database (ISO8601 format).
        format: date-time
        readOnly: true
        type: string
      elasticPoolId:
        description: The resource identifier of the elastic pool containing this database.
        type: string
      failoverGroupId:
        description: Failover Group resource identifier that this database belongs to.
        readOnly: true
        type: string
      licenseType:
        description: The license type to apply for this database.
        enum:
          - LicenseIncluded
          - BasePrice
        type: string
        x-ms-enum:
          modelAsString: true
          name: DatabaseLicenseType
      longTermRetentionBackupResourceId:
        description: The resource identifier of the long term retention backup associated with create operation of this database.
        type: string
        x-ms-mutability:
          - create
      maxLogSizeBytes:
        description: The max log size for this database.
        format: int64
        readOnly: true
        type: integer
      maxSizeBytes:
        description: The max size of the database expressed in bytes.
        format: int64
        type: integer
      minCapacity:
        description: Minimal capacity that database will always have allocated, if not paused
        format: double
        type: number
      pausedDate:
        description: The date when database was paused by user configuration or action (ISO8601 format). Null if the database is ready.
        format: date-time
        readOnly: true
        type: string
      readReplicaCount:
        description: The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
        format: int32
        type: integer
      readScale:
        description: If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
        enum:
          - Enabled
          - Disabled
        type: string
        x-ms-enum:
          modelAsString: true
          name: DatabaseReadScale
        x-ms-mutability:
          - read
          - update
      recoverableDatabaseId:
        description: The resource identifier of the recoverable database associated with create operation of this database.
        type: string
        x-ms-mutability:
          - create
      recoveryServicesRecoveryPointId:
        description: The resource identifier of the recovery point associated with create operation of this database.
        type: string
        x-ms-mutability:
          - create
      requestedServiceObjectiveName:
        description: The requested service level objective name of the database.
        readOnly: true
        type: string
      restorableDroppedDatabaseId:
        description: The resource identifier of the restorable dropped database associated with create operation of this database.
        type: string
        x-ms-mutability:
          - create
      restorePointInTime:
        description: 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
      resumedDate:
        description: The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.
        format: date-time
        readOnly: true
        type: string
      sampleName:
        description: The name of the sample schema to apply when creating this database.
        enum:
          - AdventureWorksLT
          - WideWorldImportersStd
          - WideWorldImportersFull
        type: string
        x-ms-enum:
          modelAsString: true
          name: SampleName
        x-ms-mutability:
          - create
      sourceDatabaseDeletionDate:
        description: Specifies the time that the database was deleted.
        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: The status of the database.
        enum:
          - Online
          - Restoring
          - RecoveryPending
          - Recovering
          - Suspect
          - Offline
          - Standby
          - Shutdown
          - EmergencyMode
          - AutoClosed
          - Copying
          - Creating
          - Inaccessible
          - OfflineSecondary
          - Pausing
          - Paused
          - Resuming
          - Scaling
          - OfflineChangingDwPerformanceTiers
          - OnlineChangingDwPerformanceTiers
          - Disabled
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: DatabaseStatus
      zoneRedundant:
        description: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
        type: boolean
    type: object
  DatabaseUpdate:
    description: A database resource.
    properties:
      properties:
        $ref: "#/definitions/DatabaseProperties"
        description: Resource properties.
        x-ms-client-flatten: true
      sku:
        $ref: "#/definitions/Sku"
        description: The name and tier of the SKU.
      tags:
        additionalProperties:
          type: string
        description: Resource tags.
        type: object
    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
  ResourceMoveDefinition:
    description: Contains the information necessary to perform a resource move (rename).
    properties:
      id:
        description: The target ID for the resource
        type: string
    required:
      - id
    type: object
  Sku:
    description: An ARM Resource SKU.
    properties:
      capacity:
        description: Capacity of the particular SKU.
        format: int32
        type: integer
      family:
        description: If the service has different generations of hardware, for the same SKU, then that can be captured here.
        type: string
      name:
        description: The name of the SKU, typically, a letter + Number code, e.g. P3.
        type: string
      size:
        description: Size of the particular SKU
        type: string
      tier:
        description: The tier or edition of the particular SKU, e.g. Basic, Premium.
        type: string
    required:
      - name
    type: object
  TrackedResource:
    allOf:
      - $ref: "#/definitions/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
