Skip to content

Commit f7e63ee

Browse files
hmansariHaris Mahmood Ansari
andauthored
Swagger changes for retention policy properties (#15986)
* Swagger changes for retention policy properties Changes: * Updated examples and swagger json for sql database * Swagger changes for retention policy properties Changes: * Updated examples and swagger json for sql database * addressed comment to fix ref * fixed model validation Co-authored-by: Haris Mahmood Ansari <hansari@microsoft.com>
1 parent e687b0f commit f7e63ee

File tree

6 files changed

+144
-54
lines changed

6 files changed

+144
-54
lines changed

specification/synapse/resource-manager/Microsoft.Synapse/preview/2020-04-01-preview/examples/DeleteSqlDatabase.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"parameters": {
3-
"subscriptionId": "2f3558ae-f104-4a73-851c-e65379e2b603",
4-
"resourceGroupName": "rg_0d5198a3-5ea3-4764-881b-3add9685f04a",
5-
"workspaceName": "srv_c038a93a-ec62-41e2-ba6d-43241e032800",
6-
"sqlDatabaseName": "77b1b250-7830-4e9e-bae2-4fef2ae1629a",
3+
"subscriptionId": "d97f5ff4-e932-4417-a1e3-57455bc02229",
4+
"resourceGroupName": "rg_21968440-8f29-4b52-95d4-e0fb9d643fa2",
5+
"workspaceName": "srv_6800e875-428a-4a19-b32b-b178d715c826",
6+
"sqlDatabaseName": "bfd17fc3-43d5-4fbe-8015-dfab1de83232",
77
"api-version": "2020-04-01-preview"
88
},
99
"responses": {

specification/synapse/resource-manager/Microsoft.Synapse/preview/2020-04-01-preview/examples/GetSqlDatabase.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"parameters": {
3-
"subscriptionId": "be5385c6-6a34-406c-a2f9-385075bcfdfd",
4-
"resourceGroupName": "rg_b912b40b-7bb5-46ef-a140-46a23db11507",
5-
"workspaceName": "srv_c52efdc9-f302-4686-a871-be9960d20510",
6-
"sqlDatabaseName": "ce71c93c-ba61-47b9-b382-8e463e147233",
3+
"subscriptionId": "3e22dc2b-f067-4200-ae62-51a9fc5a98be",
4+
"resourceGroupName": "rg_ce41f089-933e-4807-b350-1938dccc5c2d",
5+
"workspaceName": "srv_8cd43a21-2396-4ebf-9fa5-df49de3e9e4e",
6+
"sqlDatabaseName": "ec9cb811-30d3-41e7-8a8b-90d83f39c9e5",
77
"api-version": "2020-04-01-preview"
88
},
99
"responses": {
@@ -18,12 +18,18 @@
1818
"lastModifiedAt": "2015-02-03T04:05:06Z"
1919
},
2020
"properties": {
21+
"status": "Online",
2122
"collation": "SQL_Latin1_General_CP1_CI_AS",
22-
"databaseGuid": "00000000-0000-0000-0000-000000000004"
23+
"databaseGuid": "00000000-0000-0000-0000-000000000004",
24+
"storageRedundancy": "Geo",
25+
"dataRetention": {
26+
"retentionPeriod": "PT0S",
27+
"dropRetentionPeriod": "P3D"
28+
}
2329
},
2430
"location": "westus",
25-
"id": "/subscriptions/be5385c6-6a34-406c-a2f9-385075bcfdfd/resourceGroups/rg_b912b40b-7bb5-46ef-a140-46a23db11507/providers/Microsoft.Synapse/workspaces/srv_c52efdc9-f302-4686-a871-be9960d20510/sqlDatabases/ce71c93c-ba61-47b9-b382-8e463e147233",
26-
"name": "ce71c93c-ba61-47b9-b382-8e463e147233",
31+
"id": "/subscriptions/3e22dc2b-f067-4200-ae62-51a9fc5a98be/resourceGroups/rg_ce41f089-933e-4807-b350-1938dccc5c2d/providers/Microsoft.Synapse/workspaces/srv_8cd43a21-2396-4ebf-9fa5-df49de3e9e4e/sqlDatabases/ec9cb811-30d3-41e7-8a8b-90d83f39c9e5",
32+
"name": "ec9cb811-30d3-41e7-8a8b-90d83f39c9e5",
2733
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
2834
}
2935
}

