-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensitivity labels: Disable/Enable recommended sensitivity labels #5083
Changes from 1 commit
f1340f6
6819e90
f966068
4a91407
11bd93a
e18ac59
bb549da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "myRG", | ||
"serverName": "myServer", | ||
"databaseName": "myDatabase", | ||
"schemaName": "dbo", | ||
"tableName": "myTable", | ||
"columnName": "myColumn", | ||
"api-version": "2017-03-01-preview" | ||
}, | ||
"responses": { | ||
"200": {} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "myRG", | ||
"serverName": "myServer", | ||
"databaseName": "myDatabase", | ||
"schemaName": "dbo", | ||
"tableName": "myTable", | ||
"columnName": "myColumn", | ||
"api-version": "2017-03-01-preview" | ||
}, | ||
"responses": { | ||
"200": {} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,13 @@ | |
{ | ||
"$ref": "#/parameters/DatabaseNameParameter" | ||
}, | ||
{ | ||
"name": "showDisabledRecommendations", | ||
"in": "query", | ||
"description": "Specifies whether to return disabled recommendations or not.", | ||
"required": false, | ||
"type": "boolean" | ||
}, | ||
{ | ||
"name": "$filter", | ||
"in": "query", | ||
|
@@ -122,13 +129,13 @@ | |
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels": { | ||
"get": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/recommended/enable": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
removing this api, is a breaking change and must follow Azure api deprecation policy and would require new api version GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This API signature will not work. ARM expects resourceType/resourceTypeName segments. Here you have a missing segment. What is "recommended"? Is it a resource type or an instance of sensitivityLabels? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Recommended sensitivity label, there are two sources of sensitivity labels, either current or recommended, but these actions are applicable only for recommended sensitivity labels, thus it's hardcoded in the URI (You can see the resource id: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. Can you make this as an enum and the only allowed value in that would be recommended. It will help you in expanding supported values in future. |
||
"post": { | ||
"tags": [ | ||
"SensitivityLabels" | ||
], | ||
"description": "Gets the sensitivity labels of a given database", | ||
"operationId": "SensitivityLabels_ListByDatabase", | ||
"description": "Enables sensitivity recommendations on a given column", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add at the end also "(recommendations are enabled by default on all columns)", so it will be clear that there is no need to call this API to enable recommendations There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
"operationId": "SensitivityLabels_Enable", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't be SensitivityLabelsRecommendations_Enable? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or "SensitivityLabels_EnableRecommendation" (like you did in MI)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, will fix |
||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ResourceGroupParameter" | ||
|
@@ -140,10 +147,24 @@ | |
"$ref": "#/parameters/DatabaseNameParameter" | ||
}, | ||
{ | ||
"name": "$filter", | ||
"in": "query", | ||
"description": "An OData filter expression that filters elements in the collection.", | ||
"required": false, | ||
"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" | ||
}, | ||
{ | ||
|
@@ -155,22 +176,75 @@ | |
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully retrieved the sensitivity labels.", | ||
"schema": { | ||
"$ref": "#/definitions/SensitivityLabelListResult" | ||
} | ||
"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 * 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 * 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." | ||
} | ||
}, | ||
"x-ms-odata": "#/definitions/SensitivityLabel", | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
"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/recommended/disable": { | ||
"post": { | ||
"tags": [ | ||
"SensitivityLabels" | ||
], | ||
"description": "Disables sensitivity recommendations on a given column", | ||
"operationId": "SensitivityLabels_Disable", | ||
"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 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 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." | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"Gets the current and recommended sensitivity labels of a given database": { | ||
"$ref": "./examples/SensitivityLabelsListByDatabase.json" | ||
"Disables sensitivity recommendations on a given column": { | ||
"$ref": "./examples/RecommendedColumnSensitivityLabelDisable.json" | ||
} | ||
} | ||
} | ||
|
@@ -436,6 +510,11 @@ | |
"informationTypeId": { | ||
"description": "The information type ID.", | ||
"type": "string" | ||
}, | ||
"isDisabled": { | ||
"description": "Applicable for recommended sensitivity label source only. Specifies whether the recommended sensitivity label is disabled or not.", | ||
"type": "boolean", | ||
"readOnly": true | ||
} | ||
} | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "myRG", | ||
"managedInstanceName": "myManagedInstanceName", | ||
"databaseName": "myDatabase", | ||
"schemaName": "dbo", | ||
"tableName": "myTable", | ||
"columnName": "myColumn", | ||
"api-version": "2018-06-01-preview" | ||
}, | ||
"responses": { | ||
"200": {} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "myRG", | ||
"managedInstanceName": "myManagedInstanceName", | ||
"databaseName": "myDatabase", | ||
"schemaName": "dbo", | ||
"tableName": "myTable", | ||
"columnName": "myColumn", | ||
"api-version": "2018-06-01-preview" | ||
}, | ||
"responses": { | ||
"200": {} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"show" is UI specific. Perhaps "include" or "return" instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated