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/elasticPools.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: sql-elasticPools
  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}/elasticPools":
    get:
      description: Gets all elastic pools in a server.
      operationId: ElasticPools_ListByServer
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The number of elements in the collection to skip.
          in: query
          name: $skip
          required: false
          type: integer
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Succeeded
          schema:
            $ref: "#/definitions/ElasticPoolListResult"
        default:
          description: |-
            *** Error Responses: ***

             * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.

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

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

             * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.

             * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.

             * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.

             * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.

             * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.

             * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.

             * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.

             * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.

             * 400 ElasticPoolStorageDecreasePrecondition - There was an attempt to decrease the storage limit of the elastic pool below its storage usage.

             * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.

             * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.

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

             * 405 NotSupported - This functionality is not supported.

             * 409 ServerDisabled - Server is disabled.

             * 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.

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

             * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.
      tags:
        - ElasticPools
      x-ms-examples:
        Get all elastic pools in a server:
          parameters:
            api-version: 2017-10-01
            resourceGroupName: sqlcrudtest-2369
            serverName: sqlcrudtest-8069
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-2729
                    kind: null
                    location: Japan East
                    name: sqlcrudtest-2729
                    properties:
                      creationDate: 2017-02-10T01:27:21.32Z
                      licenseType: LicenseIncluded
                      maxSizeBytes: 5242880000
                      perDatabaseSettings:
                        maxCapacity: 1
                        minCapacity: 0.25
                      state: Ready
                      zoneRedundant: true
                    sku:
                      capacity: 2
                      name: GP_Gen4_2
                      tier: GeneralPurpose
                    type: Microsoft.Sql/servers/elasticPools
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-3191
                    kind: null
                    location: Japan East
                    name: sqlcrudtest-3191
                    properties:
                      creationDate: 2017-02-10T01:26:26.45Z
                      maxSizeBytes: 5242880000
                      perDatabaseSettings:
                        maxCapacity: 5
                        minCapacity: 0
                      state: Ready
                    sku:
                      capacity: 50
                      name: BasicPool
                      tier: Basic
                    type: Microsoft.Sql/servers/elasticPools
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102
                    kind: null
                    location: Japan East
                    name: sqlcrudtest-8102
                    properties:
                      creationDate: 2017-02-10T01:25:25.033Z
                      maxSizeBytes: 5242880000
                      perDatabaseSettings:
                        maxCapacity: 5
                        minCapacity: 0
                      state: Ready
                    sku:
                      capacity: 50
                      name: BasicPool
                      tier: Basic
                    type: Microsoft.Sql/servers/elasticPools
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}":
    delete:
      description: Deletes an elastic pool.
      operationId: ElasticPools_Delete
      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: Deleted the elastic pool
        "202":
          description: Accepted
        "204":
          description: Elastic pool did not exist
        default:
          description: |-
            *** Error Responses: ***

             * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.

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

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

             * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.

             * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.

             * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.

             * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.

             * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.

             * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.

             * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.

             * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.

             * 400 ElasticPoolStorageDecreasePrecondition - There was an attempt to decrease the storage limit of the elastic pool below its storage usage.

             * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.

             * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.

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

             * 405 NotSupported - This functionality is not supported.

             * 409 ServerDisabled - Server is disabled.

             * 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.

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

             * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.
      tags:
        - ElasticPools
      x-ms-examples:
        Delete an elastic pool:
          parameters:
            api-version: 2017-10-01
            elasticPoolName: sqlcrudtest-3851
            resourceGroupName: sqlcrudtest-3129
            serverName: sqlcrudtest-228
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets an elastic pool.
      operationId: ElasticPools_Get
      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: Succeeded
          schema:
            $ref: "#/definitions/ElasticPool"
        default:
          description: |-
            *** Error Responses: ***

             * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.

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

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

             * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.

             * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.

             * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.

             * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.

             * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.

             * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.

             * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.

             * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.

             * 400 ElasticPoolStorageDecreasePrecondition - There was an attempt to decrease the storage limit of the elastic pool below its storage usage.

             * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.

             * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.

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

             * 404 ResourceNotFound - The requested resource was not found.

             * 405 NotSupported - This functionality is not supported.

             * 409 ServerDisabled - Server is disabled.

             * 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.

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

             * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.
      tags:
        - ElasticPools
      x-ms-examples:
        Get an elastic pool:
          parameters:
            api-version: 2017-10-01
            elasticPoolName: sqlcrudtest-8102
            resourceGroupName: sqlcrudtest-2369
            serverName: sqlcrudtest-8069
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102
                kind: null
                location: Japan East
                name: sqlcrudtest-8102
                properties:
                  creationDate: 2017-10-10T01:25:25.033Z
                  licenseType: LicenseIncluded
                  maxSizeBytes: 5242880000
                  perDatabaseSettings:
                    maxCapacity: 1
                    minCapacity: 0.25
                  state: Ready
                  zoneRedundant: true
                sku:
                  capacity: 2
                  name: GP_Gen4_2
                  tier: GeneralPurpose
                type: Microsoft.Sql/servers/elasticPools
    patch:
      description: Updates an elastic pool.
      operationId: ElasticPools_Update
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the elastic pool.
          in: path
          name: elasticPoolName
          required: true
          type: string
        - description: The elastic pool update parameters.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ElasticPoolUpdate"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Updated the elastic pool
          schema:
            $ref: "#/definitions/ElasticPool"
        "202":
          description: Accepted
        default:
          description: |-
            *** Error Responses: ***

             * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.

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

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

             * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.

             * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.

             * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.

             * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.

             * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.

             * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.

             * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.

             * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.

             * 400 ElasticPoolStorageDecreasePrecondition - There was an attempt to decrease the storage limit of the elastic pool below its storage usage.

             * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.

             * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.

             * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.

             * 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 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.

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

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

             * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.

             * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.

             * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.

             * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.

             * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.

             * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.

             * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.

             * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.

             * 400 ElasticPoolStorageDecreasePrecondition - There was an attempt to decrease the storage limit of the elastic pool below its storage usage.

             * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.

             * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.

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

             * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.

             * 405 NotSupported - This functionality is not supported.

             * 405 NotSupported - This functionality is not supported.

             * 409 ServerDisabled - Server is disabled.

             * 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 ServiceTemporarilyUnavailable - Feature temporarily unavailable.

             * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.
      tags:
        - ElasticPools
      x-ms-examples:
        Update an elastic pool with all parameter:
          parameters:
            api-version: 2017-10-01
            elasticPoolName: sqlcrudtest-8102
            parameters:
              properties:
                licenseType: LicenseIncluded
                perDatabaseSettings:
                  maxCapacity: 1
                  minCapacity: 0.25
                zoneRedundant: true
              sku:
                capacity: 2
                name: BC_Gen4_2
                tier: BusinessCritical
            resourceGroupName: sqlcrudtest-2369
            serverName: sqlcrudtest-8069
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102
                kind: null
                location: Japan East
                name: sqlcrudtest-8102
                properties:
                  creationDate: 2017-02-10T01:27:21.32Z
                  licenseType: LicenseIncluded
                  maxSizeBytes: 5242880000
                  perDatabaseSettings:
                    maxCapacity: 1
                    minCapacity: 0.25
                  state: Ready
                  zoneRedundant: true
                sku:
                  capacity: 2
                  name: BC_Gen4_2
                  tier: BusinessCritical
                type: Microsoft.Sql/servers/elasticPools
            "202": {}
        Update an elastic pool with minimum parameters:
          parameters:
            api-version: 2017-10-01
            elasticPoolName: sqlcrudtest-8102
            parameters: {}
            resourceGroupName: sqlcrudtest-2369
            serverName: sqlcrudtest-8069
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102
                kind: null
                location: Japan East
                name: sqlcrudtest-8102
                properties:
                  creationDate: 2017-02-10T01:25:25.033Z
                  maxSizeBytes: 5242880000
                  perDatabaseSettings:
                    maxCapacity: 5
                    minCapacity: 0
                  state: Ready
                sku:
                  capacity: 50
                  name: BasicPool
                  tier: Basic
                type: Microsoft.Sql/servers/elasticPools
            "202": {}
      x-ms-long-running-operation: true
    put:
      description: Creates or updates an elastic pool.
      operationId: ElasticPools_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the elastic pool.
          in: path
          name: elasticPoolName
          required: true
          type: string
        - description: The elastic pool parameters.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ElasticPool"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Updated the elastic pool
          schema:
            $ref: "#/definitions/ElasticPool"
        "201":
          description: Created the elastic pool
          schema:
            $ref: "#/definitions/ElasticPool"
        "202":
          description: Accepted
        default:
          description: |-
            *** Error Responses: ***

             * 400 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.

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

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

             * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.

             * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.

             * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.

             * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.

             * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.

             * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.

             * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.

             * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.

             * 400 ElasticPoolStorageDecreasePrecondition - There was an attempt to decrease the storage limit of the elastic pool below its storage usage.

             * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.

             * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.

             * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.

             * 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 ElasticPoolStorageBelowLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolStorageNotAllowedMB - Attempting to set the elastic pool storage limit in mb which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitMB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolUpdateHkNotAllowed - The elastic pool cannot lower its service tier from Premium to Standard or Basic since one or more of its databases use memory-optimized objects.

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

             * 400 InvalidTier - The user specified an invalid tier.

             * 400 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

             * 400 ElasticPoolAlreadyExists - The server already contains an elastic pool with the specified name.

             * 400 InvalidInputValueForEdition - Specified edition is not supported for elastic pool provisioning.

             * 400 ElasticPoolDtuBelowLimit - The requested DTU value is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDtuAboveLimit - The requested DTU value is too high for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxBelowLimit - The requested per database DTU max is too low for the requested elastic pool service tier.

             * 400 ElasticPoolDbDtuMaxAboveLimit - The requested per database DTU max is too high for the requested elastic pool service tier.

             * 400 InvalidInputValueForDatabaseDtuMax - Attempting to set the DTU max per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolDbDtuMinAboveLimit - The requested DTU min per database is too high for the requested service tier.

             * 400 InvalidInputValueForDatabaseDtuMin - Attempting to set the DTU min per database for the Resource Pool which doesn't match the allowed values.

             * 400 ElasticPoolStorageAboveLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

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

             * 400 ElasticPoolsNotEnabled - Elastic pools have not been enabled in this region.

             * 400 ElasticPoolNotEmpty - Request to delete an elastic pool that is not empty.

             * 400 ElasticPoolStorageBelowLimitGB - Attempting to set the elastic pool storage limit below the supported limit.

             * 400 ElasticPoolStorageNotAllowedGB - Attempting to set the elastic pool storage limit in gb which doesn't match the allowed values.

             * 400 ElasticPoolDatabaseLimit - The elastic pool has reached its limit for number of databases.

             * 400 ElasticPoolStorageDecreasePrecondition - There was an attempt to decrease the storage limit of the elastic pool below its storage usage.

             * 400 ElasticPoolBusy - A management operation was attempted on an elastic pool which is busy.

             * 400 InvalidInputValueDatabaseDtuMinLargerThanMax - Attempting to set the DTU min per database higher than the DTU max per database.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.

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

             * 404 ElasticPoolNotFound - The specified elastic pool does not exist for the specified server.

             * 405 NotSupported - This functionality is not supported.

             * 405 NotSupported - This functionality is not supported.

             * 409 ServerDisabled - Server is disabled.

             * 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 ServiceTemporarilyUnavailable - Feature temporarily unavailable.

             * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable.
      tags:
        - ElasticPools
      x-ms-examples:
        Create or update elastic pool with all parameter:
          parameters:
            api-version: 2017-10-01
            elasticPoolName: sqlcrudtest-8102
            parameters:
              location: Japan East
              properties:
                perDatabaseSettings:
                  maxCapacity: 2
                  minCapacity: 0.25
              sku:
                capacity: 2
                name: GP_Gen4_2
                tier: GeneralPurpose
            resourceGroupName: sqlcrudtest-2369
            serverName: sqlcrudtest-8069
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102
                kind: null
                location: Japan East
                name: sqlcrudtest-8102
                properties:
                  creationDate: 2017-02-10T01:25:25.033Z
                  maxSizeBytes: 5242880000
                  perDatabaseSettings:
                    maxCapacity: 2
                    minCapacity: 0.25
                  state: Ready
                sku:
                  capacity: 2
                  name: GP_Gen4_2
                  tier: GeneralPurpose
                type: Microsoft.Sql/servers/elasticPools
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102
                kind: null
                location: Japan East
                name: sqlcrudtest-8102
                properties:
                  creationDate: 2017-02-10T01:25:25.033Z
                  maxSizeBytes: 5242880000
                  perDatabaseSettings:
                    maxCapacity: 2
                    minCapacity: 0.25
                  state: Ready
                sku:
                  capacity: 2
                  name: GP_Gen4_2
                  tier: GeneralPurpose
                type: Microsoft.Sql/servers/elasticPools
            "202": {}
        Create or update elastic pool with minimum parameters:
          parameters:
            api-version: 2017-10-01
            elasticPoolName: sqlcrudtest-8102
            parameters:
              location: Japan East
            resourceGroupName: sqlcrudtest-2369
            serverName: sqlcrudtest-8069
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102
                kind: null
                location: Japan East
                name: sqlcrudtest-8102
                properties:
                  creationDate: 2017-02-10T01:25:25.033Z
                  maxSizeBytes: 102400
                  perDatabaseSettings:
                    maxCapacity: 100
                    minCapacity: 0
                  state: Ready
                sku:
                  capacity: 100
                  name: StandardPool
                  tier: Standard
                type: Microsoft.Sql/servers/elasticPools
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102
                kind: null
                location: Japan East
                name: sqlcrudtest-8102
                properties:
                  creationDate: 2017-02-10T01:25:25.033Z
                  maxSizeBytes: 102400
                  perDatabaseSettings:
                    maxCapacity: 100
                    minCapacity: 0
                  state: Ready
                sku:
                  capacity: 100
                  name: StandardPool
                  tier: Standard
                type: Microsoft.Sql/servers/elasticPools
            "202": {}
      x-ms-long-running-operation: true
