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 8a38f1952ba0..e841fc45e9e0 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 @@ -86,6 +86,13 @@ { "$ref": "#/parameters/DatabaseNameParameter" }, + { + "name": "includeDisabledRecommendations", + "in": "query", + "description": "Specifies whether to include disabled recommendations or not.", + "required": false, + "type": "boolean" + }, { "name": "$skipToken", "in": "query", @@ -128,6 +135,152 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable": { + "post": { + "tags": [ + "SensitivityLabels" + ], + "description": "Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns)", + "operationId": "SensitivityLabels_EnableRecommendation", + "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" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully enabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 404 SensitivityLabelsColumnNotFound - The specified 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." + } + }, + "x-ms-examples": { + "Enables sensitivity recommendations on a given column": { + "$ref": "./examples/RecommendedColumnSensitivityLabelEnable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable": { + "post": { + "tags": [ + "SensitivityLabels" + ], + "description": "Disables sensitivity recommendations on a given column", + "operationId": "SensitivityLabels_DisableRecommendation", + "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" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled the sensitivity recommendation on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 DatawarehouseDatabaseIsDeactivated - Could not execute Data Classification operation because the database is paused. Please resume it.\n\n * 404 SensitivityLabelsColumnNotFound - The specified 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." + } + }, + "x-ms-examples": { + "Disables sensitivity recommendations on a given column": { + "$ref": "./examples/RecommendedColumnSensitivityLabelDisable.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}": { "get": { "tags": [ @@ -389,6 +542,11 @@ "informationTypeId": { "description": "The information type ID.", "type": "string" + }, + "isDisabled": { + "description": "Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.", + "type": "boolean", + "readOnly": true } } }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json new file mode 100644 index 000000000000..752baa5d065b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json new file mode 100644 index 000000000000..752baa5d065b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "serverName": "myServer", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json new file mode 100644 index 000000000000..7c5ee1962808 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json new file mode 100644 index 000000000000..7c5ee1962808 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2018-06-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "myRG", + "managedInstanceName": "myManagedInstanceName", + "databaseName": "myDatabase", + "schemaName": "dbo", + "tableName": "myTable", + "columnName": "myColumn", + "sensitivityLabelSource": "recommended", + "api-version": "2018-06-01-preview" + }, + "responses": { + "200": {} + } +} \ No newline at end of file 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 b3061d4f4c6d..5b06a8876a12 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 @@ -256,6 +256,152 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable": { + "post": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Disables sensitivity recommendations on a given column", + "operationId": "ManagedDatabaseSensitivityLabels_DisableRecommendation", + "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" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully disabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SensitivityLabelsColumnNotFound - The specified 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." + } + }, + "x-ms-examples": { + "Disables the sensitivity recommendations on a given column": { + "$ref": "./examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable": { + "post": { + "tags": [ + "ManagedDatabaseSensitivityLabels" + ], + "description": "Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns)", + "operationId": "ManagedDatabaseSensitivityLabels_EnableRecommendation", + "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" + }, + { + "name": "sensitivityLabelSource", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "recommended" + ], + "x-ms-enum": { + "name": "SensitivityLabelSource", + "modelAsString": false + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully enabled the sensitivity recommendations on the given column." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SensitivityLabelsColumnNotFound - The specified 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." + } + }, + "x-ms-examples": { + "Enables the sensitivity recommendations on a given column": { + "$ref": "./examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels": { "get": { "tags": [ @@ -326,6 +472,13 @@ { "$ref": "#/parameters/DatabaseNameParameter" }, + { + "name": "includeDisabledRecommendations", + "in": "query", + "description": "Specifies whether to include disabled recommendations or not.", + "required": false, + "type": "boolean" + }, { "name": "$skipToken", "in": "query", @@ -389,6 +542,11 @@ "informationTypeId": { "description": "The information type ID.", "type": "string" + }, + "isDisabled": { + "description": "Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.", + "type": "boolean", + "readOnly": true } } },