From a0a74e928e57406cb708077b62c95a07c6964f9a Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 13 Dec 2018 10:40:44 +0200 Subject: [PATCH 01/16] DW deactivated error code --- .../2017-03-01-preview/sensitivityLabels.json | 12 ++++++------ .../managedDatabaseSensitivityLabels.json | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/sensitivityLabels.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/sensitivityLabels.json index 6ab44b268dbc..61fb8763d07b 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/sensitivityLabels.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/sensitivityLabels.json @@ -55,7 +55,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." } }, "x-ms-odata": "#/definitions/SensitivityLabel", @@ -108,7 +108,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." } }, "x-ms-odata": "#/definitions/SensitivityLabel", @@ -161,7 +161,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." } }, "x-ms-odata": "#/definitions/SensitivityLabel", @@ -243,7 +243,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" } }, "x-ms-examples": { @@ -327,7 +327,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - Label ID must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - Information type ID must be a GUID\n\n * 400 LabelMissing - Label is missing\n\n * 400 InformationTypeMissing - Information Type is missing\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - Label ID must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - Information type ID must be a GUID\n\n * 400 LabelMissing - Label is missing\n\n * 400 InformationTypeMissing - Information Type is missing\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" }, "201": { "description": "Successfully created the sensitivity label.", @@ -405,7 +405,7 @@ "description": "Successfully deleted the sensitivity label." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json index 40d205a52708..9ca6c46329f5 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json @@ -84,7 +84,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" } }, "x-ms-examples": { @@ -168,7 +168,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" }, "201": { "description": "Successfully created the sensitivity label.", @@ -246,7 +246,7 @@ "description": "Successfully deleted the sensitivity label." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" } }, "x-ms-examples": { @@ -295,7 +295,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." } }, "x-ms-odata": "#/definitions/SensitivityLabel", @@ -348,7 +348,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." } }, "x-ms-odata": "#/definitions/SensitivityLabel", @@ -401,7 +401,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." } }, "x-ms-odata": "#/definitions/SensitivityLabel", From 248ca5f330941bb456209d84aa623726971da598 Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 7 Feb 2019 12:08:39 +0200 Subject: [PATCH 02/16] managed database schema api --- .../ManagedDatabaseSchema.json | 648 ++++++++++++++++++ .../examples/ManagedDatabaseColumnGet.json | 24 + .../ManagedDatabaseColumnListByTable.json | 35 + .../examples/ManagedDatabaseSchemaGet.json | 20 + .../ManagedDatabaseSchemaListByDatabase.json | 29 + .../examples/ManagedDatabaseTableGet.json | 21 + .../ManagedDatabaseTableListBySchema.json | 30 + 7 files changed, 807 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ManagedDatabaseSchema.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseColumnGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseColumnListByTable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableListBySchema.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ManagedDatabaseSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ManagedDatabaseSchema.json new file mode 100644 index 000000000000..7176ce1f0c79 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ManagedDatabaseSchema.json @@ -0,0 +1,648 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-06-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns": { + "get": { + "tags": [ + "ManagedDatabaseColumns" + ], + "description": "List managed database columns", + "operationId": "ManagedDatabaseColumns_ListByTable", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database columns.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + } + }, + "x-ms-odata": "#/definitions/ManagedDatabaseColumn", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database columns": { + "$ref": "./examples/ManagedDatabaseColumnListByTable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}": { + "get": { + "tags": [ + "ManagedDatabaseColumns" + ], + "description": "Get managed database column", + "operationId": "ManagedDatabaseColumns_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database column.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseColumn" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + } + }, + "x-ms-examples": { + "Get managed database column": { + "$ref": "./examples/ManagedDatabaseColumnGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas": { + "get": { + "tags": [ + "ManagedDatabaseSchemas" + ], + "description": "List managed database schemas", + "operationId": "ManagedDatabaseSchemas_ListByDatabase", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database schemas.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSchemaListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + } + }, + "x-ms-odata": "#/definitions/ManagedDatabaseSchema", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database schemas": { + "$ref": "./examples/ManagedDatabaseSchemaListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}": { + "get": { + "tags": [ + "ManagedDatabaseSchemas" + ], + "description": "Get managed database schema", + "operationId": "ManagedDatabaseSchemas_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database schema.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseSchema" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + } + }, + "x-ms-examples": { + "Get managed database schema": { + "$ref": "./examples/ManagedDatabaseSchemaGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables": { + "get": { + "tags": [ + "ManagedDatabaseTables" + ], + "description": "List managed database tables", + "operationId": "ManagedDatabaseTables_ListBySchema", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database tables.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseTableListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + } + }, + "x-ms-odata": "#/definitions/ManagedDatabaseTable", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List managed database tables": { + "$ref": "./examples/ManagedDatabaseTableListBySchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}": { + "get": { + "tags": [ + "ManagedDatabaseTables" + ], + "description": "Get managed database table", + "operationId": "ManagedDatabaseTables_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ManagedInstanceNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "The child resources to include in the response.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved managed database table.", + "schema": { + "$ref": "#/definitions/ManagedDatabaseTable" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + } + }, + "x-ms-examples": { + "Get managed database table": { + "$ref": "./examples/ManagedDatabaseTableGet.json" + } + } + } + } + }, + "definitions": { + "ManagedDatabaseColumnProperties": { + "description": "Managed database column properties.", + "type": "object", + "properties": { + "columnType": { + "description": "The table columns.", + "type": "string" + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "ManagedDatabaseColumn": { + "description": "A managed database column resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseColumnProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseColumnListResult": { + "description": "A list of managed database columns.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseColumn" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseSchemaProperties": { + "description": "Managed database schema properties.", + "type": "object", + "properties": { + "tables": { + "description": "The schema tables.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseTable" + } + } + } + }, + "ManagedDatabaseTableProperties": { + "description": "Managed database table properties.", + "type": "object", + "properties": { + "columns": { + "description": "The table columns.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseColumn" + } + } + } + }, + "ManagedDatabaseTable": { + "description": "A managed database table resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseTableProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseSchema": { + "description": "A managed database schema resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ManagedDatabaseSchemaProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "ManagedDatabaseSchemaListResult": { + "description": "A list of managed database schemas.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseSchema" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "ManagedDatabaseTableListResult": { + "description": "A list of managed database tables.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagedDatabaseTable" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseColumnGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseColumnGet.json new file mode 100644 index 000000000000..85400b1cd4c1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseColumnGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "columnName": "column1", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/column1", + "name": "column1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "bit" + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseColumnListByTable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseColumnListByTable.json new file mode 100644 index 000000000000..65a52a30e428 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseColumnListByTable.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "nvarchar" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns", + "properties": { + "columnType": "bit" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaGet.json new file mode 100644 index 000000000000..f8bd6aebb4a7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/managedInstances/databases/schemas", + "properties": {} + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json new file mode 100644 index 000000000000..3cfd698ed4e9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/managedInstances/databases/schemas", + "properties": {} + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/schema2", + "name": "schema2", + "type": "Microsoft.Sql/managedInstances/databases/schemas", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableGet.json new file mode 100644 index 000000000000..91b00891a342 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables", + "properties": { } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableListBySchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableListBySchema.json new file mode 100644 index 000000000000..968e4003382a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableListBySchema.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables", + "properties": { } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table2", + "name": "table2", + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables", + "properties": { } + } + ] + } + } + } +} \ No newline at end of file From d627dbebadf1523138ab021475e8aa7ac920249e Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 7 Feb 2019 13:49:24 +0200 Subject: [PATCH 03/16] resolve conflicts with prod --- .../2017-03-01-preview/sensitivityLabels.json | 53 +------------- .../managedDatabaseSensitivityLabels.json | 69 ++++--------------- 2 files changed, 18 insertions(+), 104 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/sensitivityLabels.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/sensitivityLabels.json index 61fb8763d07b..a070a1786305 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/sensitivityLabels.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/sensitivityLabels.json @@ -87,58 +87,11 @@ "$ref": "#/parameters/DatabaseNameParameter" }, { - "name": "$filter", + "name": "$skipToken", "in": "query", - "description": "An OData filter expression that filters elements in the collection.", "required": false, "type": "string" }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the sensitivity labels.", - "schema": { - "$ref": "#/definitions/SensitivityLabelListResult" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." - } - }, - "x-ms-odata": "#/definitions/SensitivityLabel", - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "Gets the recommended sensitivity labels of a given database": { - "$ref": "./examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels": { - "get": { - "tags": [ - "SensitivityLabels" - ], - "description": "Gets the sensitivity labels of a given database", - "operationId": "SensitivityLabels_ListByDatabase", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, { "name": "$filter", "in": "query", @@ -169,8 +122,8 @@ "nextLinkName": "nextLink" }, "x-ms-examples": { - "Gets the current and recommended sensitivity labels of a given database": { - "$ref": "./examples/SensitivityLabelsListByDatabase.json" + "Gets the recommended sensitivity labels of a given database": { + "$ref": "./examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json" } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json index 9ca6c46329f5..b3061d4f4c6d 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/managedDatabaseSensitivityLabels.json @@ -168,7 +168,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelSourceNameNotSupported - The specified sensitivity label source is not valid\n\n * 400 InvalidSensitivityLabelResource - The specified sensitivity label resource is not valid\n\n * 400 SensitivityLabelLabelNameAndInfoTypeNotProvided - At least one of LabelName and InformationType must be specified\n\n * 400 LabelNameTooLong - Label name cannot exceed {0} characters\n\n * 400 InformationTypeTooLong - Information type cannot exceed {0} characters\n\n * 400 LabelIdMustBeGuid - Label ID must be a GUID\n\n * 400 InformationTypeIdMustBeGuid - Information type ID must be a GUID\n\n * 400 LabelMissing - Label is missing\n\n * 400 InformationTypeMissing - Information Type is missing\n\n * 404 SensitivityLabelsColumnNotFound - The specified schema/table/column could not be found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SensitivityLabelsLabelNotFound - The specified sensitivity label could not be found\n\n * 501 SensitivityLabelRecommendedSourceNameNotSupported - 'Recommended' sensitivity label source is not supported yet" }, "201": { "description": "Successfully created the sensitivity label.", @@ -256,59 +256,6 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels": { - "get": { - "tags": [ - "ManagedDatabaseSensitivityLabels" - ], - "description": "Gets the sensitivity labels of a given database", - "operationId": "ManagedDatabaseSensitivityLabels_ListByDatabase", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ManagedInstanceNameParameter" - }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, - { - "name": "$filter", - "in": "query", - "description": "An OData filter expression that filters elements in the collection.", - "required": false, - "type": "string" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the sensitivity labels.", - "schema": { - "$ref": "#/definitions/SensitivityLabelListResult" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 400 SensitivityLabelsInvalidODataQuery - The specified OData query is either not valid or not supported\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance." - } - }, - "x-ms-odata": "#/definitions/SensitivityLabel", - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "Gets the current and recommended sensitivity labels of a given database": { - "$ref": "./examples/ManagedDatabaseSensitivityLabelsListByDatabase.json" - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels": { "get": { "tags": [ @@ -379,6 +326,12 @@ { "$ref": "#/parameters/DatabaseNameParameter" }, + { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string" + }, { "name": "$filter", "in": "query", @@ -425,9 +378,17 @@ "description": "The label name.", "type": "string" }, + "labelId": { + "description": "The label ID.", + "type": "string" + }, "informationType": { "description": "The information type.", "type": "string" + }, + "informationTypeId": { + "description": "The information type ID.", + "type": "string" } } }, From dfaacf26b2484727bb93300b4d0ccc84f310d29b Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Wed, 20 Feb 2019 12:56:50 +0200 Subject: [PATCH 04/16] adding schema API for databases. updates for MI schema API --- .../2018-06-01-preview/DatabaseSchema.json | 614 ++++++++++++++++++ .../ManagedDatabaseSchema.json | 194 +++--- 2 files changed, 698 insertions(+), 110 deletions(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json new file mode 100644 index 000000000000..de50ad6ced0c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json @@ -0,0 +1,614 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-06-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns": { + "get": { + "tags": [ + "DatabaseColumns" + ], + "description": "List database columns", + "operationId": "DatabaseColumns_ListByTable", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database columns.", + "schema": { + "$ref": "#/definitions/DatabaseColumnListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." + } + }, + "x-ms-odata": "#/definitions/DatabaseColumn", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database columns": { + "$ref": "./examples/DatabaseColumnListByTable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}": { + "get": { + "tags": [ + "DatabaseColumns" + ], + "description": "Get database column", + "operationId": "DatabaseColumns_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "name": "columnName", + "in": "path", + "description": "The name of the column.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database column.", + "schema": { + "$ref": "#/definitions/DatabaseColumn" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." + } + }, + "x-ms-examples": { + "Get database column": { + "$ref": "./examples/DatabaseColumnGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas": { + "get": { + "tags": [ + "DatabaseSchemas" + ], + "description": "List database schemas", + "operationId": "DatabaseSchemas_ListByDatabase", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database schemas.", + "schema": { + "$ref": "#/definitions/DatabaseSchemaListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." + } + }, + "x-ms-odata": "#/definitions/DatabaseSchema", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database schemas": { + "$ref": "./examples/DatabaseSchemaListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}": { + "get": { + "tags": [ + "DatabaseSchemas" + ], + "description": "Get database schema", + "operationId": "DatabaseSchemas_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database schema.", + "schema": { + "$ref": "#/definitions/DatabaseSchema" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." + } + }, + "x-ms-examples": { + "Get database schema": { + "$ref": "./examples/DatabaseSchemaGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables": { + "get": { + "tags": [ + "DatabaseTables" + ], + "description": "List database tables", + "operationId": "DatabaseTables_ListBySchema", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "An OData filter expression that filters elements in the collection.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database tables.", + "schema": { + "$ref": "#/definitions/DatabaseTableListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." + } + }, + "x-ms-odata": "#/definitions/DatabaseTable", + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database tables": { + "$ref": "./examples/DatabaseTableListBySchema.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}": { + "get": { + "tags": [ + "DatabaseTables" + ], + "description": "Get database table", + "operationId": "DatabaseTables_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "schemaName", + "in": "path", + "description": "The name of the schema.", + "required": true, + "type": "string" + }, + { + "name": "tableName", + "in": "path", + "description": "The name of the table.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database table.", + "schema": { + "$ref": "#/definitions/DatabaseTable" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." + } + }, + "x-ms-examples": { + "Get database table": { + "$ref": "./examples/DatabaseTableGet.json" + } + } + } + } + }, + "definitions": { + "DatabaseColumnProperties": { + "description": "Database column properties.", + "type": "object", + "properties": { + "columnType": { + "description": "The column data type.", + "enum": [ + "image", + "text", + "uniqueidentifier", + "date", + "time", + "datetime2", + "datetimeoffset", + "tinyint", + "smallint", + "int", + "smalldatetime", + "real", + "money", + "datetime", + "float", + "sql_variant", + "ntext", + "bit", + "decimal", + "numeric", + "smallmoney", + "bigint", + "hierarchyid", + "geometry", + "geography", + "varbinary", + "varchar", + "binary", + "char", + "timestamp", + "nvarchar", + "nchar", + "xml", + "sysname" + ], + "type": "string", + "x-ms-enum": { + "name": "ColumnDataType", + "modelAsString": true + } + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "DatabaseColumn": { + "description": "A database column resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseColumnProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseColumnListResult": { + "description": "A list of database columns.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseColumn" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSchema": { + "description": "A database schema resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": {} + }, + "DatabaseSchemaListResult": { + "description": "A list of database schemas.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSchema" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseTable": { + "description": "A database table resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": {} + }, + "DatabaseTableListResult": { + "description": "A list of database tables.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseTable" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ManagedDatabaseSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ManagedDatabaseSchema.json index 7176ce1f0c79..f7ccb564bb5c 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ManagedDatabaseSchema.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/ManagedDatabaseSchema.json @@ -65,14 +65,14 @@ "200": { "description": "Successfully retrieved managed database columns.", "schema": { - "$ref": "#/definitions/ManagedDatabaseColumnListResult" + "$ref": "#/definitions/DatabaseColumnListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." } }, - "x-ms-odata": "#/definitions/ManagedDatabaseColumn", + "x-ms-odata": "#/definitions/DatabaseColumn", "x-ms-pageable": { "nextLinkName": "nextLink" }, @@ -132,11 +132,11 @@ "200": { "description": "Successfully retrieved managed database column.", "schema": { - "$ref": "#/definitions/ManagedDatabaseColumn" + "$ref": "#/definitions/DatabaseColumn" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." } }, "x-ms-examples": { @@ -170,13 +170,6 @@ "required": false, "type": "string" }, - { - "name": "$expand", - "in": "query", - "description": "The child resources to include in the response.", - "required": false, - "type": "string" - }, { "$ref": "#/parameters/SubscriptionIdParameter" }, @@ -188,14 +181,14 @@ "200": { "description": "Successfully retrieved managed database schemas.", "schema": { - "$ref": "#/definitions/ManagedDatabaseSchemaListResult" + "$ref": "#/definitions/DatabaseSchemaListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." } }, - "x-ms-odata": "#/definitions/ManagedDatabaseSchema", + "x-ms-odata": "#/definitions/DatabaseSchema", "x-ms-pageable": { "nextLinkName": "nextLink" }, @@ -230,13 +223,6 @@ "required": true, "type": "string" }, - { - "name": "$expand", - "in": "query", - "description": "The child resources to include in the response.", - "required": false, - "type": "string" - }, { "$ref": "#/parameters/SubscriptionIdParameter" }, @@ -248,11 +234,11 @@ "200": { "description": "Successfully retrieved managed database schema.", "schema": { - "$ref": "#/definitions/ManagedDatabaseSchema" + "$ref": "#/definitions/DatabaseSchema" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." } }, "x-ms-examples": { @@ -293,13 +279,6 @@ "required": false, "type": "string" }, - { - "name": "$expand", - "in": "query", - "description": "The child resources to include in the response.", - "required": false, - "type": "string" - }, { "$ref": "#/parameters/SubscriptionIdParameter" }, @@ -311,14 +290,14 @@ "200": { "description": "Successfully retrieved managed database tables.", "schema": { - "$ref": "#/definitions/ManagedDatabaseTableListResult" + "$ref": "#/definitions/DatabaseTableListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." } }, - "x-ms-odata": "#/definitions/ManagedDatabaseTable", + "x-ms-odata": "#/definitions/DatabaseTable", "x-ms-pageable": { "nextLinkName": "nextLink" }, @@ -360,13 +339,6 @@ "required": true, "type": "string" }, - { - "name": "$expand", - "in": "query", - "description": "The child resources to include in the response.", - "required": false, - "type": "string" - }, { "$ref": "#/parameters/SubscriptionIdParameter" }, @@ -378,11 +350,11 @@ "200": { "description": "Successfully retrieved managed database table.", "schema": { - "$ref": "#/definitions/ManagedDatabaseTable" + "$ref": "#/definitions/DatabaseTable" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidManagedDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidManagedDatabaseTable - Table is missing in database.\n\n * 404 InvalidManagedDatabaseColumn - Column is missing in table." + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 InvalidDatabaseSchema - Schema is missing in database.\n\n * 404 InvalidDatabaseTable - Table is missing in database.\n\n * 404 InvalidDatabaseColumn - Column is missing in table." } }, "x-ms-examples": { @@ -394,13 +366,53 @@ } }, "definitions": { - "ManagedDatabaseColumnProperties": { - "description": "Managed database column properties.", + "DatabaseColumnProperties": { + "description": "Database column properties.", "type": "object", "properties": { "columnType": { - "description": "The table columns.", - "type": "string" + "description": "The column data type.", + "enum": [ + "image", + "text", + "uniqueidentifier", + "date", + "time", + "datetime2", + "datetimeoffset", + "tinyint", + "smallint", + "int", + "smalldatetime", + "real", + "money", + "datetime", + "float", + "sql_variant", + "ntext", + "bit", + "decimal", + "numeric", + "smallmoney", + "bigint", + "hierarchyid", + "geometry", + "geography", + "varbinary", + "varchar", + "binary", + "char", + "timestamp", + "nvarchar", + "nchar", + "xml", + "sysname" + ], + "type": "string", + "x-ms-enum": { + "name": "ColumnDataType", + "modelAsString": true + } } } }, @@ -436,8 +448,8 @@ ], "properties": {} }, - "ManagedDatabaseColumn": { - "description": "A managed database column resource.", + "DatabaseColumn": { + "description": "A database column resource.", "type": "object", "allOf": [ { @@ -446,21 +458,21 @@ ], "properties": { "properties": { - "$ref": "#/definitions/ManagedDatabaseColumnProperties", + "$ref": "#/definitions/DatabaseColumnProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, - "ManagedDatabaseColumnListResult": { - "description": "A list of managed database columns.", + "DatabaseColumnListResult": { + "description": "A list of database columns.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { - "$ref": "#/definitions/ManagedDatabaseColumn" + "$ref": "#/definitions/DatabaseColumn" }, "readOnly": true }, @@ -471,73 +483,25 @@ } } }, - "ManagedDatabaseSchemaProperties": { - "description": "Managed database schema properties.", - "type": "object", - "properties": { - "tables": { - "description": "The schema tables.", - "type": "array", - "items": { - "$ref": "#/definitions/ManagedDatabaseTable" - } - } - } - }, - "ManagedDatabaseTableProperties": { - "description": "Managed database table properties.", - "type": "object", - "properties": { - "columns": { - "description": "The table columns.", - "type": "array", - "items": { - "$ref": "#/definitions/ManagedDatabaseColumn" - } - } - } - }, - "ManagedDatabaseTable": { - "description": "A managed database table resource.", + "DatabaseSchema": { + "description": "A database schema resource.", "type": "object", "allOf": [ { "$ref": "#/definitions/ProxyResource" } ], - "properties": { - "properties": { - "$ref": "#/definitions/ManagedDatabaseTableProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } - }, - "ManagedDatabaseSchema": { - "description": "A managed database schema resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/ManagedDatabaseSchemaProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } + "properties": {} }, - "ManagedDatabaseSchemaListResult": { - "description": "A list of managed database schemas.", + "DatabaseSchemaListResult": { + "description": "A list of database schemas.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { - "$ref": "#/definitions/ManagedDatabaseSchema" + "$ref": "#/definitions/DatabaseSchema" }, "readOnly": true }, @@ -548,15 +512,25 @@ } } }, - "ManagedDatabaseTableListResult": { - "description": "A list of managed database tables.", + "DatabaseTable": { + "description": "A database table resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": {} + }, + "DatabaseTableListResult": { + "description": "A list of database tables.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { - "$ref": "#/definitions/ManagedDatabaseTable" + "$ref": "#/definitions/DatabaseTable" }, "readOnly": true }, From 0f9d789736da5c2c2e6d7887a076ac715bacab7f Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Wed, 20 Feb 2019 13:55:51 +0200 Subject: [PATCH 05/16] database schema examples --- .../examples/DatabaseColumnGet.json | 24 +++++++++++++ .../examples/DatabaseColumnListByTable.json | 35 +++++++++++++++++++ .../examples/DatabaseSchemaGet.json | 20 +++++++++++ .../DatabaseSchemaListByDatabase.json | 29 +++++++++++++++ .../examples/DatabaseTableGet.json | 21 +++++++++++ .../examples/DatabaseTableListBySchema.json | 30 ++++++++++++++++ 6 files changed, 159 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnListByTable.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableListBySchema.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnGet.json new file mode 100644 index 000000000000..764c4a5642cb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "columnName": "column1", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/column1", + "name": "column1", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "bit" + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnListByTable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnListByTable.json new file mode 100644 index 000000000000..b6aeda63db3a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnListByTable.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1", + "name": "col1", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "nvarchar" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2", + "name": "col2", + "type": "Microsoft.Sql/servers/databases/schemas/tables/columns", + "properties": { + "columnType": "bit" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaGet.json new file mode 100644 index 000000000000..2b41aec4f0ba --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaGet.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/servers/databases/schemas", + "properties": {} + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaListByDatabase.json new file mode 100644 index 000000000000..b8c97f5cf486 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaListByDatabase.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo", + "name": "dbo", + "type": "Microsoft.Sql/servers/databases/schemas", + "properties": {} + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/schema2", + "name": "schema2", + "type": "Microsoft.Sql/servers/databases/schemas", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableGet.json new file mode 100644 index 000000000000..bb0886a30319 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "table1", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/servers/databases/schemas/tables", + "properties": {} + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableListBySchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableListBySchema.json new file mode 100644 index 000000000000..a8d3ef108723 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableListBySchema.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "serverName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1", + "name": "table1", + "type": "Microsoft.Sql/servers/databases/schemas/tables", + "properties": {} + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table2", + "name": "table2", + "type": "Microsoft.Sql/servers/databases/schemas/tables", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file From 05414e64aaca74fff416e28e1979420854be274c Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Wed, 20 Feb 2019 14:18:07 +0200 Subject: [PATCH 06/16] added missing ServerNameParameter --- .../preview/2018-06-01-preview/DatabaseSchema.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json index de50ad6ced0c..47661923e535 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json @@ -566,6 +566,14 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" }, "DatabaseNameParameter": { "name": "databaseName", From 007ee563a3bfb849889735ddf6cfb17bf1720b55 Mon Sep 17 00:00:00 2001 From: Sergey Shandar Date: Wed, 10 Apr 2019 10:16:25 -0700 Subject: [PATCH 07/16] dummy commit --- .../2018-06-01-preview/examples/DatabaseColumnGet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnGet.json index 764c4a5642cb..3d1998116a6a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseColumnGet.json @@ -1,4 +1,4 @@ -{ +{ "parameters": { "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "myRG", @@ -21,4 +21,4 @@ } } } -} \ No newline at end of file +} From f179ea3ad7654c1b445c7c917dac3f80177ff15b Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 11 Apr 2019 12:02:52 +0300 Subject: [PATCH 08/16] remove empty properties --- .../preview/2018-06-01-preview/DatabaseSchema.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json index 47661923e535..1e17d06c2434 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/DatabaseSchema.json @@ -490,8 +490,7 @@ { "$ref": "#/definitions/ProxyResource" } - ], - "properties": {} + ] }, "DatabaseSchemaListResult": { "description": "A list of database schemas.", @@ -519,8 +518,7 @@ { "$ref": "#/definitions/ProxyResource" } - ], - "properties": {} + ] }, "DatabaseTableListResult": { "description": "A list of database tables.", @@ -619,4 +617,4 @@ } } } -} \ No newline at end of file +} From 52557b36962a9c27d8742db1a856dde05e6a7692 Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 11 Apr 2019 13:39:09 +0300 Subject: [PATCH 09/16] remove empty properties --- .../examples/DatabaseSchemaListByDatabase.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaListByDatabase.json index b8c97f5cf486..eeee0efa80d3 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaListByDatabase.json @@ -13,17 +13,15 @@ { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo", "name": "dbo", - "type": "Microsoft.Sql/servers/databases/schemas", - "properties": {} + "type": "Microsoft.Sql/servers/databases/schemas" }, { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/schema2", "name": "schema2", - "type": "Microsoft.Sql/servers/databases/schemas", - "properties": {} + "type": "Microsoft.Sql/servers/databases/schemas" } ] } } } -} \ No newline at end of file +} From 5692861ed6aa5cb5377937a2c3ceb45b2ef94c7f Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 11 Apr 2019 13:39:47 +0300 Subject: [PATCH 10/16] remove empty properties --- .../2018-06-01-preview/examples/DatabaseSchemaGet.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaGet.json index 2b41aec4f0ba..363e707cc783 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseSchemaGet.json @@ -12,9 +12,8 @@ "body": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo", "name": "dbo", - "type": "Microsoft.Sql/servers/databases/schemas", - "properties": {} + "type": "Microsoft.Sql/servers/databases/schemas" } } } -} \ No newline at end of file +} From 6e0129d03cf4892d4a41753305b4a553823f4c04 Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 11 Apr 2019 13:40:39 +0300 Subject: [PATCH 11/16] remove empty properties --- .../examples/ManagedDatabaseTableListBySchema.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableListBySchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableListBySchema.json index 968e4003382a..7f24c2946816 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableListBySchema.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableListBySchema.json @@ -14,17 +14,15 @@ { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1", "name": "table1", - "type": "Microsoft.Sql/managedInstances/databases/schemas/tables", - "properties": { } + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" }, { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table2", "name": "table2", - "type": "Microsoft.Sql/managedInstances/databases/schemas/tables", - "properties": { } + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" } ] } } } -} \ No newline at end of file +} From b753716d37f6c0e0a04eaa5112231a4849382aa3 Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 11 Apr 2019 13:41:23 +0300 Subject: [PATCH 12/16] remove empty properties --- .../2018-06-01-preview/examples/DatabaseTableGet.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableGet.json index bb0886a30319..6fbbd29fca18 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableGet.json @@ -13,9 +13,8 @@ "body": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1", "name": "table1", - "type": "Microsoft.Sql/servers/databases/schemas/tables", - "properties": {} + "type": "Microsoft.Sql/servers/databases/schemas/tables" } } } -} \ No newline at end of file +} From 3c39d233855b70abbeb2bc180e0d28671140698c Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 11 Apr 2019 13:41:53 +0300 Subject: [PATCH 13/16] remove empty properties --- .../examples/DatabaseTableListBySchema.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableListBySchema.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableListBySchema.json index a8d3ef108723..68fb5e47d0b5 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableListBySchema.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/DatabaseTableListBySchema.json @@ -14,17 +14,15 @@ { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1", "name": "table1", - "type": "Microsoft.Sql/servers/databases/schemas/tables", - "properties": {} + "type": "Microsoft.Sql/servers/databases/schemas/tables" }, { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table2", "name": "table2", - "type": "Microsoft.Sql/servers/databases/schemas/tables", - "properties": {} + "type": "Microsoft.Sql/servers/databases/schemas/tables" } ] } } } -} \ No newline at end of file +} From 9daf6f464c3fc6d1a7bf3600314242ebe1ce9056 Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 11 Apr 2019 13:42:27 +0300 Subject: [PATCH 14/16] remove empty properties --- .../2018-06-01-preview/examples/ManagedDatabaseTableGet.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableGet.json index 91b00891a342..7fbea6154036 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseTableGet.json @@ -13,9 +13,8 @@ "body": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1", "name": "table1", - "type": "Microsoft.Sql/managedInstances/databases/schemas/tables", - "properties": { } + "type": "Microsoft.Sql/managedInstances/databases/schemas/tables" } } } -} \ No newline at end of file +} From ed0c7117d0e51b7dc4aa474b99f3ccaa8ac5ec81 Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Thu, 11 Apr 2019 13:43:28 +0300 Subject: [PATCH 15/16] remove empty properties --- .../examples/ManagedDatabaseSchemaListByDatabase.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json index 3cfd698ed4e9..ccdd22e56af0 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json @@ -13,17 +13,15 @@ { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo", "name": "dbo", - "type": "Microsoft.Sql/managedInstances/databases/schemas", - "properties": {} + "type": "Microsoft.Sql/managedInstances/databases/schemas" }, { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/schema2", "name": "schema2", - "type": "Microsoft.Sql/managedInstances/databases/schemas", - "properties": {} + "type": "Microsoft.Sql/managedInstances/databases/schemas" } ] } } } -} \ No newline at end of file +} From bc18bf4475e9636410516b95258a0212fa5d7d48 Mon Sep 17 00:00:00 2001 From: Igal Sirotin <42036980+igsiroti@users.noreply.github.com> Date: Sun, 14 Apr 2019 11:38:36 +0300 Subject: [PATCH 16/16] remove empty properties --- .../examples/ManagedDatabaseSchemaGet.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaGet.json index f8bd6aebb4a7..c48943a1a3b6 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseSchemaGet.json @@ -12,9 +12,8 @@ "body": { "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo", "name": "dbo", - "type": "Microsoft.Sql/managedInstances/databases/schemas", - "properties": {} + "type": "Microsoft.Sql/managedInstances/databases/schemas" } } } -} \ No newline at end of file +}