specification/synapse/resource-manager/Microsoft.Synapse/preview/2020-04-01-preview/examples/ListSqlDatabasesByWorkspace.json

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"parameters": {
3-
"subscriptionId": "31a4e624-29fd-48db-b875-c6f4b33bb0d8",
4-
"resourceGroupName": "rg_6dba758f-d8a3-4c8d-82e8-b4cfea8694cb",
5-
"workspaceName": "srv_c839a9e6-9103-4c47-bbc7-f7f3b8760682",
3+
"subscriptionId": "3d81f341-89a7-4d4a-8e31-e8c4b8a1736a",
4+
"resourceGroupName": "rg_484c3f6e-e373-4b29-a8e4-8cbe71a08abf",
5+
"workspaceName": "srv_e713b78b-4c2d-4d67-882d-4bbb47dc534b",
66
"api-version": "2020-04-01-preview"
77
},
88
"responses": {
@@ -19,12 +19,18 @@
1919
"lastModifiedAt": "2015-02-03T04:05:06Z"
2020
},
2121
"properties": {
22+
"status": "Online",
2223
"collation": "SQL_Latin1_General_CP1_CI_AS",
23-
"databaseGuid": "00000000-0000-0000-0000-000000000004"
24+
"databaseGuid": "00000000-0000-0000-0000-000000000004",
25+
"storageRedundancy": "Geo",
26+
"dataRetention": {
27+
"retentionPeriod": "PT0S",
28+
"dropRetentionPeriod": "P3D"
29+
}
2430
},
2531
"location": "westus",
26-
"id": "/subscriptions/31a4e624-29fd-48db-b875-c6f4b33bb0d8/resourceGroups/rg_6dba758f-d8a3-4c8d-82e8-b4cfea8694cb/providers/Microsoft.Synapse/workspaces/srv_c839a9e6-9103-4c47-bbc7-f7f3b8760682/sqlDatabases/ac9cb38c-2061-475e-85aa-5b0fe0df409c",
27-
"name": "ac9cb38c-2061-475e-85aa-5b0fe0df409c",
32+
"id": "/subscriptions/3d81f341-89a7-4d4a-8e31-e8c4b8a1736a/resourceGroups/rg_484c3f6e-e373-4b29-a8e4-8cbe71a08abf/providers/Microsoft.Synapse/workspaces/srv_e713b78b-4c2d-4d67-882d-4bbb47dc534b/sqlDatabases/f696e2b1-41f9-45e1-a5b7-84a363894da3",
33+
"name": "f696e2b1-41f9-45e1-a5b7-84a363894da3",
2834
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
2935
},
3036
{
@@ -37,12 +43,18 @@
3743
"lastModifiedAt": "2020-02-03T04:05:06Z"
3844
},
3945
"properties": {
46+
"status": "Online",
4047
"collation": "SQL_Latin1_General_CP1_CI_AS",
41-
"databaseGuid": "00000000-0000-0000-0000-000000000004"
48+
"databaseGuid": "00000000-0000-0000-0000-000000000004",
49+
"storageRedundancy": "Geo",
50+
"dataRetention": {
51+
"retentionPeriod": "PT0S",
52+
"dropRetentionPeriod": "P3D"
53+
}
4254
},
4355
"location": "westus",
44-
"id": "/subscriptions/31a4e624-29fd-48db-b875-c6f4b33bb0d8/resourceGroups/rg_6dba758f-d8a3-4c8d-82e8-b4cfea8694cb/providers/Microsoft.Synapse/workspaces/srv_c839a9e6-9103-4c47-bbc7-f7f3b8760682/sqlDatabases/9e5f5f6e-50b7-4e28-a27d-550f3d8cb780",
45-
"name": "9e5f5f6e-50b7-4e28-a27d-550f3d8cb780",
56+
"id": "/subscriptions/3d81f341-89a7-4d4a-8e31-e8c4b8a1736a/resourceGroups/rg_484c3f6e-e373-4b29-a8e4-8cbe71a08abf/providers/Microsoft.Synapse/workspaces/srv_e713b78b-4c2d-4d67-882d-4bbb47dc534b/sqlDatabases/704d6f3a-ee67-4a24-8257-3150d5e135ad",
57+
"name": "704d6f3a-ee67-4a24-8257-3150d5e135ad",
4658
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
4759
}
4860
]

