Skip to content
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

New APIs for sensetivity lables managment in managed instance #3627

Merged
merged 8 commits into from
Aug 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,30 @@
"resourceGroupName": "myRG",
"serverName": "myServer",
"databaseName": "myDatabase",
"api-version": "2017-03-01-preview",
"filter": "Name eq 'current'"
"sensitivityLabelSource": "current",
"api-version": "2017-03-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "Sensitive",
"informationType": "Financial"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "PII",
"informationType": "Email"
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "myRG",
"serverName": "myServer",
"databaseName": "myDatabase",
"sensitivityLabelSource": "recommended",
"api-version": "2017-03-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/recommended",
"name": "recommended",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "Sensitive",
"informationType": "Financial"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended",
"name": "recommended",
"type": "Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "PII",
"informationType": "Email"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,79 @@
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Gets the current sensitivity labels of a given database": {
"$ref": "./examples/SensitivityLabelsListByDatabaseMax.json"
"Gets the current and recommended sensitivity labels of a given database": {
"$ref": "./examples/SensitivityLabelsListByDatabase.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels/{sensitivityLabelSource}": {
"get": {
"tags": [
"SensitivityLabels"
],
"description": "Gets the sensitivity labels of a given database",
"operationId": "SensitivityLabels_ListByDatabaseWithSource",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
},
{
"name": "sensitivityLabelSource",
"in": "path",
"description": "Optional source of the sensitivity label. Valid values are current or recommeneded. In not specified both returned.",
"required": true,
"type": "string",
"enum": [
"current",
"recommended"
],
"x-ms-enum": {
"name": "SensitivityLabelSource",
"modelAsString": false
}
},
"Gets the sensitivity labels of a given database": {
"$ref": "./examples/SensitivityLabelsListByDatabaseMin.json"
{
"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 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"
},
"Gets the current sensitivity labels of a given database": {
"$ref": "./examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "myRG",
"managedInstanceName": "myManagedInstanceName",
"databaseName": "myDatabase",
"schemaName": "dbo",
"tableName": "myTable",
"columnName": "myColumn",
"sensitivityLabelSource": "current",
"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/myTable/columns/myColumn/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "PII",
"informationType": "PhoneNumber"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "myRG",
"managedInstanceName": "myManagedInstanceName",
"databaseName": "myDatabase",
"schemaName": "dbo",
"tableName": "myTable",
"columnName": "myColumn",
"sensitivityLabelSource": "current",
"api-version": "2018-06-01-preview",
"parameters": {
"properties": {
"labelName": "PII",
"informationType": "PhoneNumber"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "PII",
"informationType": "PhoneNumber"
}
}
},
"201": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "PII",
"informationType": "PhoneNumber"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "myRG",
"managedInstanceName": "myManagedInstanceName",
"databaseName": "myDatabase",
"schemaName": "dbo",
"tableName": "myTable",
"columnName": "myColumn",
"sensitivityLabelSource": "current",
"api-version": "2018-06-01-preview"
},
"responses": {
"200": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"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/tables/myTable/columns/myColumn/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "Sensitive",
"informationType": "Financial"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended",
"name": "recommended",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "PII",
"informationType": "Email"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "myRG",
"managedInstanceName": "myManagedInstanceName",
"databaseName": "myDatabase",
"sensitivityLabelSource": "current",
"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/myTable/columns/myColumn/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "Sensitive",
"informationType": "Financial"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current",
"name": "current",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "PII",
"informationType": "Email"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "myRG",
"managedInstanceName": "myManagedInstanceName",
"databaseName": "myDatabase",
"sensitivityLabelSource": "recommended",
"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/myTable/columns/myColumn2/sensitivityLabels/recommended",
"name": "recommended",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "Sensitive",
"informationType": "Financial"
}
},
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/recommended",
"name": "recommended",
"type": "Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels",
"properties": {
"labelName": "PII",
"informationType": "Email"
}
}
]
}
}
}
}
Loading