definitions:
  ElasticPool:
    allOf:
      - allOf:
          - 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
        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
    description: An elastic pool.
    properties:
      kind:
        description: Kind of elastic pool. This is metadata used for the Azure portal experience.
        readOnly: true
        type: string
      properties:
        $ref: "#/definitions/ElasticPoolProperties"
        description: Resource properties.
        x-ms-client-flatten: true
      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
    required:
      - location
    type: object
  ElasticPoolListResult:
    description: The result of an elastic pool list request.
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/ElasticPool"
        readOnly: true
        type: array
    type: object
  ElasticPoolPerDatabaseSettings:
    description: Per database settings of an elastic pool.
    properties:
      maxCapacity:
        description: The maximum capacity any one database can consume.
        format: double
        type: number
      minCapacity:
        description: The minimum capacity all databases are guaranteed.
        format: double
        type: number
    type: object
  ElasticPoolProperties:
    description: Properties of an elastic pool
    properties:
      creationDate:
        description: The creation date of the elastic pool (ISO8601 format).
        format: date-time
        readOnly: true
        type: string
      licenseType:
        description: The license type to apply for this elastic pool.
        enum:
          - LicenseIncluded
          - BasePrice
        type: string
        x-ms-enum:
          modelAsString: true
          name: ElasticPoolLicenseType
      maxSizeBytes:
        description: The storage limit for the database elastic pool in bytes.
        format: int64
        type: integer
      perDatabaseSettings:
        $ref: "#/definitions/ElasticPoolPerDatabaseSettings"
        description: The per database settings for the elastic pool.
      state:
        description: The state of the elastic pool.
        enum:
          - Creating
          - Ready
          - Disabled
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: ElasticPoolState
      zoneRedundant:
        description: Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.
        type: boolean
    type: object
  ElasticPoolUpdate:
    description: An elastic pool update.
    properties:
      properties:
        $ref: "#/definitions/ElasticPoolUpdateProperties"
        description: Resource properties.
        x-ms-client-flatten: true
      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
      tags:
        additionalProperties:
          type: string
        description: Resource tags.
        type: object
    type: object
  ElasticPoolUpdateProperties:
    description: Properties of an elastic pool
    properties:
      licenseType:
        description: The license type to apply for this elastic pool.
        enum:
          - LicenseIncluded
          - BasePrice
        type: string
        x-ms-enum:
          modelAsString: true
          name: ElasticPoolLicenseType
      maxSizeBytes:
        description: The storage limit for the database elastic pool in bytes.
        format: int64
        type: integer
      perDatabaseSettings:
        $ref: "#/definitions/ElasticPoolPerDatabaseSettings"
        description: The per database settings for the elastic pool.
      zoneRedundant:
        description: Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones.
        type: boolean
    type: object