specification/synapse/resource-manager/Microsoft.Synapse/preview/2020-04-01-preview/examples/PatchSqlDatabase.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"parameters": {
3-
"subscriptionId": "b431a23e-2678-45da-9dfc-2e0bc8f1b8cb",
4-
"resourceGroupName": "rg_0e643e48-6f86-46cf-99f2-aa1ab47afa63",
5-
"workspaceName": "srv_5694fdc5-e11f-45a3-85c0-25e90909a391",
6-
"sqlDatabaseName": "5f3ea441-d318-4f98-9789-192498a0e176",
3+
"subscriptionId": "de955929-747b-405e-9372-ebbcd2deb16d",
4+
"resourceGroupName": "rg_a37bc231-15af-4eae-80e0-d5ac28d81a7e",
5+
"workspaceName": "srv_57f206e0-c133-466d-953c-e347eecfb01c",
6+
"sqlDatabaseName": "18058c80-9e50-4372-b41b-f51b591698c0",
77
"api-version": "2020-04-01-preview",
88
"parameters": {}
99
},
@@ -20,12 +20,18 @@
2020
"lastModifiedAt": "2020-06-03T04:05:06Z"
2121
},
2222
"properties": {
23+
"status": "Online",
2324
"collation": "SQL_Latin1_General_CP1_CI_AS",
24-
"databaseGuid": "00000000-0000-0000-0000-000000000004"
25+
"databaseGuid": "00000000-0000-0000-0000-000000000004",
26+
"storageRedundancy": "Geo",
27+
"dataRetention": {
28+
"retentionPeriod": "PT0S",
29+
"dropRetentionPeriod": "P3D"
30+
}
2531
},
2632
"location": "westus",
27-
"id": "/subscriptions/b431a23e-2678-45da-9dfc-2e0bc8f1b8cb/resourceGroups/rg_0e643e48-6f86-46cf-99f2-aa1ab47afa63/providers/Microsoft.Synapse/workspaces/srv_5694fdc5-e11f-45a3-85c0-25e90909a391/sqlDatabases/5f3ea441-d318-4f98-9789-192498a0e176",
28-
"name": "5f3ea441-d318-4f98-9789-192498a0e176",
33+
"id": "/subscriptions/de955929-747b-405e-9372-ebbcd2deb16d/resourceGroups/rg_a37bc231-15af-4eae-80e0-d5ac28d81a7e/providers/Microsoft.Synapse/workspaces/srv_57f206e0-c133-466d-953c-e347eecfb01c/sqlDatabases/18058c80-9e50-4372-b41b-f51b591698c0",
34+
"name": "18058c80-9e50-4372-b41b-f51b591698c0",
2935
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
3036
}
3137
}

