{
  "openapi": "3.0.0",
  "info": {
    "description": "Provides create, read, update and delete functionality for Azure SQL Database elastic pools.",
    "title": "Azure SQL Database",
    "version": "2014-04-01",
    "x-jentic-source-url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/elasticPools.json"
  },
  "servers": [
    {
      "url": "https://management.azure.com/"
    }
  ],
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools": {
      "get": {
        "parameters": [
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ApiVersionParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElasticPoolListResult"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ElasticPools"
        ],
        "description": "Returns a list of elastic pools in a server.",
        "operationId": "ElasticPools_ListByServer",
        "x-ms-examples": {
          "List elastic pools": {
            "$ref": "./examples/ElasticPoolList.json"
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}": {
      "delete": {
        "parameters": [
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ApiVersionParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the elastic pool to be deleted.",
            "in": "path",
            "name": "elasticPoolName",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "Accepted"
          }
        },
        "tags": [
          "ElasticPools"
        ],
        "description": "Deletes the elastic pool.",
        "operationId": "ElasticPools_Delete",
        "x-ms-examples": {
          "Delete elastic pool": {
            "$ref": "./examples/ElasticPoolDelete.json"
          }
        }
      },
      "get": {
        "parameters": [
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ApiVersionParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the elastic pool to be retrieved.",
            "in": "path",
            "name": "elasticPoolName",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElasticPool"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ElasticPools"
        ],
        "description": "Gets an elastic pool.",
        "operationId": "ElasticPools_Get",
        "x-ms-examples": {
          "Get elastic pool": {
            "$ref": "./examples/ElasticPoolGet.json"
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ApiVersionParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the elastic pool to be updated.",
            "in": "path",
            "name": "elasticPoolName",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElasticPool"
                }
              }
            },
            "description": "OK"
          },
          "202": {
            "description": "Accepted"
          }
        },
        "tags": [
          "ElasticPools"
        ],
        "description": "Updates an existing elastic pool.",
        "operationId": "ElasticPools_Update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ElasticPoolUpdate"
              }
            }
          },
          "description": "The required parameters for updating an elastic pool.",
          "required": true
        },
        "x-ms-examples": {
          "Update elastic pool max": {
            "$ref": "./examples/ElasticPoolUpdateMax.json"
          },
          "Update elastic pool min": {
            "$ref": "./examples/ElasticPoolUpdateMin.json"
          }
        },
        "x-ms-long-running-operation": true
      },
      "put": {
        "parameters": [
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ApiVersionParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../common/v1/types.json#/components/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the elastic pool to be operated on (updated or created).",
            "in": "path",
            "name": "elasticPoolName",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElasticPool"
                }
              }
            },
            "description": "OK"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElasticPool"
                }
              }
            },
            "description": "Created"
          },
          "202": {
            "description": "Accepted"
          }
        },
        "tags": [
          "ElasticPools"
        ],
        "description": "Creates a new elastic pool or updates an existing elastic pool.",
        "operationId": "ElasticPools_CreateOrUpdate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ElasticPool"
              }
            }
          },
          "description": "The required parameters for creating or updating an elastic pool.",
          "required": true
        },
        "x-ms-examples": {
          "Create elastic pool max": {
            "$ref": "./examples/ElasticPoolCreateOrUpdateMax.json"
          },
          "Create elastic pool min": {
            "$ref": "./examples/ElasticPoolCreateOrUpdateMin.json"
          }
        },
        "x-ms-long-running-operation": true
      }
    }
  },
  "components": {
    "parameters": {
      "DatabaseExpandParameter": {
        "description": "A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption.",
        "in": "query",
        "name": "$expand",
        "required": false,
        "schema": {
          "type": "string"
        },
        "x-ms-parameter-location": "method"
      },
      "ServerNameParameter": {
        "description": "The name of the server.",
        "in": "path",
        "name": "serverName",
        "required": true,
        "schema": {
          "type": "string"
        },
        "x-ms-parameter-location": "method"
      },
      "TransparentDataEncryptionNameParameter": {
        "description": "The name of the transparent data encryption configuration.",
        "in": "path",
        "name": "transparentDataEncryptionName",
        "required": true,
        "schema": {
          "enum": [
            "current"
          ],
          "type": "string"
        },
        "x-ms-enum": {
          "modelAsString": true,
          "name": "TransparentDataEncryptionName"
        },
        "x-ms-parameter-location": "method"
      }
    },
    "schemas": {
      "ElasticPool": {
        "allOf": [
          {
            "$ref": "../../../common/v1/types.json#/definitions/TrackedResource"
          }
        ],
        "description": "Represents a database elastic pool.",
        "properties": {
          "kind": {
            "description": "Kind of elastic pool.  This is metadata used for the Azure portal experience.",
            "readOnly": true,
            "type": "string"
          },
          "properties": {
            "$ref": "#/components/schemas/ElasticPoolProperties",
            "description": "The properties representing the resource.",
            "x-ms-client-flatten": true
          }
        },
        "type": "object"
      },
      "ElasticPoolListResult": {
        "description": "Represents the response to a list elastic pool request.",
        "properties": {
          "value": {
            "description": "The list of elastic pools hosted in the server.",
            "items": {
              "$ref": "#/components/schemas/ElasticPool"
            },
            "type": "array"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "ElasticPoolProperties": {
        "description": "Represents the properties of an elastic pool.",
        "properties": {
          "creationDate": {
            "description": "The creation date of the elastic pool (ISO8601 format).",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "databaseDtuMax": {
            "description": "The maximum DTU any one database can consume.",
            "format": "int32",
            "type": "integer"
          },
          "databaseDtuMin": {
            "description": "The minimum DTU all databases are guaranteed.",
            "format": "int32",
            "type": "integer"
          },
          "dtu": {
            "description": "The total shared DTU for the database elastic pool.",
            "format": "int32",
            "type": "integer"
          },
          "edition": {
            "description": "The edition of the elastic pool.",
            "enum": [
              "Basic",
              "Standard",
              "Premium",
              "GeneralPurpose",
              "BusinessCritical"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": true,
              "name": "ElasticPoolEdition"
            },
            "x-ms-mutability": [
              "create",
              "read"
            ]
          },
          "state": {
            "description": "The state of the elastic pool.",
            "enum": [
              "Creating",
              "Ready",
              "Disabled"
            ],
            "readOnly": true,
            "type": "string",
            "x-ms-enum": {
              "modelAsString": true,
              "name": "ElasticPoolState"
            }
          },
          "storageMB": {
            "description": "Gets storage limit for the database elastic pool in MB.",
            "format": "int32",
            "type": "integer"
          },
          "zoneRedundant": {
            "description": "Whether or not this database elastic pool is zone redundant, which means the replicas of this database will be spread across multiple availability zones.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ElasticPoolUpdate": {
        "allOf": [
          {
            "$ref": "../../../common/v1/types.json#/definitions/Resource"
          }
        ],
        "description": "Represents an elastic pool update.",
        "properties": {
          "tags": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Resource tags.",
            "type": "object"
          },
          "properties": {
            "$ref": "#/components/schemas/ElasticPoolProperties",
            "description": "The properties representing the resource.",
            "x-ms-client-flatten": true
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "azure_auth": {
        "description": "Azure Active Directory OAuth2 Flow",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
            "scopes": {
              "user_impersonation": "impersonate your user account"
            }
          }
        },
        "type": "oauth2"
      }
    }
  }
}