Skip to content

Commit ca2e7bd

Browse files
ericshapedabenhamMic
authored andcommitted
Add SQL DB v5 SDK (Azure#12107)
* 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
1 parent 236c658 commit ca2e7bd

File tree

13 files changed

+1367
-74
lines changed

13 files changed

+1367
-74
lines changed

specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/DatabaseAdvisors.json

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,11 @@
581581
"RecommendedAction": {
582582
"description": "Database, Server or Elastic Pool Recommended Action.",
583583
"type": "object",
584+
"allOf": [
585+
{
586+
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
587+
}
588+
],
584589
"properties": {
585590
"kind": {
586591
"description": "Resource kind.",
@@ -596,21 +601,6 @@
596601
"$ref": "#/definitions/RecommendedActionProperties",
597602
"description": "Resource properties.",
598603
"x-ms-client-flatten": true
599-
},
600-
"id": {
601-
"description": "Resource ID.",
602-
"type": "string",
603-
"readOnly": true
604-
},
605-
"name": {
606-
"description": "Resource name.",
607-
"type": "string",
608-
"readOnly": true
609-
},
610-
"type": {
611-
"description": "Resource type.",
612-
"type": "string",
613-
"readOnly": true
614604
}
615605
}
616606
},

specification/sql/resource-manager/Microsoft.Sql/preview/2020-02-02-preview/ServerAdvisors.json

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,11 @@
572572
"RecommendedAction": {
573573
"description": "Database, Server or Elastic Pool Recommended Action.",
574574
"type": "object",
575+
"allOf": [
576+
{
577+
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
578+
}
579+
],
575580
"properties": {
576581
"kind": {
577582
"description": "Resource kind.",
@@ -587,21 +592,6 @@
587592
"$ref": "#/definitions/RecommendedActionProperties",
588593
"description": "Resource properties.",
589594
"x-ms-client-flatten": true
590-
},
591-
"id": {
592-
"description": "Resource ID.",
593-
"type": "string",
594-
"readOnly": true
595-
},
596-
"name": {
597-
"description": "Resource name.",
598-
"type": "string",
599-
"readOnly": true
600-
},
601-
"type": {
602-
"description": "Resource type.",
603-
"type": "string",
604-
"readOnly": true
605595
}
606596
}
607597
},

specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/DatabaseAdvisors.json

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,11 @@
581581
"RecommendedAction": {
582582
"description": "Database, Server or Elastic Pool Recommended Action.",
583583
"type": "object",
584+
"allOf": [
585+
{
586+
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
587+
}
588+
],
584589
"properties": {
585590
"kind": {
586591
"description": "Resource kind.",
@@ -596,21 +601,6 @@
596601
"$ref": "#/definitions/RecommendedActionProperties",
597602
"description": "Resource properties.",
598603
"x-ms-client-flatten": true
599-
},
600-
"id": {
601-
"description": "Resource ID.",
602-
"type": "string",
603-
"readOnly": true
604-
},
605-
"name": {
606-
"description": "Resource name.",
607-
"type": "string",
608-
"readOnly": true
609-
},
610-
"type": {
611-
"description": "Resource type.",
612-
"type": "string",
613-
"readOnly": true
614604
}
615605
}
616606
},

specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/DatabaseOperations.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/DatabaseUsages.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/InstanceFailoverGroups.json

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

specification/sql/resource-manager/Microsoft.Sql/preview/2020-08-01-preview/ServerAdvisors.json

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,11 @@
572572
"RecommendedAction": {
573573
"description": "Database, Server or Elastic Pool Recommended Action.",
574574
"type": "object",
575+
"allOf": [
576+
{
577+
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
578+
}
579+
],
575580
"properties": {
576581
"kind": {
577582
"description": "Resource kind.",
@@ -587,21 +592,6 @@
587592
"$ref": "#/definitions/RecommendedActionProperties",
588593
"description": "Resource properties.",
589594
"x-ms-client-flatten": true
590-
},
591-
"id": {
592-
"description": "Resource ID.",
593-
"type": "string",
594-
"readOnly": true
595-
},
596-
"name": {
597-
"description": "Resource name.",
598-
"type": "string",
599-
"readOnly": true
600-
},
601-
"type": {
602-
"description": "Resource type.",
603-
"type": "string",
604-
"readOnly": true
605595
}
606596
}
607597
},
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Azure SQL Database Backup",
5+
"description": "Provides read functionality for Azure SQL Database Backups",
6+
"version": "2014-04-01"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"paths": {
19+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}": {
20+
"get": {
21+
"tags": [
22+
"RecoverableDatabases"
23+
],
24+
"operationId": "RecoverableDatabases_Get",
25+
"description": "Gets a recoverable database, which is a resource representing a database's geo backup",
26+
"x-ms-examples": {
27+
"Get a recoverable database": {
28+
"$ref": "./examples/RecoverableDatabaseGet.json"
29+
}
30+
},
31+
"parameters": [
32+
{
33+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
34+
},
35+
{
36+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
37+
},
38+
{
39+
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
40+
},
41+
{
42+
"$ref": "#/parameters/ServerNameParameter"
43+
},
44+
{
45+
"name": "databaseName",
46+
"in": "path",
47+
"required": true,
48+
"type": "string",
49+
"description": "The name of the database"
50+
}
51+
],
52+
"responses": {
53+
"200": {
54+
"description": "OK",
55+
"schema": {
56+
"$ref": "#/definitions/RecoverableDatabase"
57+
}
58+
}
59+
}
60+
}
61+
},
62+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases": {
63+
"get": {
64+
"tags": [
65+
"RecoverableDatabases"
66+
],
67+
"operationId": "RecoverableDatabases_ListByServer",
68+
"description": "Gets a list of recoverable databases",
69+
"x-ms-examples": {
70+
"Get list of restorable dropped databases": {
71+
"$ref": "./examples/RecoverableDatabaseList.json"
72+
}
73+
},
74+
"parameters": [
75+
{
76+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
77+
},
78+
{
79+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
80+
},
81+
{
82+
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
83+
},
84+
{
85+
"$ref": "#/parameters/ServerNameParameter"
86+
}
87+
],
88+
"responses": {
89+
"200": {
90+
"description": "OK",
91+
"schema": {
92+
"$ref": "#/definitions/RecoverableDatabaseListResult"
93+
}
94+
}
95+
},
96+
"x-ms-pageable": {
97+
"nextLinkName": null
98+
}
99+
}
100+
}
101+
},
102+
"definitions": {
103+
"RecoverableDatabaseProperties": {
104+
"properties": {
105+
"edition": {
106+
"readOnly": true,
107+
"type": "string",
108+
"description": "The edition of the database"
109+
},
110+
"serviceLevelObjective": {
111+
"readOnly": true,
112+
"type": "string",
113+
"description": "The service level objective name of the database"
114+
},
115+
"elasticPoolName": {
116+
"readOnly": true,
117+
"type": "string",
118+
"description": "The elastic pool name of the database"
119+
},
120+
"lastAvailableBackupDate": {
121+
"readOnly": true,
122+
"type": "string",
123+
"format": "date-time",
124+
"description": "The last available backup date of the database (ISO8601 format)"
125+
}
126+
},
127+
"description": "The properties of a recoverable database"
128+
},
129+
"RecoverableDatabase": {
130+
"properties": {
131+
"properties": {
132+
"$ref": "#/definitions/RecoverableDatabaseProperties",
133+
"description": "The properties of a recoverable database",
134+
"x-ms-client-flatten": true
135+
}
136+
},
137+
"allOf": [
138+
{
139+
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
140+
}
141+
],
142+
"description": "A recoverable database"
143+
},
144+
"RecoverableDatabaseListResult": {
145+
"properties": {
146+
"value": {
147+
"type": "array",
148+
"items": {
149+
"$ref": "#/definitions/RecoverableDatabase"
150+
},
151+
"description": "A list of recoverable databases"
152+
}
153+
},
154+
"required": [
155+
"value"
156+
],
157+
"description": "The response to a list recoverable databases request"
158+
}
159+
},
160+
"parameters": {
161+
"ServerNameParameter": {
162+
"name": "serverName",
163+
"in": "path",
164+
"required": true,
165+
"type": "string",
166+
"description": "The name of the server.",
167+
"x-ms-parameter-location": "method"
168+
},
169+
"DatabaseExpandParameter": {
170+
"name": "$expand",
171+
"in": "query",
172+
"required": false,
173+
"type": "string",
174+
"description": "A comma separated list of child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption.",
175+
"x-ms-parameter-location": "method"
176+
}
177+
},
178+
"securityDefinitions": {
179+
"azure_auth": {
180+
"type": "oauth2",
181+
"description": "Azure Active Directory OAuth2 Flow",
182+
"flow": "implicit",
183+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
184+
"scopes": {
185+
"user_impersonation": "impersonate your user account"
186+
}
187+
}
188+
}
189+
}

specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolDatabaseActivityList.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"errorCode": null,
2525
"errorMessage": null,
2626
"errorSeverity": null,
27-
"startTime": "2016-10-23T03:07:12.577",
28-
"endTime": "2016-10-23T03:08:02.95",
27+
"startTime": "2016-10-23T03:07:12.57Z",
28+
"endTime": "2016-10-23T03:08:02.95Z",
2929
"percentComplete": 100,
3030
"currentServiceObjective": "ElasticPool",
3131
"requestedServiceObjective": null,
@@ -47,8 +47,8 @@
4747
"errorCode": null,
4848
"errorMessage": null,
4949
"errorSeverity": null,
50-
"startTime": "2016-10-23T03:06:11.19",
51-
"endTime": "2016-10-23T03:06:49.197",
50+
"startTime": "2016-10-23T03:06:11.19Z",
51+
"endTime": "2016-10-23T03:06:49.19Z",
5252
"percentComplete": 100,
5353
"currentServiceObjective": "ElasticPool",
5454
"requestedServiceObjective": null,

0 commit comments

Comments
 (0)