specification/synapse/resource-manager/Microsoft.Synapse/preview/2020-04-01-preview/examples/PutSqlDatabase.json

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
{
22
"parameters": {
3-
"subscriptionId": "d9e39bed-00e1-4f5e-883e-6d94be335056",
4-
"resourceGroupName": "rg_88eed28c-5243-4f02-8251-bfa1e69e7057",
5-
"workspaceName": "srv_85d31a1e-718b-4bda-9e53-a91230dd4ce5",
6-
"sqlDatabaseName": "73164535-f22d-4daa-b014-1f23bbe361b7",
3+
"subscriptionId": "e682b8de-be70-4b81-a931-1699b27e2a92",
4+
"resourceGroupName": "rg_bfd258ab-71bb-4a86-bf48-076df66c8640",
5+
"workspaceName": "srv_b33229ec-42a0-4929-9883-7f46e1b75c2f",
6+
"sqlDatabaseName": "113a9eb2-7d40-4009-9dcb-b42daade3760",
77
"api-version": "2020-04-01-preview",
88
"parameters": {
99
"tags": {
1010
"tag1": "val1"
1111
},
12-
"location": "westus"
12+
"location": "westus",
13+
"properties": {
14+
"storageRedundancy": "Geo",
15+
"dataRetention": {
16+
"retentionPeriod": "PT0S",
17+
"dropRetentionPeriod": "P3D"
18+
}
19+
}
1320
}
1421
},
1522
"responses": {
1623
"202": {},
17-
"201": {
24+
"200": {
1825
"body": {
1926
"systemData": {
2027
"createdBy": "string",
@@ -25,16 +32,22 @@
2532
"lastModifiedAt": "2020-06-03T04:05:06Z"
2633
},
2734
"properties": {
35+
"status": "Online",
2836
"collation": "SQL_Latin1_General_CP1_CI_AS",
29-
"databaseGuid": "00000000-0000-0000-0000-000000000004"
37+
"databaseGuid": "00000000-0000-0000-0000-000000000004",
38+
"storageRedundancy": "Geo",
39+
"dataRetention": {
40+
"retentionPeriod": "PT0S",
41+
"dropRetentionPeriod": "P3D"
42+
}
3043
},
3144
"location": "westus",
32-
"id": "/subscriptions/d9e39bed-00e1-4f5e-883e-6d94be335056/resourceGroups/rg_88eed28c-5243-4f02-8251-bfa1e69e7057/providers/Microsoft.Synapse/workspaces/srv_85d31a1e-718b-4bda-9e53-a91230dd4ce5/sqlDatabases/73164535-f22d-4daa-b014-1f23bbe361b7",
33-
"name": "73164535-f22d-4daa-b014-1f23bbe361b7",
45+
"id": "/subscriptions/e682b8de-be70-4b81-a931-1699b27e2a92/resourceGroups/rg_bfd258ab-71bb-4a86-bf48-076df66c8640/providers/Microsoft.Synapse/workspaces/srv_b33229ec-42a0-4929-9883-7f46e1b75c2f/sqlDatabases/113a9eb2-7d40-4009-9dcb-b42daade3760",
46+
"name": "113a9eb2-7d40-4009-9dcb-b42daade3760",
3447
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
3548
}
3649
},
37-
"200": {
50+
"201": {
3851
"body": {
3952
"systemData": {
4053
"createdBy": "string",
@@ -45,12 +58,18 @@
4558
"lastModifiedAt": "2020-06-03T04:05:06Z"
4659
},
4760
"properties": {
61+
"status": "Online",
4862
"collation": "SQL_Latin1_General_CP1_CI_AS",
49-
"databaseGuid": "00000000-0000-0000-0000-000000000004"
63+
"databaseGuid": "00000000-0000-0000-0000-000000000004",
64+
"storageRedundancy": "Geo",
65+
"dataRetention": {
66+
"retentionPeriod": "PT0S",
67+
"dropRetentionPeriod": "P3D"
68+
}
5069
},
5170
"location": "westus",
52-
"id": "/subscriptions/3e8c19f4-eeef-4cb9-bc14-2c3dd459e8a8/resourceGroups/rg_ce5b9d27-ae43-4fe0-986e-95d1df21adf5/providers/Microsoft.Synapse/workspaces/srv_6eeb976d-3b48-4a1f-b45f-d59797b23dac/sqlDatabases/428975cf-c682-4347-8412-468fcf11f988",
53-
"name": "428975cf-c682-4347-8412-468fcf11f988",
71+
"id": "/subscriptions/02efa278-768f-41fb-8911-6fa67f21e9e9/resourceGroups/rg_8ac20389-0703-435f-a245-2d1bc88d948e/providers/Microsoft.Synapse/workspaces/srv_170600e9-bfc2-44ee-8f15-4bd34090cc83/sqlDatabases/ef1812fe-c621-40df-84ec-5bebff823327",
72+
"name": "ef1812fe-c621-40df-84ec-5bebff823327",
5473
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
5574
}
5675
}

specification/synapse/resource-manager/Microsoft.Synapse/preview/2020-04-01-preview/sqlDatabase.json

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,38 @@
277277
"description": "The sql database's properties.",
278278
"type": "object",
279279
"properties": {
280+
"status": {
281+
"description": "The status of the database.",
282+
"enum": [
283+
"Online",
284+
"Restoring",
285+
"RecoveryPending",
286+
"Recovering",
287+
"Suspect",
288+
"Offline",
289+
"Standby",
290+
"Shutdown",
291+
"EmergencyMode",
292+
"AutoClosed",
293+
"Copying",
294+
"Creating",
295+
"Inaccessible",
296+
"OfflineSecondary",
297+
"Pausing",
298+
"Paused",
299+
"Resuming",
300+
"Scaling",
301+
"OfflineChangingDwPerformanceTiers",
302+
"OnlineChangingDwPerformanceTiers",
303+
"Disabled"
304+
],
305+
"type": "string",
306+
"readOnly": true,
307+
"x-ms-enum": {
308+
"name": "DatabaseStatus",
309+
"modelAsString": true
310+
}
311+
},
280312
"collation": {
281313
"description": "The collation of the database.",
282314
"type": "string",
@@ -285,34 +317,49 @@
285317
"create"
286318
]
287319
},
320+
"databaseGuid": {
321+
"format": "uuid",
322+
"description": "The Guid of the database.",
323+
"type": "string",
324+
"readOnly": true
325+
},
288326
"storageRedundancy": {
289-
"description": "Storage redundancy of the database.",
327+
"description": "The storage redundancy of the database.",
290328
"enum": [
291-
"Geo",
292-
"GeoZone",
293329
"Local",
294-
"Zone"
330+
"Geo",
331+
"Zone",
332+
"GeoZone"
295333
],
296334
"type": "string",
297335
"x-ms-enum": {
298-
"name": "SqlDatabaseStorageRedundancyType",
336+
"name": "StorageRedundancy",
299337
"modelAsString": true
300338
},
301339
"x-ms-mutability": [
302340
"read",
303341
"create"
304342
]
305343
},
306-
"databaseGuid": {
307-
"format": "uuid",
308-
"description": "The Guid of the database.",
309-
"type": "string",
310-
"readOnly": true
344+
"dataRetention": {
345+
"$ref": "#/definitions/SqlDatabaseDataRetention",
346+
"description": "Sql database data retention."
347+
}
348+
}
349+
},
350+
"SqlDatabaseDataRetention": {
351+
"description": "Sql database data retention.",
352+
"type": "object",
353+
"properties": {
354+
"retentionPeriod": {
355+
"format": "duration",
356+
"description": "Specifies the data retention period (ISO8601 format).",
357+
"type": "string"
311358
},
312-
"status": {
313-
"description": "Status of the database.",
314-
"type": "string",
315-
"readOnly": true
359+
"dropRetentionPeriod": {
360+
"format": "duration",
361+
"description": "Specifies the dropped database retention period (ISO8601 format).",
362+
"type": "string"
316363
}
317364
}
318365
},

0 commit comments

Comments
 (0)