Skip to content

Commit

Permalink
Add SQL DB v5 SDK (#12107)
Browse files Browse the repository at this point in the history
* add v5 sdk

* change recommendedAction.

* update a min sdk

* replace RecommendedAction defs with common type

* remove redundant defs in the 2014-04-01 legacy files.

* add RestorableDroppedDatabase json file.

* update RecommendedAction

* update update swagger to use 2020-11-01 preview spec

* revert int format change
  • Loading branch information
ericshape authored Apr 6, 2021
1 parent 2065a4f commit a29ea7c
Show file tree
Hide file tree
Showing 13 changed files with 1,367 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@
"RecommendedAction": {
"description": "Database, Server or Elastic Pool Recommended Action.",
"type": "object",
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
}
],
"properties": {
"kind": {
"description": "Resource kind.",
Expand All @@ -596,21 +601,6 @@
"$ref": "#/definitions/RecommendedActionProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
},
"id": {
"description": "Resource ID.",
"type": "string",
"readOnly": true
},
"name": {
"description": "Resource name.",
"type": "string",
"readOnly": true
},
"type": {
"description": "Resource type.",
"type": "string",
"readOnly": true
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,11 @@
"RecommendedAction": {
"description": "Database, Server or Elastic Pool Recommended Action.",
"type": "object",
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
}
],
"properties": {
"kind": {
"description": "Resource kind.",
Expand All @@ -587,21 +592,6 @@
"$ref": "#/definitions/RecommendedActionProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
},
"id": {
"description": "Resource ID.",
"type": "string",
"readOnly": true
},
"name": {
"description": "Resource name.",
"type": "string",
"readOnly": true
},
"type": {
"description": "Resource type.",
"type": "string",
"readOnly": true
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@
"RecommendedAction": {
"description": "Database, Server or Elastic Pool Recommended Action.",
"type": "object",
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
}
],
"properties": {
"kind": {
"description": "Resource kind.",
Expand All @@ -596,21 +601,6 @@
"$ref": "#/definitions/RecommendedActionProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
},
"id": {
"description": "Resource ID.",
"type": "string",
"readOnly": true
},
"name": {
"description": "Resource name.",
"type": "string",
"readOnly": true
},
"type": {
"description": "Resource type.",
"type": "string",
"readOnly": true
}
}
},
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,11 @@
"RecommendedAction": {
"description": "Database, Server or Elastic Pool Recommended Action.",
"type": "object",
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
}
],
"properties": {
"kind": {
"description": "Resource kind.",
Expand All @@ -587,21 +592,6 @@
"$ref": "#/definitions/RecommendedActionProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
},
"id": {
"description": "Resource ID.",
"type": "string",
"readOnly": true
},
"name": {
"description": "Resource name.",
"type": "string",
"readOnly": true
},
"type": {
"description": "Resource type.",
"type": "string",
"readOnly": true
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
{
"swagger": "2.0",
"info": {
"title": "Azure SQL Database Backup",
"description": "Provides read functionality for Azure SQL Database Backups",
"version": "2014-04-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}": {
"get": {
"tags": [
"RecoverableDatabases"
],
"operationId": "RecoverableDatabases_Get",
"description": "Gets a recoverable database, which is a resource representing a database's geo backup",
"x-ms-examples": {
"Get a recoverable database": {
"$ref": "./examples/RecoverableDatabaseGet.json"
}
},
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"name": "databaseName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/RecoverableDatabase"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases": {
"get": {
"tags": [
"RecoverableDatabases"
],
"operationId": "RecoverableDatabases_ListByServer",
"description": "Gets a list of recoverable databases",
"x-ms-examples": {
"Get list of restorable dropped databases": {
"$ref": "./examples/RecoverableDatabaseList.json"
}
},
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/RecoverableDatabaseListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
}
},
"definitions": {
"RecoverableDatabaseProperties": {
"properties": {
"edition": {
"readOnly": true,
"type": "string",
"description": "The edition of the database"
},
"serviceLevelObjective": {
"readOnly": true,
"type": "string",
"description": "The service level objective name of the database"
},
"elasticPoolName": {
"readOnly": true,
"type": "string",
"description": "The elastic pool name of the database"
},
"lastAvailableBackupDate": {
"readOnly": true,
"type": "string",
"format": "date-time",
"description": "The last available backup date of the database (ISO8601 format)"
}
},
"description": "The properties of a recoverable database"
},
"RecoverableDatabase": {
"properties": {
"properties": {
"$ref": "#/definitions/RecoverableDatabaseProperties",
"description": "The properties of a recoverable database",
"x-ms-client-flatten": true
}
},
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
}
],
"description": "A recoverable database"
},
"RecoverableDatabaseListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/RecoverableDatabase"
},
"description": "A list of recoverable databases"
}
},
"required": [
"value"
],
"description": "The response to a list recoverable databases request"
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the server.",
"x-ms-parameter-location": "method"
},
"DatabaseExpandParameter": {
"name": "$expand",
"in": "query",
"required": false,
"type": "string",
"description": "A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption.",
"x-ms-parameter-location": "method"
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"errorCode": null,
"errorMessage": null,
"errorSeverity": null,
"startTime": "2016-10-23T03:07:12.577",
"endTime": "2016-10-23T03:08:02.95",
"startTime": "2016-10-23T03:07:12.57Z",
"endTime": "2016-10-23T03:08:02.95Z",
"percentComplete": 100,
"currentServiceObjective": "ElasticPool",
"requestedServiceObjective": null,
Expand All @@ -47,8 +47,8 @@
"errorCode": null,
"errorMessage": null,
"errorSeverity": null,
"startTime": "2016-10-23T03:06:11.19",
"endTime": "2016-10-23T03:06:49.197",
"startTime": "2016-10-23T03:06:11.19Z",
"endTime": "2016-10-23T03:06:49.19Z",
"percentComplete": 100,
"currentServiceObjective": "ElasticPool",
"requestedServiceObjective": null,
Expand Down
Loading

0 comments on commit a29ea7c

Please sign in to comment.