Skip to content

Commit

Permalink
Swagger changes for retention policy properties (Azure#15986)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
2 people authored and LeiWang3 committed Mar 31, 2022
1 parent a5046a6 commit 6c55ae9
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 54 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"parameters": {
"subscriptionId": "2f3558ae-f104-4a73-851c-e65379e2b603",
"resourceGroupName": "rg_0d5198a3-5ea3-4764-881b-3add9685f04a",
"workspaceName": "srv_c038a93a-ec62-41e2-ba6d-43241e032800",
"sqlDatabaseName": "77b1b250-7830-4e9e-bae2-4fef2ae1629a",
"subscriptionId": "d97f5ff4-e932-4417-a1e3-57455bc02229",
"resourceGroupName": "rg_21968440-8f29-4b52-95d4-e0fb9d643fa2",
"workspaceName": "srv_6800e875-428a-4a19-b32b-b178d715c826",
"sqlDatabaseName": "bfd17fc3-43d5-4fbe-8015-dfab1de83232",
"api-version": "2020-04-01-preview"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"parameters": {
"subscriptionId": "be5385c6-6a34-406c-a2f9-385075bcfdfd",
"resourceGroupName": "rg_b912b40b-7bb5-46ef-a140-46a23db11507",
"workspaceName": "srv_c52efdc9-f302-4686-a871-be9960d20510",
"sqlDatabaseName": "ce71c93c-ba61-47b9-b382-8e463e147233",
"subscriptionId": "3e22dc2b-f067-4200-ae62-51a9fc5a98be",
"resourceGroupName": "rg_ce41f089-933e-4807-b350-1938dccc5c2d",
"workspaceName": "srv_8cd43a21-2396-4ebf-9fa5-df49de3e9e4e",
"sqlDatabaseName": "ec9cb811-30d3-41e7-8a8b-90d83f39c9e5",
"api-version": "2020-04-01-preview"
},
"responses": {
Expand All @@ -18,12 +18,18 @@
"lastModifiedAt": "2015-02-03T04:05:06Z"
},
"properties": {
"status": "Online",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"databaseGuid": "00000000-0000-0000-0000-000000000004"
"databaseGuid": "00000000-0000-0000-0000-000000000004",
"storageRedundancy": "Geo",
"dataRetention": {
"retentionPeriod": "PT0S",
"dropRetentionPeriod": "P3D"
}
},
"location": "westus",
"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",
"name": "ce71c93c-ba61-47b9-b382-8e463e147233",
"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",
"name": "ec9cb811-30d3-41e7-8a8b-90d83f39c9e5",
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"parameters": {
"subscriptionId": "31a4e624-29fd-48db-b875-c6f4b33bb0d8",
"resourceGroupName": "rg_6dba758f-d8a3-4c8d-82e8-b4cfea8694cb",
"workspaceName": "srv_c839a9e6-9103-4c47-bbc7-f7f3b8760682",
"subscriptionId": "3d81f341-89a7-4d4a-8e31-e8c4b8a1736a",
"resourceGroupName": "rg_484c3f6e-e373-4b29-a8e4-8cbe71a08abf",
"workspaceName": "srv_e713b78b-4c2d-4d67-882d-4bbb47dc534b",
"api-version": "2020-04-01-preview"
},
"responses": {
Expand All @@ -19,12 +19,18 @@
"lastModifiedAt": "2015-02-03T04:05:06Z"
},
"properties": {
"status": "Online",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"databaseGuid": "00000000-0000-0000-0000-000000000004"
"databaseGuid": "00000000-0000-0000-0000-000000000004",
"storageRedundancy": "Geo",
"dataRetention": {
"retentionPeriod": "PT0S",
"dropRetentionPeriod": "P3D"
}
},
"location": "westus",
"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",
"name": "ac9cb38c-2061-475e-85aa-5b0fe0df409c",
"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",
"name": "f696e2b1-41f9-45e1-a5b7-84a363894da3",
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
},
{
Expand All @@ -37,12 +43,18 @@
"lastModifiedAt": "2020-02-03T04:05:06Z"
},
"properties": {
"status": "Online",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"databaseGuid": "00000000-0000-0000-0000-000000000004"
"databaseGuid": "00000000-0000-0000-0000-000000000004",
"storageRedundancy": "Geo",
"dataRetention": {
"retentionPeriod": "PT0S",
"dropRetentionPeriod": "P3D"
}
},
"location": "westus",
"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",
"name": "9e5f5f6e-50b7-4e28-a27d-550f3d8cb780",
"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",
"name": "704d6f3a-ee67-4a24-8257-3150d5e135ad",
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"parameters": {
"subscriptionId": "b431a23e-2678-45da-9dfc-2e0bc8f1b8cb",
"resourceGroupName": "rg_0e643e48-6f86-46cf-99f2-aa1ab47afa63",
"workspaceName": "srv_5694fdc5-e11f-45a3-85c0-25e90909a391",
"sqlDatabaseName": "5f3ea441-d318-4f98-9789-192498a0e176",
"subscriptionId": "de955929-747b-405e-9372-ebbcd2deb16d",
"resourceGroupName": "rg_a37bc231-15af-4eae-80e0-d5ac28d81a7e",
"workspaceName": "srv_57f206e0-c133-466d-953c-e347eecfb01c",
"sqlDatabaseName": "18058c80-9e50-4372-b41b-f51b591698c0",
"api-version": "2020-04-01-preview",
"parameters": {}
},
Expand All @@ -20,12 +20,18 @@
"lastModifiedAt": "2020-06-03T04:05:06Z"
},
"properties": {
"status": "Online",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"databaseGuid": "00000000-0000-0000-0000-000000000004"
"databaseGuid": "00000000-0000-0000-0000-000000000004",
"storageRedundancy": "Geo",
"dataRetention": {
"retentionPeriod": "PT0S",
"dropRetentionPeriod": "P3D"
}
},
"location": "westus",
"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",
"name": "5f3ea441-d318-4f98-9789-192498a0e176",
"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",
"name": "18058c80-9e50-4372-b41b-f51b591698c0",
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
{
"parameters": {
"subscriptionId": "d9e39bed-00e1-4f5e-883e-6d94be335056",
"resourceGroupName": "rg_88eed28c-5243-4f02-8251-bfa1e69e7057",
"workspaceName": "srv_85d31a1e-718b-4bda-9e53-a91230dd4ce5",
"sqlDatabaseName": "73164535-f22d-4daa-b014-1f23bbe361b7",
"subscriptionId": "e682b8de-be70-4b81-a931-1699b27e2a92",
"resourceGroupName": "rg_bfd258ab-71bb-4a86-bf48-076df66c8640",
"workspaceName": "srv_b33229ec-42a0-4929-9883-7f46e1b75c2f",
"sqlDatabaseName": "113a9eb2-7d40-4009-9dcb-b42daade3760",
"api-version": "2020-04-01-preview",
"parameters": {
"tags": {
"tag1": "val1"
},
"location": "westus"
"location": "westus",
"properties": {
"storageRedundancy": "Geo",
"dataRetention": {
"retentionPeriod": "PT0S",
"dropRetentionPeriod": "P3D"
}
}
}
},
"responses": {
"202": {},
"201": {
"200": {
"body": {
"systemData": {
"createdBy": "string",
Expand All @@ -25,16 +32,22 @@
"lastModifiedAt": "2020-06-03T04:05:06Z"
},
"properties": {
"status": "Online",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"databaseGuid": "00000000-0000-0000-0000-000000000004"
"databaseGuid": "00000000-0000-0000-0000-000000000004",
"storageRedundancy": "Geo",
"dataRetention": {
"retentionPeriod": "PT0S",
"dropRetentionPeriod": "P3D"
}
},
"location": "westus",
"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",
"name": "73164535-f22d-4daa-b014-1f23bbe361b7",
"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",
"name": "113a9eb2-7d40-4009-9dcb-b42daade3760",
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
}
},
"200": {
"201": {
"body": {
"systemData": {
"createdBy": "string",
Expand All @@ -45,12 +58,18 @@
"lastModifiedAt": "2020-06-03T04:05:06Z"
},
"properties": {
"status": "Online",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"databaseGuid": "00000000-0000-0000-0000-000000000004"
"databaseGuid": "00000000-0000-0000-0000-000000000004",
"storageRedundancy": "Geo",
"dataRetention": {
"retentionPeriod": "PT0S",
"dropRetentionPeriod": "P3D"
}
},
"location": "westus",
"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",
"name": "428975cf-c682-4347-8412-468fcf11f988",
"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",
"name": "ef1812fe-c621-40df-84ec-5bebff823327",
"type": "Microsoft.Synapse/workspaces/sqlDatabases"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,38 @@
"description": "The sql database's properties.",
"type": "object",
"properties": {
"status": {
"description": "The status of the database.",
"enum": [
"Online",
"Restoring",
"RecoveryPending",
"Recovering",
"Suspect",
"Offline",
"Standby",
"Shutdown",
"EmergencyMode",
"AutoClosed",
"Copying",
"Creating",
"Inaccessible",
"OfflineSecondary",
"Pausing",
"Paused",
"Resuming",
"Scaling",
"OfflineChangingDwPerformanceTiers",
"OnlineChangingDwPerformanceTiers",
"Disabled"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "DatabaseStatus",
"modelAsString": true
}
},
"collation": {
"description": "The collation of the database.",
"type": "string",
Expand All @@ -285,34 +317,49 @@
"create"
]
},
"databaseGuid": {
"format": "uuid",
"description": "The Guid of the database.",
"type": "string",
"readOnly": true
},
"storageRedundancy": {
"description": "Storage redundancy of the database.",
"description": "The storage redundancy of the database.",
"enum": [
"Geo",
"GeoZone",
"Local",
"Zone"
"Geo",
"Zone",
"GeoZone"
],
"type": "string",
"x-ms-enum": {
"name": "SqlDatabaseStorageRedundancyType",
"name": "StorageRedundancy",
"modelAsString": true
},
"x-ms-mutability": [
"read",
"create"
]
},
"databaseGuid": {
"format": "uuid",
"description": "The Guid of the database.",
"type": "string",
"readOnly": true
"dataRetention": {
"$ref": "#/definitions/SqlDatabaseDataRetention",
"description": "Sql database data retention."
}
}
},
"SqlDatabaseDataRetention": {
"description": "Sql database data retention.",
"type": "object",
"properties": {
"retentionPeriod": {
"format": "duration",
"description": "Specifies the data retention period (ISO8601 format).",
"type": "string"
},
"status": {
"description": "Status of the database.",
"type": "string",
"readOnly": true
"dropRetentionPeriod": {
"format": "duration",
"description": "Specifies the dropped database retention period (ISO8601 format).",
"type": "string"
}
}
},
Expand Down

0 comments on commit 6c55ae9

Please sign in to comment.