Skip to content

Commit

Permalink
Swagger Documentation For Database Resource With Ledger (#13916)
Browse files Browse the repository at this point in the history
* adding database swagger files

* modifying example

* Fixing to be boolean

* adding database extensions and database operations

* adding other database examples

* removing database_legacy, adding usages

* removing usages

* removing databases_legacy from readme
  • Loading branch information
rewongmicrosoft authored Apr 25, 2021
1 parent 8a5411d commit bf832d4
Show file tree
Hide file tree
Showing 22 changed files with 230 additions and 1,177 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database."
"description": "*** Error Responses: ***\n\n * 400 MissingImportExportInputParameters - Missing ImportExport input parameters.\n\n * 400 PolybaseImportAuthenticationTypeNotSupported - Authentication type parameter is not support for PolybaseImport operation.\n\n * 400 DatabaseExtensionsInvalidOperationMode - Invalid operationMode parameter for database extension.\n\n * 400 DatabaseExtensionsInvalidStorageKeyType - The storage key type must by 'StorageAccessKey'.\n\n * 400 DatabaseExtensionsMissingStorageUri - Storage URI cannot be empty.\n\n * 400 InvalidOperationType - Provide a valid operation type.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 ImportExportJobError - The ImportExport operation has failed.\n\n * 400 BlockedByOutboundFirewall - The outbound firewall rules blocked the request.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ResourceNotFound - Invalid request specifying a non-existent resource.\n\n * 404 ImportExportOperationIdNotFound - The operation Id for import or export cannot be found.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ImportExportOperationInProgress - There is an import or export operation in progress on the database."
},
"202": {
"description": "Import/Export operation is in progress."
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Zone",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down Expand Up @@ -75,7 +76,8 @@
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Zone",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy",
Expand Down Expand Up @@ -80,7 +81,8 @@
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false,
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS"
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down Expand Up @@ -81,7 +82,8 @@
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false,
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS"
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "Default-SQL-SouthEastAsia",
"serverName": "testsvr",
"databaseName": "testdb",
"api-version": "2021-02-01-preview",
"parameters": {
"location": "southeastasia",
"properties": {
"isLedgerOn": true
}
}
},
"responses": {
"200": {
"body": {
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentServiceObjectiveName": "S0",
"currentBackupStorageRedundancy": "Geo",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false,
"isLedgerOn": true
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
"name": "testdb",
"type": "Microsoft.Sql/servers/databases"
}
},
"201": {
"body": {
"sku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"kind": "v12.0,user",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 268435456000,
"status": "Online",
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
"currentSku": {
"name": "Standard",
"tier": "Standard",
"capacity": 10
},
"creationDate": "2017-06-07T04:41:33.937Z",
"currentBackupStorageRedundancy": "Zone",
"currentServiceObjectiveName": "S0",
"defaultSecondaryLocation": "North Europe",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Zone",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
"name": "testdb",
"type": "Microsoft.Sql/servers/databases"
}
},
"202": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down Expand Up @@ -80,7 +81,8 @@
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1",
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down Expand Up @@ -72,7 +73,8 @@
"readScale": "Disabled",
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"highAvailabilityReplicaCount": 0,
"licenseType": "LicenseIncluded",
"secondaryType": "Named",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down Expand Up @@ -92,7 +93,8 @@
"highAvailabilityReplicaCount": 0,
"licenseType": "LicenseIncluded",
"secondaryType": "Named",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"capacity": 10
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo"
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false
},
"location": "SoutheastAsia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr",
Expand Down Expand Up @@ -77,7 +78,8 @@
"capacity": 10
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo"
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false
},
"location": "SoutheastAsia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"secondaryType": "Geo",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down Expand Up @@ -83,7 +84,8 @@
"requestedBackupStorageRedundancy": "Geo",
"requestedServiceObjectiveName": "S0",
"secondaryType": "Geo",
"zoneRedundant": false
"zoneRedundant": false,
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"readScale": "Enabled",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"zoneRedundant": false,
"currentSku": {
"name": "BC_Gen4",
Expand Down Expand Up @@ -76,6 +77,7 @@
"readScale": "Enabled",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"zoneRedundant": false,
"currentSku": {
"name": "BC_Gen4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"readScale": "Enabled",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"zoneRedundant": false,
"currentSku": {
"name": "BC_Gen4",
Expand Down Expand Up @@ -75,6 +76,7 @@
"readScale": "Enabled",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"zoneRedundant": false,
"currentSku": {
"name": "BC_Gen4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"capacity": 2
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo"
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"capacity": 2
},
"currentBackupStorageRedundancy": "Zone",
"requestedBackupStorageRedundancy": "Zone"
"requestedBackupStorageRedundancy": "Zone",
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand All @@ -61,6 +62,7 @@
"requestedServiceObjectiveName": "System0",
"defaultSecondaryLocation": "North Europe",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"isLedgerOn": false,
"zoneRedundant": false,
"readScale": "Disabled",
"currentSku": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"capacity": 4
},
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Local"
"requestedBackupStorageRedundancy": "Local",
"isLedgerOn": false
},
"location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"maxLogSizeBytes": 104857600,
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"zoneRedundant": false,
"readScale": "Enabled",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"maxLogSizeBytes": 104857600,
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"isLedgerOn": false,
"zoneRedundant": false,
"readScale": "Enabled",
"earliestRestoreDate": "2017-06-07T04:51:33.937Z",
Expand Down
1 change: 0 additions & 1 deletion specification/sql/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ input-file:
- Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessmentScans.json
- Microsoft.Sql/preview/2021-02-01-preview/DatabaseVulnerabilityAssessments.json
- Microsoft.Sql/preview/2021-02-01-preview/Databases.json
- Microsoft.Sql/preview/2021-02-01-preview/Databases_legacy.json
- Microsoft.Sql/preview/2021-02-01-preview/DeletedServers.json
- Microsoft.Sql/preview/2021-02-01-preview/ElasticPoolOperations.json
- Microsoft.Sql/preview/2021-02-01-preview/ElasticPools.json
Expand Down

0 comments on commit bf832d4

Please sign in to comment.