From 1381e561867dae817d4e7ef42f1ded2c8f9fcb57 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Tue, 17 Dec 2019 15:22:18 +0200 Subject: [PATCH 01/13] New commands `sql db sensitivity-labels show/list/list-recommended/update/delete/enable-recommendation/disable-recommendation` to manage sensitivity labels for SQL databases. --- src/azure-cli/HISTORY.rst | 4 + .../azure/cli/command_modules/sql/_help.py | 62 + .../azure/cli/command_modules/sql/_util.py | 4 + .../azure/cli/command_modules/sql/commands.py | 17 + .../azure/cli/command_modules/sql/custom.py | 53 + .../test_sql_db_sensitivity_labels.yaml | 1582 +++++++++++++++++ .../sql/tests/latest/test_sql_commands.py | 129 ++ 7 files changed, 1851 insertions(+) create mode 100644 src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_labels.yaml diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 9528ce9f338..b47516a2ad1 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -37,6 +37,10 @@ Release History * Add back edge builds for pip install * Add Ubuntu eoan package +**SQL** + +* New commands `sql db sensitivity-labels show/list/list-recommended/update/delete/enable-recommendation/disable-recommendation` to manage sensitivity labels for SQL databases. + **Storage** * GA Release Large File Shares property for storage account create and update command diff --git a/src/azure-cli/azure/cli/command_modules/sql/_help.py b/src/azure-cli/azure/cli/command_modules/sql/_help.py index a82a3b97df4..6cbe674a8b6 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_help.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_help.py @@ -825,3 +825,65 @@ - name: Get the details for a virtual cluster text: az sql virtual-cluster show -g mygroup -n mycluster """ + +helps['sql db sensitivity-labels'] = """ +type: group +short-summary: Manage sensitivity labels. +""" + +helps['sql db sensitivity-labels update'] = """ +type: command +short-summary: Update a columns's sensitivity label. +long-summary: At least one of information-type or label-name must be provided. +examples: + - name: Update sensitivity label for a given column. + text: sql db sensitivity-labels update -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --information-type Name --label-name "Confidential - GDPR" +""" + +helps['sql db sensitivity-labels list'] = """ +type: command +short-summary: Get the sensitivity labels of a given database. +examples: + - name: Get the sensitivity labels of a given database. + text: sql db sensitivity-labels list -g mygroup -s myserver -n mydb +""" + +helps['sql db sensitivity-labels list-recommended'] = """ +type: command +short-summary: Get the recommended sensitivity labels of a given database. +examples: + - name: Get the recommended sensitivity labels of a given database. + text: sql db sensitivity-labels list-recommended -g mygroup -s myserver -n mydb +""" + +helps['sql db sensitivity-labels show'] = """ +type: command +short-summary: Get the sensitivity label of a given column. +examples: + - name: Get the sensitivity label of a given column. + text: sql db sensitivity-labels show -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --sensitivity-label-source current +""" + +helps['sql db sensitivity-labels delete'] = """ +type: command +short-summary: Delete the sensitivity label of a given column. +examples: + - name: Delete the sensitivity label of a given column. + text: sql db sensitivity-labels delete -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn +""" + +helps['sql db sensitivity-labels enable-recommendation'] = """ +type: command +short-summary: Enable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). +examples: + - name: Enable sensitivity recommendations for a given column. + text: sql db sensitivity-labels enable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn +""" + +helps['sql db sensitivity-labels disable-recommendation'] = """ +type: command +short-summary: Disable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). +examples: + - name: Disable sensitivity recommendations for a given column. + text: sql db sensitivity-labels disable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn +""" \ No newline at end of file diff --git a/src/azure-cli/azure/cli/command_modules/sql/_util.py b/src/azure-cli/azure/cli/command_modules/sql/_util.py index c6392a63a70..68b35237394 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_util.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_util.py @@ -40,6 +40,10 @@ def get_sql_database_blob_auditing_policies_operations(cli_ctx, _): return get_sql_management_client(cli_ctx).database_blob_auditing_policies +def get_sql_database_sensitivity_labels_operations(cli_ctx, _): + return get_sql_management_client(cli_ctx).sensitivity_labels + + def get_sql_database_threat_detection_policies_operations(cli_ctx, _): return get_sql_management_client(cli_ctx).database_threat_detection_policies diff --git a/src/azure-cli/azure/cli/command_modules/sql/commands.py b/src/azure-cli/azure/cli/command_modules/sql/commands.py index 0ca134f8365..a4360273ddc 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/commands.py @@ -25,6 +25,7 @@ get_sql_capabilities_operations, get_sql_databases_operations, get_sql_database_blob_auditing_policies_operations, + get_sql_database_sensitivity_labels_operations, get_sql_database_operations_operations, get_sql_database_threat_detection_policies_operations, get_sql_database_transparent_data_encryption_activities_operations, @@ -231,6 +232,22 @@ def load_command_table(self, _): g.generic_update_command('update', custom_func_name='db_audit_policy_update') + database_sensitivity_labels_operations = CliCommandType( + operations_tmpl='azure.mgmt.sql.operations#SensitivityLabelsOperations.{}', + client_factory=get_sql_database_sensitivity_labels_operations) + + with self.command_group('sql db sensitivity-labels', + database_sensitivity_labels_operations, + client_factory=get_sql_database_sensitivity_labels_operations) as g: + + g.show_command('list', 'list_current_by_database') + g.show_command('list-recommended', 'list_recommended_by_database') + g.show_command('show', 'get') + g.show_command('delete', 'delete') + g.show_command('enable-recommendation', 'enable_recommendation') + g.show_command('disable-recommendation', 'disable_recommendation') + g.custom_command('update', 'db_sensitivity_label_update') + database_threat_detection_policies_operations = CliCommandType( operations_tmpl='azure.mgmt.sql.operations#DatabaseThreatDetectionPoliciesOperations.{}', client_factory=get_sql_database_threat_detection_policies_operations) diff --git a/src/azure-cli/azure/cli/command_modules/sql/custom.py b/src/azure-cli/azure/cli/command_modules/sql/custom.py index 9289fc5e2ab..61c27351be3 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/custom.py +++ b/src/azure-cli/azure/cli/command_modules/sql/custom.py @@ -1475,6 +1475,59 @@ def db_threat_detection_policy_update( return instance +def db_sensitivity_label_update( + cmd, + client, + database_name, + server_name, + schema_name, + table_name, + column_name, + resource_group_name, + label_name = None, + information_type = None): + ''' + Updates a sensitivity label. Custom update function to apply parameters to instance. + ''' + + if (label_name is None and information_type is None): + raise CLIError('A label name or an information type must be provided.') + + ''' + Get the information protection policy + ''' + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from azure.mgmt.security import SecurityCenter + + securityCenterclient = get_mgmt_service_client(cmd.cli_ctx, SecurityCenter, asc_location="centralus") + + informationProtectionPolicy = securityCenterclient.information_protection_policies.get( + scope = '/providers/Microsoft.Management/managementGroups/{}'.format(_get_tenant_id()), + information_protection_policy_name = "effective") + + ''' + Find the label id and information type id in the policy by the label name provided + ''' + label_id = None + if (label_name is not None): + label_id = next((id for id in informationProtectionPolicy.labels if informationProtectionPolicy.labels[id].display_name.lower() == label_name.lower()), None) + if label_id is None: + raise CLIError('The provided label name was not found in the information protection policy.') + information_type_id = None + if (information_type is not None): + information_type_id = next((id for id in informationProtectionPolicy.information_types if informationProtectionPolicy.information_types[id].display_name.lower() == information_type.lower()), None) + if information_type_id is None: + raise CLIError('The provided information type was not found in the information protection policy.') + + params = { + 'label_name': label_name, + 'label_id': label_id, + 'information_type': information_type, + 'information_type_id': information_type_id + } + + return client.create_or_update(resource_group_name, server_name, database_name, schema_name, table_name, column_name, params) + ############################################### # sql dw # diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_labels.yaml b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_labels.yaml new file mode 100644 index 00000000000..2fda4b7c0fc --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_labels.yaml @@ -0,0 +1,1582 @@ +interactions: +- request: + body: '{"location": "westus", "properties": {"administratorLogin": "admin123", + "administratorLoginPassword": "SecretPassword123"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + Content-Length: + - '123' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -l -g -n -u -p + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002?api-version=2015-05-01-preview + response: + body: + string: '{"operation":"UpsertLogicalServer","startTime":"2019-12-17T12:24:35.07Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + cache-control: + - no-cache + content-length: + - '73' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:24:34 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverOperationResults/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -l -g -n -u -p + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + response: + body: + string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:24:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -l -g -n -u -p + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + response: + body: + string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:24:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -l -g -n -u -p + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + response: + body: + string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:24:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -l -g -n -u -p + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + response: + body: + string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:24:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -l -g -n -u -p + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + response: + body: + string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:25:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -l -g -n -u -p + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + response: + body: + string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"Succeeded","startTime":"2019-12-17T12:24:35.07Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:25:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql server create + Connection: + - keep-alive + ParameterSetName: + - -l -g -n -u -p + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002?api-version=2015-05-01-preview + response: + body: + string: '{"kind":"v12.0","properties":{"administratorLogin":"admin123","version":"12.0","state":"Ready","fullyQualifiedDomainName":"clitestserver000002.database.windows.net"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002","name":"clitestserver000002","type":"Microsoft.Sql/servers"}' + headers: + cache-control: + - no-cache + content-length: + - '580' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:25:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --sample-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002?api-version=2015-05-01-preview + response: + body: + string: '{"kind":"v12.0","properties":{"administratorLogin":"admin123","version":"12.0","state":"Ready","fullyQualifiedDomainName":"clitestserver000002.database.windows.net"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002","name":"clitestserver000002","type":"Microsoft.Sql/servers"}' + headers: + cache-control: + - no-cache + content-length: + - '580' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:25:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"sampleName": "AdventureWorksLT"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + Content-Length: + - '72' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -s -n --sample-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01?api-version=2017-10-01-preview + response: + body: + string: '{"operation":"CreateLogicalDatabase","startTime":"2019-12-17T12:25:54.957Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + cache-control: + - no-cache + content-length: + - '76' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:25:54 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseOperationResults/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --sample-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + response: + body: + string: '{"name":"2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99","status":"InProgress","startTime":"2019-12-17T12:25:54.957Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --sample-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + response: + body: + string: '{"name":"2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99","status":"InProgress","startTime":"2019-12-17T12:25:54.957Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:25 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --sample-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + response: + body: + string: '{"name":"2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99","status":"Succeeded","startTime":"2019-12-17T12:25:54.957Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db create + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --sample-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01?api-version=2017-10-01-preview + response: + body: + string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"d40f4e35-389b-40a4-97ad-53b1f6687940","creationDate":"2019-12-17T12:26:29.737Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"eastus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2019-12-17T12:56:29.737Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01","name":"sensitivitylabelsdb01","type":"Microsoft.Sql/servers/databases"}' + headers: + cache-control: + - no-cache + content-length: + - '1106' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels list + Connection: + - keep-alive + ParameterSetName: + - -g -s -n + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/currentSensitivityLabels?api-version=2017-03-01-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage account show + Connection: + - keep-alive + ParameterSetName: + - -g -n --query + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-storage/5.0.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003?api-version=2019-04-01 + response: + body: + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","name":"clitest000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-12-17T12:25:28.0220012Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-12-17T12:25:28.0220012Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-12-17T12:25:27.9439245Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/","file":"https://clitest000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' + headers: + cache-control: + - no-cache + content-length: + - '1168' + content-type: + - application/json + date: + - Tue, 17 Dec 2019 12:26:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage account keys list + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --query + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-storage/5.0.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003/listKeys?api-version=2019-04-01 + response: + body: + string: '{"keys":[{"keyName":"key1","value":"veryFakedStorageAccountKey==","permissions":"FULL"},{"keyName":"key2","value":"veryFakedStorageAccountKey==","permissions":"FULL"}]}' + headers: + cache-control: + - no-cache + content-length: + - '288' + content-type: + - application/json + date: + - Tue, 17 Dec 2019 12:26:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db threat-policy update + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --state --storage-key --storage-endpoint --retention-days --email-addresses + --disabled-alerts --email-account-admins + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/securityAlertPolicies/default?api-version=2014-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/securityAlertPolicies/default","name":"default","type":"Microsoft.Sql/servers/databases/securityAlertPolicies","location":"West + US","kind":null,"properties":{"useServerDefault":"Disabled","state":"Disabled","disabledAlerts":"","emailAddresses":"","emailAccountAdmins":"Disabled","storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '626' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Tue, 17 Dec 2019 12:26:45 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: 'b''{"location": "West US", "properties": {"state": "Enabled", "disabledAlerts": + "Sql_Injection_Vulnerability;Access_Anomaly", "emailAddresses": "test1@example.com;test2@example.com", + "emailAccountAdmins": "Enabled", "storageEndpoint": "https://clitest000003.blob.core.windows.net/", + "storageAccountAccessKey": "veryFakedStorageAccountKey==", "retentionDays": + 30, "useServerDefault": "Disabled"}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db threat-policy update + Connection: + - keep-alive + Content-Length: + - '463' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -s -n --state --storage-key --storage-endpoint --retention-days --email-addresses + --disabled-alerts --email-account-admins + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/securityAlertPolicies/default?api-version=2014-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/securityAlertPolicies/default","name":"default","type":"Microsoft.Sql/servers/databases/securityAlertPolicies","location":"West + US","kind":null,"properties":{"useServerDefault":"Disabled","state":"Enabled","disabledAlerts":"Sql_Injection_Vulnerability;Access_Anomaly","emailAddresses":"test1@example.com;test2@example.com","emailAccountAdmins":"Enabled","storageEndpoint":"https://clitest000003.blob.core.windows.net/","storageAccountAccessKey":"veryFakedStorageAccountKey==","retentionDays":30}}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '845' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Tue, 17 Dec 2019 12:26:47 GMT + preference-applied: + - return-content + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels list-recommended + Connection: + - keep-alive + ParameterSetName: + - -g -s -n + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview + response: + body: + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential + - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit + Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + headers: + cache-control: + - no-cache + content-length: + - '9673' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels disable-recommendation + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s -n --schema-name --table-name --column-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended/disable?api-version=2017-03-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 17 Dec 2019 12:26:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels list-recommended + Connection: + - keep-alive + ParameterSetName: + - -g -s -n + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview + response: + body: + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit + Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + headers: + cache-control: + - no-cache + content-length: + - '9032' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels enable-recommendation + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s -n --schema-name --table-name --column-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended/enable?api-version=2017-03-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 17 Dec 2019 12:26:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels list-recommended + Connection: + - keep-alive + ParameterSetName: + - -g -s -n + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview + response: + body: + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential + - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit + Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + headers: + cache-control: + - no-cache + content-length: + - '9673' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels update + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --schema-name --table-name --column-name --information-type --label-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-security/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/%2Fproviders%2FMicrosoft.Management%2FmanagementGroups%2F00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/informationProtectionPolicies/effective?api-version=2017-08-01-preview + response: + body: + string: "{\"id\":\"/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/informationProtectionPolicies/effective\",\"name\":\"effective\",\"type\":\"Microsoft.Security/InformationProtectionPolicies\",\"properties\":{\"lastModifiedUtc\":\"2018-08-12T09:07:19.9341023Z\",\"version\":\"2.0\",\"labels\":{\"50e58766-ab53-4846-be8a-35e0bb87723e\":{\"displayName\":\"Public\",\"description\":\"\",\"rank\":\"Medium\",\"order\":100,\"enabled\":true},\"6d21db50-501c-4250-8db3-638960433892\":{\"displayName\":\"General\",\"description\":\"\",\"rank\":\"Medium\",\"order\":200,\"enabled\":true},\"05e6eaa1-075a-4fb4-a732-a92215a2444a\":{\"displayName\":\"Confidential\",\"description\":\"\",\"rank\":\"Medium\",\"order\":300,\"enabled\":true},\"bf91e08c-f4f0-478a-b016-25164b2a65ff\":{\"displayName\":\"Confidential + - GDPR\",\"description\":\"\",\"rank\":\"Medium\",\"order\":400,\"enabled\":true},\"1bf478cb-3e74-414f-b579-2075823b138e\":{\"displayName\":\"Highly + Confidential\",\"description\":\"\",\"rank\":\"Medium\",\"order\":500,\"enabled\":true},\"674eabcd-dfb9-4261-8ac2-ac66ce366ab7\":{\"displayName\":\"Highly + Confidential - GDPR\",\"description\":\"\",\"rank\":\"Medium\",\"order\":600,\"enabled\":true}},\"informationTypes\":{\"b40ad280-0f6a-6ca8-11ba-2f1a08651fcf\":{\"displayName\":\"Networking\",\"description\":\"Data + related to the network domain. Example: IP, port, etc.\",\"order\":100,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"ip\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%[^h]ip%address%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"ip%address%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%mac%address%\",\"custom\":false,\"canBeNumeric\":false}]},\"5c503e21-22c6-81fa-620b-f369b8ec38d1\":{\"displayName\":\"Contact + Info\",\"description\":\"Contact data of a person. Example: address, phone, + etc.\",\"order\":200,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%email%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%e-mail%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%addr%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%street%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%city%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%phone%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%mobile%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%area%code%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%postal%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%zip%\",\"custom\":false,\"canBeNumeric\":true}]},\"c64aba7b-3a3e-95b6-535d-3bc535da5a59\":{\"displayName\":\"Credentials\",\"description\":\"Credential + related data. Example: username, password, etc.\",\"order\":300,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%username%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%pwd%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%password%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%reset%code%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%pass%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%user%acc%\",\"custom\":false,\"canBeNumeric\":true}]},\"d22fa6e9-5ee4-3bde-4c2b-a409604c4646\":{\"displayName\":\"Credit + Card\",\"description\":\"Credit card related data\",\"order\":700,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%credit%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%ccn%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%debit%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%visa%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%mastercard%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cvv%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%expy%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%expm%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%atmkaart%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%american%express%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%americanexpress%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%americano%espresso%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%amex%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%atm%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%atm%cards%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%atm%kaart%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%atmcard%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%atmcards%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carte%bancaire%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%atmkaarten%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%bancontact%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%bank%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%bankkaart%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%card%holder%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%card%num%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%card%type%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cardano%numerico%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carta%bianca%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carta%credito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carta%di%credito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cartao%de%credito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cartao%de%cr\xE9dito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cartao%de%debito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cartao%de%d\xE9bito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cirrus%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carte%blanche%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carte%bleue%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carte%de%credit%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carte%de%cr\xE9dit%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carte%di%credito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%carteblanche%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cart\xE3o%de%credito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cart\xE3o%de%cr\xE9dito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cart\xE3o%de%debito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cart\xE3o%de%d\xE9bito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%check%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%chequekaart%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%hoofdkaart%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cirrus-edc-maestro%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%controlekaart%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%credit%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%debet%kaart%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%debit%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%debito%automatico%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%diners%club%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%discover%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%discover%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%d\xE9bito%autom\xE1tico%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%eigent\xFCmername%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%european%debit%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%master%card%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%hoofdkaarten%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%in%viaggio%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%japanese%card%bureau%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%japanse%kaartdienst%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%jcb%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kaart%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kaart%num%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kaartaantal%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kaarthouder%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%karte%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%karteninhaber%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kartennr%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kartennummer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kreditkarte%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%maestro%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%de%carte%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"mc\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%mister%cash%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n%carta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n.%carta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no%de%tarjeta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no%do%cartao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no%do%cart\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no.%de%tarjeta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no.%do%cartao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no.%do%cart\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%nr%carta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%nr.%carta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numeri%di%scheda%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%carta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%de%cartao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xFAmero%de%cartao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%de%cart\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%de%tarjeta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%della%carta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%di%carta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%di%scheda%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%do%cartao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%do%cart\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%num\xE9ro%de%carte%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xBA%carta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xBA%de%carte%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xBA%de%la%carte%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xBA%de%tarjeta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xBA%do%cartao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xBA%do%cart\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xBA.%do%cart\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scoprono%le%schede%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xFAmero%de%cart\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xFAmero%de%tarjeta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xFAmero%do%cartao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scheda%dell'assegno%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scheda%dell'atmosfera%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scheda%dell'atmosfera%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scheda%della%banca%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scheda%di%controllo%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scheda%di%debito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scheda%matrice%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%schede%dell'atmosfera%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%schede%di%controllo%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%schede%di%debito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%schede%matrici%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scoprono%la%scheda%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%visa%plus%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%solo%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%supporti%di%scheda%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%supporto%di%scheda%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%switch%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjeta%atm%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjeta%credito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjeta%de%atm%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjeta%de%credito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjeta%de%debito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjeta%debito%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjeta%no%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjetahabiente%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tipo%della%scheda%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%ufficio%giapponese%della%scheda%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%v%pay%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%codice%di%verifica%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%visa%electron%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%visto%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%card%identification%number%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%card%verification%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cardi%la%verifica%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"cid\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cod%seg%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cod%seguranca%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cod%seguran\xE7a%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cod%sicurezza%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cod.%seg%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cod.%seguranca%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cod.%seguran\xE7a%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cod.%sicurezza%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%codice%di%sicurezza%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%c\xF3digo%de%seguranca%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%codigo%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%codigo%de%seguranca%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%codigo%de%seguran\xE7a%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%crittogramma%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cryptogram%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cryptogramme%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cv2%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cvc%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cvc2%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%cvn%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%c\xF3d%seguranca%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%c\xF3d%seguran\xE7a%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%c\xF3d.%seguranca%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%c\xF3d.%seguran\xE7a%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%c\xF3digo%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%di%sicurezza%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%c\xF3digo%de%seguran\xE7a%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%de%kaart%controle%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%geeft%nr%uit%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%issue%no%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%issue%number%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kaartidentificatienummer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kreditkartenprufnummer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kreditkartenpr\xFCfnummer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%kwestieaantal%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no.%dell'edizione%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no.%di%sicurezza%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%de%securite%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%de%verificacao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%dell'edizione%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%di%identificazione%della%scheda%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%veiligheid%nr%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%van%veiligheid%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%num\xE9ro%de%s\xE9curit\xE9%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xBA%autorizzazione%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%n\xFAmero%de%verifica\xE7\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%perno%il%blocco%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%pin%block%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%prufziffer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%pr\xFCfziffer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%security%code%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%security%no%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%security%number%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%sicherheits%kode%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%sicherheitscode%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%sicherheitsnummer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%speldblok%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%datum%van%exp%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%veiligheidsaantal%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%veiligheidscode%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%veiligheidsnummer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%verfalldatum%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%ablauf%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%data%de%expiracao%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%data%de%expira\xE7\xE3o%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%data%del%exp%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%data%di%exp%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%data%di%scadenza%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%data%em%que%expira%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%data%scad%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%data%scadenza%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%date%de%validit\xE9%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%datum%afloop%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%de%afloop%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%datum%van%exp%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%espira%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%espira%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%exp%date%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%exp%datum%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%expiration%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%expire%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%expires%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%expiry%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%fecha%de%expiracion%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%fecha%de%venc%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%gultig%bis%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%gultigkeitsdatum%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%g\xFCltig%bis%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%g\xFCltigkeitsdatum%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%scadenza%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%valable%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%validade%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%valido%hasta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%valor%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%venc%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%vencimento%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%vencimiento%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%verloopt%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%vervaldag%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%vervaldatum%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%vto%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%v\xE1lido%hasta%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tarjeta%cr\xE9dito%\",\"custom\":false,\"canBeNumeric\":true}]},\"8a462631-4130-0a31-9a52-c6a9ca125f92\":{\"displayName\":\"Banking\",\"description\":\"Bank + related data. Example: debit, swift, etc.\",\"order\":800,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%iban%code%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%iban%num%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%banking%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%routing%no%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%savings%acc%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%debit%acc%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"iban\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%routing%number%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"aba\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%aba%routing%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%bank%routing%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%swift%code%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%swift%routing%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%swift%num%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%bic%code%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%bic%num%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%acct%nbr%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%acct%num%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%acct%no%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%bank%acc%\",\"custom\":false,\"canBeNumeric\":true}]},\"c44193e1-0e58-4b2a-9001-f7d6e7bc1373\":{\"displayName\":\"Financial\",\"description\":\"Finance + related data. Example: account, payment, etc.\",\"order\":900,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%account%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tax%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%paypal%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%payment%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%insurance%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%pmt%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%amount%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%amt%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%compensation%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%currency%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%invoice%\",\"custom\":false,\"canBeNumeric\":true}]},\"9c5b4809-0ccc-0637-6547-91a6f8bb609d\":{\"displayName\":\"Other\",\"description\":\"Any + other data which doesn\u2019t fall into any of the above info types\",\"order\":1200,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%security%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%personal%\",\"custom\":false,\"canBeNumeric\":true}]},\"57845286-7598-22f5-9659-15b24aeb125e\":{\"displayName\":\"Name\",\"description\":\"Data + related to a person\u2019s first and last names\",\"order\":400,\"recommendedLabelId\":\"bf91e08c-f4f0-478a-b016-25164b2a65ff\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%last%name%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%first%name%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%surname%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%maiden%name%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%full%name%\",\"custom\":false,\"canBeNumeric\":false}]},\"6f5a11a7-08b1-19c3-59e5-8c89cf4f8444\":{\"displayName\":\"National + ID\",\"description\":\"Data related to the ID of a person. Example: passport, + diver, etc.\",\"order\":500,\"recommendedLabelId\":\"bf91e08c-f4f0-478a-b016-25164b2a65ff\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%passport%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Pasaporte%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%tax%id%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"itin\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%driver%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%identification%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Identificaci\xF3n%Fiscal%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%identification%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%id%number%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%national%id%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Fuehrerschein%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%F\xFChrerschein%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Fuhrerschein%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Fuehrerschein%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%num\xE9ro%identit\xE9%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no%identit\xE9%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no.%identit\xE9%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%numero%identite%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no%identite%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%no.%identite%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%le%num\xE9ro%d'identification%nationale%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%identit\xE9%nationale%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%reisepass%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%passeport%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Personalausweis%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Identifizierungsnummer%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Ausweis%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%Identifikation%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%patente%di%guida%\",\"custom\":false,\"canBeNumeric\":true}]},\"d936ec2c-04a4-9cf7-44c2-378a96456c61\":{\"displayName\":\"SSN\",\"description\":\"Data + related to the Social Security Number of a person\",\"order\":600,\"recommendedLabelId\":\"bf91e08c-f4f0-478a-b016-25164b2a65ff\",\"enabled\":true,\"keywords\":[{\"pattern\":\"ssn\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%ss_num%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%ssnum%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"sin\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%employeessn%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%social%security%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%soc%sec%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"ssid\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%insee%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%securit\xE9%sociale%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%securite%sociale%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%num\xE9ro%de%s\xE9curit\xE9%sociale%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%le%code%de%la%s\xE9curit\xE9%sociale%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%num\xE9ro%d'assurance%sociale%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%num\xE9ro%de%s\xE9cu%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%code%s\xE9cu%\",\"custom\":false,\"canBeNumeric\":true}]},\"6e2c5b18-97cf-3073-27ab-f12f87493da7\":{\"displayName\":\"Health\",\"description\":\"Health + related data. Example: patient, clinic, etc.\",\"order\":1000,\"recommendedLabelId\":\"bf91e08c-f4f0-478a-b016-25164b2a65ff\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%patient%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%clinic%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%medical%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%treatment%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%healthcondition%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%medication%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%health%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%prescription%\",\"custom\":false,\"canBeNumeric\":true}]},\"3de7cc52-710d-4e96-7e20-4d5188d2590c\":{\"displayName\":\"Date + Of Birth\",\"description\":\"Data related to a person\u2019s date of birth\",\"order\":1100,\"recommendedLabelId\":\"bf91e08c-f4f0-478a-b016-25164b2a65ff\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%birthday%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%date%of%birth%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%birth%date%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"dob\",\"custom\":false,\"canBeNumeric\":true}]}}}}" + headers: + cache-control: + - no-cache + content-length: + - '27397' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-resource-requests: + - '749' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"labelName": "Confidential - GDPR", "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", + "informationType": "Name", "informationTypeId": "57845286-7598-22f5-9659-15b24aeb125e"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels update + Connection: + - keep-alive + Content-Length: + - '191' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -s -n --schema-name --table-name --column-name --information-type --label-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview + response: + body: + string: '{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}' + headers: + cache-control: + - no-cache + content-length: + - '613' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels show + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --schema-name --table-name --column-name --sensitivity-label-source + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview + response: + body: + string: '{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}' + headers: + cache-control: + - no-cache + content-length: + - '613' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels list-recommended + Connection: + - keep-alive + ParameterSetName: + - -g -s -n + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview + response: + body: + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit + Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + headers: + cache-control: + - no-cache + content-length: + - '9032' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:26:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels list + Connection: + - keep-alive + ParameterSetName: + - -g -s -n + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/currentSensitivityLabels?api-version=2017-03-01-preview + response: + body: + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + headers: + cache-control: + - no-cache + content-length: + - '625' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:27:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -s -n --schema-name --table-name --column-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 17 Dec 2019 12:27:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db sensitivity-labels list + Connection: + - keep-alive + ParameterSetName: + - -g -s -n + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/currentSensitivityLabels?api-version=2017-03-01-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 17 Dec 2019 12:27:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py index 3616305a9bb..340afb87359 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py @@ -3560,3 +3560,132 @@ def test_sql_instance_failover_group_mgmt(self): self.cmd('sql instance-failover-group show -g {} -l {} -n {}' .format(resource_group_name, mi2_location, failover_group_name), expect_failure=True) + +class SqlDbSensitivityLabelsScenarioTest(ScenarioTest): + def _get_storage_endpoint(self, storage_account, resource_group): + return self.cmd('storage account show -g {} -n {}' + ' --query primaryEndpoints.blob' + .format(resource_group, storage_account)).get_output_in_json() + + def _get_storage_key(self, storage_account, resource_group): + return self.cmd('storage account keys list -g {} -n {} --query [0].value' + .format(resource_group, storage_account)).get_output_in_json() + + @ResourceGroupPreparer(location='westus') + @SqlServerPreparer(location='westus') + @StorageAccountPreparer(location='westus') + def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location, server, storage_account): + database_name = "sensitivitylabelsdb01" + + # create db + self.cmd('sql db create -g {} -s {} -n {} --sample-name {}' + .format(resource_group, server, database_name, 'AdventureWorksLT'), + checks=[ + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('name', database_name), + JMESPathCheck('status', 'Online')]) + + # list current sensitivity labels + self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[JMESPathCheck('length(@)', 0)]) # No labels are set at the beginning + + # get storage account endpoint and key + storage_endpoint = self._get_storage_endpoint(storage_account, resource_group) + key = self._get_storage_key(storage_account, resource_group) + + # enable ADS - (required to use data classification) + disabled_alerts_input = 'Sql_Injection_Vulnerability Access_Anomaly' + disabled_alerts_expected = 'Sql_Injection_Vulnerability;Access_Anomaly' + email_addresses_input = 'test1@example.com test2@example.com' + email_addresses_expected = 'test1@example.com;test2@example.com' + email_account_admins = 'Enabled' + state_enabled = 'Enabled' + retention_days = 30 + + self.cmd('sql db threat-policy update -g {} -s {} -n {}' + ' --state {} --storage-key {} --storage-endpoint {}' + ' --retention-days {} --email-addresses {} --disabled-alerts {}' + ' --email-account-admins {}' + .format(resource_group, server, database_name, state_enabled, key, + storage_endpoint, retention_days, email_addresses_input, + disabled_alerts_input, email_account_admins), + checks=[ + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('state', state_enabled), + JMESPathCheck('storageAccountAccessKey', key), + JMESPathCheck('storageEndpoint', storage_endpoint), + JMESPathCheck('retentionDays', retention_days), + JMESPathCheck('emailAddresses', email_addresses_expected), + JMESPathCheck('disabledAlerts', disabled_alerts_expected), + JMESPathCheck('emailAccountAdmins', email_account_admins)]) + + # list recommended sensitivity labels + expected_recommended_sensitivitylabels_count = 15 + recommendedLabels = self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count)]) + + schema_name = 'SalesLT' + table_name = 'Customer' + column_name = 'FirstName' + + # disable the recommendation for SalesLT/Customer/FirstName + self.cmd('sql db sensitivity-labels disable-recommendation -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + .format(resource_group, server, database_name, schema_name, table_name, column_name)) + + # list recommended sensitivity labels + self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count - 1)]) + + # re-enable the disabled recommendation + self.cmd('sql db sensitivity-labels enable-recommendation -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + .format(resource_group, server, database_name, schema_name, table_name, column_name)) + + # lits recommended sensitivity labels + self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count)]) + + # update the sensitivity label + information_type = 'Name' + label_name = 'Confidential - GDPR' + information_type_id = '57845286-7598-22f5-9659-15b24aeb125e' + label_id = 'bf91e08c-f4f0-478a-b016-25164b2a65ff' + + self.cmd('sql db sensitivity-labels update -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --information-type {} --label-name "{}"' + .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type, label_name), + checks=[ + JMESPathCheck('informationType', information_type), + JMESPathCheck('labelName', label_name), + JMESPathCheck('informationTypeId', information_type_id), + JMESPathCheck('labelId', label_id)]) + + # get the classified column + self.cmd('sql db sensitivity-labels show -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --sensitivity-label-source current' + .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type), + checks=[ + JMESPathCheck('informationType', information_type), + JMESPathCheck('labelName', label_name), + JMESPathCheck('informationTypeId', information_type_id), + JMESPathCheck('labelId', label_id)]) + + # list recommended labels + self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count - 1)]) + + # list current labels + self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[JMESPathCheck('length(@)', 1)]) + + # delete the label + self.cmd('sql db sensitivity-labels delete -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + .format(resource_group, server, database_name, schema_name, table_name, column_name)) + + # list current labels + self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[JMESPathCheck('length(@)', 0)]) From 0b3b0e2d91a418c0216ab0f062fafc2c08358f1b Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Tue, 17 Dec 2019 15:39:54 +0200 Subject: [PATCH 02/13] Fix history file --- src/azure-cli/HISTORY.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 85aee97a998..2cfd250b5e2 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -7,6 +7,10 @@ Release History * Add support for importing/exporting feature flags +**SQL** + +* New commands `sql db sensitivity-labels show/list/list-recommended/update/delete/enable-recommendation/disable-recommendation` to manage sensitivity labels for SQL databases. + 2.0.78 **ACR** @@ -118,7 +122,6 @@ Release History **SQL** * Added "--read-scale" and "--read-replicas" parameters to sql db create and update commands, to support read scale management. -* New commands `sql db sensitivity-labels show/list/list-recommended/update/delete/enable-recommendation/disable-recommendation` to manage sensitivity labels for SQL databases. **Storage** From e8f4ae30b6ad3f14f87c515102cafb74fcf254e6 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Tue, 17 Dec 2019 17:19:25 +0200 Subject: [PATCH 03/13] Fix failing style checks --- .../azure/cli/command_modules/sql/_help.py | 2 +- .../azure/cli/command_modules/sql/custom.py | 40 ++++++++++--------- .../sql/tests/latest/test_sql_commands.py | 38 +++++++++++------- 3 files changed, 45 insertions(+), 35 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/sql/_help.py b/src/azure-cli/azure/cli/command_modules/sql/_help.py index 6cbe674a8b6..168b1fc60a7 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_help.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_help.py @@ -886,4 +886,4 @@ examples: - name: Disable sensitivity recommendations for a given column. text: sql db sensitivity-labels disable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn -""" \ No newline at end of file +""" diff --git a/src/azure-cli/azure/cli/command_modules/sql/custom.py b/src/azure-cli/azure/cli/command_modules/sql/custom.py index 2038228200e..21dca090348 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/custom.py +++ b/src/azure-cli/azure/cli/command_modules/sql/custom.py @@ -1483,6 +1483,7 @@ def db_threat_detection_policy_update( return instance + def db_sensitivity_label_update( cmd, client, @@ -1492,49 +1493,50 @@ def db_sensitivity_label_update( table_name, column_name, resource_group_name, - label_name = None, - information_type = None): + label_name=None, + information_type=None): ''' Updates a sensitivity label. Custom update function to apply parameters to instance. ''' - if (label_name is None and information_type is None): raise CLIError('A label name or an information type must be provided.') - ''' - Get the information protection policy - ''' + # Get the information protection policy from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.mgmt.security import SecurityCenter securityCenterclient = get_mgmt_service_client(cmd.cli_ctx, SecurityCenter, asc_location="centralus") informationProtectionPolicy = securityCenterclient.information_protection_policies.get( - scope = '/providers/Microsoft.Management/managementGroups/{}'.format(_get_tenant_id()), - information_protection_policy_name = "effective") + scope='/providers/Microsoft.Management/managementGroups/{}'.format(_get_tenant_id()), + information_protection_policy_name="effective") - ''' - Find the label id and information type id in the policy by the label name provided - ''' + # Find the label id and information type id in the policy by the label name provided label_id = None - if (label_name is not None): - label_id = next((id for id in informationProtectionPolicy.labels if informationProtectionPolicy.labels[id].display_name.lower() == label_name.lower()), None) + if label_name is not None: + label_id = next((id for id in informationProtectionPolicy.labels + if informationProtectionPolicy.labels[id].display_name.lower() == + label_name.lower()), + None) if label_id is None: raise CLIError('The provided label name was not found in the information protection policy.') information_type_id = None - if (information_type is not None): - information_type_id = next((id for id in informationProtectionPolicy.information_types if informationProtectionPolicy.information_types[id].display_name.lower() == information_type.lower()), None) + if information_type is not None: + information_type_id = next((id for id in informationProtectionPolicy.information_types + if informationProtectionPolicy.information_types[id].display_name.lower() == + information_type.lower()), + None) if information_type_id is None: raise CLIError('The provided information type was not found in the information protection policy.') - + params = { 'label_name': label_name, 'label_id': label_id, 'information_type': information_type, - 'information_type_id': information_type_id - } + 'information_type_id': information_type_id} - return client.create_or_update(resource_group_name, server_name, database_name, schema_name, table_name, column_name, params) + return client.create_or_update( + resource_group_name, server_name, database_name, schema_name, table_name, column_name, params) ############################################### diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py index 102fcfddb6e..62a583fd23c 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py @@ -3602,6 +3602,7 @@ def test_sql_instance_failover_group_mgmt(self): .format(resource_group_name, mi2_location, failover_group_name), expect_failure=True) + class SqlDbSensitivityLabelsScenarioTest(ScenarioTest): def _get_storage_endpoint(self, storage_account, resource_group): return self.cmd('storage account show -g {} -n {}' @@ -3628,8 +3629,9 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location # list current sensitivity labels self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' - .format(resource_group, server, database_name), - checks=[JMESPathCheck('length(@)', 0)]) # No labels are set at the beginning + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', 0)]) # No labels are set at the beginning # get storage account endpoint and key storage_endpoint = self._get_storage_endpoint(storage_account, resource_group) @@ -3663,9 +3665,10 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location # list recommended sensitivity labels expected_recommended_sensitivitylabels_count = 15 - recommendedLabels = self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' - .format(resource_group, server, database_name), - checks=[JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count)]) + self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count)]) schema_name = 'SalesLT' table_name = 'Customer' @@ -3677,8 +3680,9 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location # list recommended sensitivity labels self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' - .format(resource_group, server, database_name), - checks=[JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count - 1)]) + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count - 1)]) # re-enable the disabled recommendation self.cmd('sql db sensitivity-labels enable-recommendation -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' @@ -3686,8 +3690,9 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location # lits recommended sensitivity labels self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' - .format(resource_group, server, database_name), - checks=[JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count)]) + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count)]) # update the sensitivity label information_type = 'Name' @@ -3714,13 +3719,15 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location # list recommended labels self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' - .format(resource_group, server, database_name), - checks=[JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count - 1)]) + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count - 1)]) # list current labels self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' - .format(resource_group, server, database_name), - checks=[JMESPathCheck('length(@)', 1)]) + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', 1)]) # delete the label self.cmd('sql db sensitivity-labels delete -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' @@ -3728,5 +3735,6 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location # list current labels self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' - .format(resource_group, server, database_name), - checks=[JMESPathCheck('length(@)', 0)]) + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', 0)]) From b9e37796e670404b3358a65dc6d4f662b377ca25 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Tue, 24 Dec 2019 14:10:12 +0200 Subject: [PATCH 04/13] Fix help --- .../azure/cli/command_modules/sql/_help.py | 14 +++--- .../azure/cli/command_modules/sql/_params.py | 45 +++++++++++++++++++ 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/sql/_help.py b/src/azure-cli/azure/cli/command_modules/sql/_help.py index 168b1fc60a7..8e58d802ddc 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_help.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_help.py @@ -837,7 +837,7 @@ long-summary: At least one of information-type or label-name must be provided. examples: - name: Update sensitivity label for a given column. - text: sql db sensitivity-labels update -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --information-type Name --label-name "Confidential - GDPR" + text: az sql db sensitivity-labels update -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --information-type Name --label-name "Confidential - GDPR" """ helps['sql db sensitivity-labels list'] = """ @@ -845,7 +845,7 @@ short-summary: Get the sensitivity labels of a given database. examples: - name: Get the sensitivity labels of a given database. - text: sql db sensitivity-labels list -g mygroup -s myserver -n mydb + text: az sql db sensitivity-labels list -g mygroup -s myserver -n mydb """ helps['sql db sensitivity-labels list-recommended'] = """ @@ -853,7 +853,7 @@ short-summary: Get the recommended sensitivity labels of a given database. examples: - name: Get the recommended sensitivity labels of a given database. - text: sql db sensitivity-labels list-recommended -g mygroup -s myserver -n mydb + text: az sql db sensitivity-labels list-recommended -g mygroup -s myserver -n mydb """ helps['sql db sensitivity-labels show'] = """ @@ -861,7 +861,7 @@ short-summary: Get the sensitivity label of a given column. examples: - name: Get the sensitivity label of a given column. - text: sql db sensitivity-labels show -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --sensitivity-label-source current + text: az sql db sensitivity-labels show -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --sensitivity-label-source current """ helps['sql db sensitivity-labels delete'] = """ @@ -869,7 +869,7 @@ short-summary: Delete the sensitivity label of a given column. examples: - name: Delete the sensitivity label of a given column. - text: sql db sensitivity-labels delete -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db sensitivity-labels delete -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ helps['sql db sensitivity-labels enable-recommendation'] = """ @@ -877,7 +877,7 @@ short-summary: Enable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). examples: - name: Enable sensitivity recommendations for a given column. - text: sql db sensitivity-labels enable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db sensitivity-labels enable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ helps['sql db sensitivity-labels disable-recommendation'] = """ @@ -885,5 +885,5 @@ short-summary: Disable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). examples: - name: Disable sensitivity recommendations for a given column. - text: sql db sensitivity-labels disable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db sensitivity-labels disable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ diff --git a/src/azure-cli/azure/cli/command_modules/sql/_params.py b/src/azure-cli/azure/cli/command_modules/sql/_params.py index 5d8778d1183..672b7c47c8f 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_params.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_params.py @@ -1422,3 +1422,48 @@ def _configure_security_policy_storage_params(arg_ctx): c.argument('allow_data_loss', arg_type=allow_data_loss_param_type) + + ############################################### + # sql sensitivity labels # + ############################################### + with self.argument_context('sql db sensitivity-labels update') as c: + c.argument('schema_name', + required=True, + help='The name of the schema.') + + c.argument('table_name', + required=True, + help='The name of the table.') + + c.argument('column_name', + required=True, + help='The name of the column.') + + c.argument('information_type', + required=True, + help='The information type.') + + c.argument('label_name', + required=True, + help='The label name') + + with self.argument_context('sql db sensitivity-labels list-recommended') as c: + c.argument('skip-token', + required=True, + help='The name of the schema.') + + c.argument('table_name', + required=True, + help='The name of the table.') + + c.argument('column_name', + required=True, + help='The name of the column.') + + c.argument('information_type', + required=True, + help='The information type.') + + c.argument('skip_token', + required=False, + help='The skip token.') From 21e46c0435297323dfad5e18d3c7376d822435c3 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Sun, 29 Dec 2019 11:38:45 +0200 Subject: [PATCH 05/13] Use g.command() for list, list-recommended, delete, enable-recommendation and disable-recommendation --- .../azure/cli/command_modules/sql/commands.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/sql/commands.py b/src/azure-cli/azure/cli/command_modules/sql/commands.py index a4360273ddc..a5bad422192 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/commands.py @@ -240,12 +240,12 @@ def load_command_table(self, _): database_sensitivity_labels_operations, client_factory=get_sql_database_sensitivity_labels_operations) as g: - g.show_command('list', 'list_current_by_database') - g.show_command('list-recommended', 'list_recommended_by_database') + g.command('list', 'list_current_by_database') + g.command('list-recommended', 'list_recommended_by_database') g.show_command('show', 'get') - g.show_command('delete', 'delete') - g.show_command('enable-recommendation', 'enable_recommendation') - g.show_command('disable-recommendation', 'disable_recommendation') + g.command('delete', 'delete') + g.command('enable-recommendation', 'enable_recommendation') + g.command('disable-recommendation', 'disable_recommendation') g.custom_command('update', 'db_sensitivity_label_update') database_threat_detection_policies_operations = CliCommandType( From f559e67faa2ca4ad1ec10f989d67e78840973bac Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Sun, 5 Jan 2020 13:34:14 +0200 Subject: [PATCH 06/13] rename sensitivity-labels to sensitivity-classification and add another group for recommendation --- src/azure-cli/HISTORY.rst | 2 +- .../azure/cli/command_modules/sql/_help.py | 58 +-- .../azure/cli/command_modules/sql/_params.py | 10 +- .../azure/cli/command_modules/sql/commands.py | 13 +- ...t_sql_db_sensitivity_classifications.yaml} | 372 +++++++++--------- .../sql/tests/latest/test_sql_commands.py | 56 +-- 6 files changed, 260 insertions(+), 251 deletions(-) rename src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/{test_sql_db_sensitivity_labels.yaml => test_sql_db_sensitivity_classifications.yaml} (76%) diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index ab8c610414c..ac8cca26b69 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -31,7 +31,7 @@ Release History **SQL** -* New commands `sql db sensitivity-labels show/list/list-recommended/update/delete/enable-recommendation/disable-recommendation` to manage sensitivity labels for SQL databases. +* New commands `sql db sensitivity-classification show/list/update/delete` and `sql db sensitivity-classification recommendation list/enable/disable` to manage sensitivity classifications for SQL databases. 2.0.78 ++++++ diff --git a/src/azure-cli/azure/cli/command_modules/sql/_help.py b/src/azure-cli/azure/cli/command_modules/sql/_help.py index 8e58d802ddc..b505a9e1cdd 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_help.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_help.py @@ -826,64 +826,68 @@ text: az sql virtual-cluster show -g mygroup -n mycluster """ -helps['sql db sensitivity-labels'] = """ +helps['sql db sensitivity-classification'] = """ type: group -short-summary: Manage sensitivity labels. +short-summary: Manage sensitivity classifications. """ -helps['sql db sensitivity-labels update'] = """ +helps['sql db sensitivity-classification update'] = """ type: command -short-summary: Update a columns's sensitivity label. -long-summary: At least one of information-type or label-name must be provided. +short-summary: Update a columns's sensitivity classification. examples: - - name: Update sensitivity label for a given column. - text: az sql db sensitivity-labels update -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --information-type Name --label-name "Confidential - GDPR" + - name: Update sensitivity classification for a given column. + text: az sql db sensitivity-classification update -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --information-type Name --label-name "Confidential - GDPR" """ -helps['sql db sensitivity-labels list'] = """ +helps['sql db sensitivity-classification list'] = """ type: command -short-summary: Get the sensitivity labels of a given database. +short-summary: Get the sensitivity classifications of a given database. examples: - - name: Get the sensitivity labels of a given database. - text: az sql db sensitivity-labels list -g mygroup -s myserver -n mydb + - name: List the sensitivity classification of a given database. + text: az sql db sensitivity-classification list -g mygroup -s myserver -n mydb """ -helps['sql db sensitivity-labels list-recommended'] = """ +helps['sql db sensitivity-classification show'] = """ type: command -short-summary: Get the recommended sensitivity labels of a given database. +short-summary: Get the sensitivity classification of a given column. examples: - - name: Get the recommended sensitivity labels of a given database. - text: az sql db sensitivity-labels list-recommended -g mygroup -s myserver -n mydb + - name: Get the sensitivity classification of a given column. + text: az sql db sensitivity-classification show -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --sensitivity-label-source current """ -helps['sql db sensitivity-labels show'] = """ +helps['sql db sensitivity-classification delete'] = """ type: command -short-summary: Get the sensitivity label of a given column. +short-summary: Delete the sensitivity classification of a given column. examples: - - name: Get the sensitivity label of a given column. - text: az sql db sensitivity-labels show -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --sensitivity-label-source current + - name: Delete the sensitivity classification of a given column. + text: az sql db sensitivity-classification delete -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ -helps['sql db sensitivity-labels delete'] = """ +helps['sql db sensitivity-classification recommendation'] = """ +type: group +short-summary: Manage sensitivity classification recommendations. +""" + +helps['sql db sensitivity-classification recommendation list'] = """ type: command -short-summary: Delete the sensitivity label of a given column. +short-summary: List the recommended sensitivity classifications of a given database. examples: - - name: Delete the sensitivity label of a given column. - text: az sql db sensitivity-labels delete -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + - name: List the recommended sensitivity classifications of a given database. + text: az sql db sensitivity-classification recommendation list -g mygroup -s myserver -n mydb """ -helps['sql db sensitivity-labels enable-recommendation'] = """ +helps['sql db sensitivity-classification recommendation enable'] = """ type: command short-summary: Enable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). examples: - name: Enable sensitivity recommendations for a given column. - text: az sql db sensitivity-labels enable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db sensitivity-classification recommendation enable -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ -helps['sql db sensitivity-labels disable-recommendation'] = """ +helps['sql db sensitivity-classification recommendation disable'] = """ type: command short-summary: Disable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). examples: - name: Disable sensitivity recommendations for a given column. - text: az sql db sensitivity-labels disable-recommendation -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db sensitivity-classification recommendation disable -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ diff --git a/src/azure-cli/azure/cli/command_modules/sql/_params.py b/src/azure-cli/azure/cli/command_modules/sql/_params.py index 672b7c47c8f..49f616d8b7c 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_params.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_params.py @@ -1423,10 +1423,10 @@ def _configure_security_policy_storage_params(arg_ctx): c.argument('allow_data_loss', arg_type=allow_data_loss_param_type) - ############################################### - # sql sensitivity labels # - ############################################### - with self.argument_context('sql db sensitivity-labels update') as c: + ################################################### + # sql sensitivity classification # + ################################################### + with self.argument_context('sql db sensitivity-classification update') as c: c.argument('schema_name', required=True, help='The name of the schema.') @@ -1447,7 +1447,7 @@ def _configure_security_policy_storage_params(arg_ctx): required=True, help='The label name') - with self.argument_context('sql db sensitivity-labels list-recommended') as c: + with self.argument_context('sql db sensitivity-classification recommendation list') as c: c.argument('skip-token', required=True, help='The name of the schema.') diff --git a/src/azure-cli/azure/cli/command_modules/sql/commands.py b/src/azure-cli/azure/cli/command_modules/sql/commands.py index a5bad422192..b0ba7c67abc 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/commands.py @@ -236,18 +236,23 @@ def load_command_table(self, _): operations_tmpl='azure.mgmt.sql.operations#SensitivityLabelsOperations.{}', client_factory=get_sql_database_sensitivity_labels_operations) - with self.command_group('sql db sensitivity-labels', + with self.command_group('sql db sensitivity-classification', database_sensitivity_labels_operations, client_factory=get_sql_database_sensitivity_labels_operations) as g: g.command('list', 'list_current_by_database') - g.command('list-recommended', 'list_recommended_by_database') g.show_command('show', 'get') g.command('delete', 'delete') - g.command('enable-recommendation', 'enable_recommendation') - g.command('disable-recommendation', 'disable_recommendation') g.custom_command('update', 'db_sensitivity_label_update') + with self.command_group('sql db sensitivity-classification recommendation', + database_sensitivity_labels_operations, + client_factory=get_sql_database_sensitivity_labels_operations) as g: + + g.command('list', 'list_recommended_by_database') + g.command('enable', 'enable_recommendation') + g.command('disable', 'disable_recommendation') + database_threat_detection_policies_operations = CliCommandType( operations_tmpl='azure.mgmt.sql.operations#DatabaseThreatDetectionPoliciesOperations.{}', client_factory=get_sql_database_threat_detection_policies_operations) diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_labels.yaml b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml similarity index 76% rename from src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_labels.yaml rename to src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml index 2fda4b7c0fc..44e58f42fc1 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_labels.yaml +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml @@ -19,29 +19,29 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002?api-version=2015-05-01-preview response: body: - string: '{"operation":"UpsertLogicalServer","startTime":"2019-12-17T12:24:35.07Z"}' + string: '{"operation":"UpsertLogicalServer","startTime":"2020-01-05T09:55:29.417Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview cache-control: - no-cache content-length: - - '73' + - '74' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:24:34 GMT + - Sun, 05 Jan 2020 09:55:29 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverOperationResults/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverOperationResults/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview pragma: - no-cache server: @@ -51,7 +51,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 202 message: Accepted @@ -70,21 +70,21 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview response: body: - string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:24:36 GMT + - Sun, 05 Jan 2020 09:55:31 GMT expires: - '-1' pragma: @@ -117,21 +117,21 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview response: body: - string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:24:37 GMT + - Sun, 05 Jan 2020 09:55:32 GMT expires: - '-1' pragma: @@ -164,21 +164,21 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview response: body: - string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:24:39 GMT + - Sun, 05 Jan 2020 09:55:33 GMT expires: - '-1' pragma: @@ -211,21 +211,21 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview response: body: - string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:24:40 GMT + - Sun, 05 Jan 2020 09:55:34 GMT expires: - '-1' pragma: @@ -258,21 +258,21 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview response: body: - string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"InProgress","startTime":"2019-12-17T12:24:35.07Z"}' + string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:25:01 GMT + - Sun, 05 Jan 2020 09:55:55 GMT expires: - '-1' pragma: @@ -305,21 +305,21 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/ab9db397-e486-4119-869d-e9e957934f73?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview response: body: - string: '{"name":"ab9db397-e486-4119-869d-e9e957934f73","status":"Succeeded","startTime":"2019-12-17T12:24:35.07Z"}' + string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"Succeeded","startTime":"2020-01-05T09:55:29.417Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:25:21 GMT + - Sun, 05 Jan 2020 09:56:15 GMT expires: - '-1' pragma: @@ -352,7 +352,7 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002?api-version=2015-05-01-preview response: @@ -362,11 +362,11 @@ interactions: cache-control: - no-cache content-length: - - '580' + - '577' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:25:21 GMT + - Sun, 05 Jan 2020 09:56:15 GMT expires: - '-1' pragma: @@ -399,7 +399,7 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET @@ -411,11 +411,11 @@ interactions: cache-control: - no-cache content-length: - - '580' + - '577' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:25:48 GMT + - Sun, 05 Jan 2020 09:56:41 GMT expires: - '-1' pragma: @@ -452,29 +452,29 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01?api-version=2017-10-01-preview response: body: - string: '{"operation":"CreateLogicalDatabase","startTime":"2019-12-17T12:25:54.957Z"}' + string: '{"operation":"CreateLogicalDatabase","startTime":"2020-01-05T09:56:47.5Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview cache-control: - no-cache content-length: - - '76' + - '74' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:25:54 GMT + - Sun, 05 Jan 2020 09:56:47 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseOperationResults/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseOperationResults/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview pragma: - no-cache server: @@ -503,21 +503,21 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview response: body: - string: '{"name":"2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99","status":"InProgress","startTime":"2019-12-17T12:25:54.957Z"}' + string: '{"name":"d364b866-0477-428c-b5e8-51043bd33c95","status":"InProgress","startTime":"2020-01-05T09:56:47.5Z"}' headers: cache-control: - no-cache content-length: - - '108' + - '106' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:09 GMT + - Sun, 05 Jan 2020 09:57:02 GMT expires: - '-1' pragma: @@ -550,21 +550,21 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview response: body: - string: '{"name":"2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99","status":"InProgress","startTime":"2019-12-17T12:25:54.957Z"}' + string: '{"name":"d364b866-0477-428c-b5e8-51043bd33c95","status":"InProgress","startTime":"2020-01-05T09:56:47.5Z"}' headers: cache-control: - no-cache content-length: - - '108' + - '106' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:25 GMT + - Sun, 05 Jan 2020 09:57:17 GMT expires: - '-1' pragma: @@ -597,21 +597,21 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview response: body: - string: '{"name":"2f302aa8-ffa9-4d2f-a4f0-2068e6abbb99","status":"Succeeded","startTime":"2019-12-17T12:25:54.957Z"}' + string: '{"name":"d364b866-0477-428c-b5e8-51043bd33c95","status":"Succeeded","startTime":"2020-01-05T09:56:47.5Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '105' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:40 GMT + - Sun, 05 Jan 2020 09:57:33 GMT expires: - '-1' pragma: @@ -644,21 +644,21 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01?api-version=2017-10-01-preview response: body: - string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"d40f4e35-389b-40a4-97ad-53b1f6687940","creationDate":"2019-12-17T12:26:29.737Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"eastus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2019-12-17T12:56:29.737Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01","name":"sensitivitylabelsdb01","type":"Microsoft.Sql/servers/databases"}' + string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"ee8d89c7-6e8f-4917-8c1c-913542ba8d6e","creationDate":"2020-01-05T09:57:19.843Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"eastus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-01-05T10:27:19.843Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01","name":"sensitivityclassificationsdb01","type":"Microsoft.Sql/servers/databases"}' headers: cache-control: - no-cache content-length: - - '1106' + - '1123' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:41 GMT + - Sun, 05 Jan 2020 09:57:34 GMT expires: - '-1' pragma: @@ -684,18 +684,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels list + - sql db sensitivity-classification list Connection: - keep-alive ParameterSetName: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/currentSensitivityLabels?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/currentSensitivityLabels?api-version=2017-03-01-preview response: body: string: '{"value":[]}' @@ -707,7 +707,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:42 GMT + - Sun, 05 Jan 2020 09:57:35 GMT expires: - '-1' pragma: @@ -740,14 +740,14 @@ interactions: - -g -n --query User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-storage/5.0.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-storage/5.0.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003?api-version=2019-04-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","name":"clitest000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-12-17T12:25:28.0220012Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-12-17T12:25:28.0220012Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-12-17T12:25:27.9439245Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/","file":"https://clitest000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","name":"clitest000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-01-05T09:56:21.3733252Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-01-05T09:56:21.3733252Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-01-05T09:56:21.2951960Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/","file":"https://clitest000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' headers: cache-control: - no-cache @@ -756,7 +756,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Dec 2019 12:26:43 GMT + - Sun, 05 Jan 2020 09:57:37 GMT expires: - '-1' pragma: @@ -791,7 +791,7 @@ interactions: - -g -n --query User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-storage/5.0.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-storage/5.0.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: POST @@ -807,7 +807,7 @@ interactions: content-type: - application/json date: - - Tue, 17 Dec 2019 12:26:44 GMT + - Sun, 05 Jan 2020 09:57:38 GMT expires: - '-1' pragma: @@ -843,26 +843,26 @@ interactions: --disabled-alerts --email-account-admins User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/securityAlertPolicies/default?api-version=2014-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/securityAlertPolicies/default?api-version=2014-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/securityAlertPolicies/default","name":"default","type":"Microsoft.Sql/servers/databases/securityAlertPolicies","location":"West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/securityAlertPolicies/default","name":"default","type":"Microsoft.Sql/servers/databases/securityAlertPolicies","location":"West US","kind":null,"properties":{"useServerDefault":"Disabled","state":"Disabled","disabledAlerts":"","emailAddresses":"","emailAccountAdmins":"Disabled","storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0}}' headers: cache-control: - no-store, no-cache content-length: - - '626' + - '634' content-type: - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 dataserviceversion: - 3.0; date: - - Tue, 17 Dec 2019 12:26:45 GMT + - Sun, 05 Jan 2020 09:57:39 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -900,26 +900,26 @@ interactions: --disabled-alerts --email-account-admins User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/securityAlertPolicies/default?api-version=2014-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/securityAlertPolicies/default?api-version=2014-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/securityAlertPolicies/default","name":"default","type":"Microsoft.Sql/servers/databases/securityAlertPolicies","location":"West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/securityAlertPolicies/default","name":"default","type":"Microsoft.Sql/servers/databases/securityAlertPolicies","location":"West US","kind":null,"properties":{"useServerDefault":"Disabled","state":"Enabled","disabledAlerts":"Sql_Injection_Vulnerability;Access_Anomaly","emailAddresses":"test1@example.com;test2@example.com","emailAccountAdmins":"Enabled","storageEndpoint":"https://clitest000003.blob.core.windows.net/","storageAccountAccessKey":"veryFakedStorageAccountKey==","retentionDays":30}}' headers: cache-control: - no-store, no-cache content-length: - - '845' + - '853' content-type: - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 dataserviceversion: - 3.0; date: - - Tue, 17 Dec 2019 12:26:47 GMT + - Sun, 05 Jan 2020 09:57:42 GMT preference-applied: - return-content server: @@ -933,7 +933,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -945,39 +945,39 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels list-recommended + - sql db sensitivity-classification recommendation list Connection: - keep-alive ParameterSetName: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview response: body: - string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential - - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit - Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential + - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit + Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' headers: cache-control: - no-cache content-length: - - '9673' + - '9793' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:49 GMT + - Sun, 05 Jan 2020 09:57:59 GMT expires: - '-1' pragma: @@ -1003,7 +1003,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels disable-recommendation + - sql db sensitivity-classification recommendation disable Connection: - keep-alive Content-Length: @@ -1012,11 +1012,11 @@ interactions: - -g -s -n --schema-name --table-name --column-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended/disable?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended/disable?api-version=2017-03-01-preview response: body: string: '' @@ -1026,7 +1026,7 @@ interactions: content-length: - '0' date: - - Tue, 17 Dec 2019 12:26:49 GMT + - Sun, 05 Jan 2020 09:58:02 GMT expires: - '-1' pragma: @@ -1038,7 +1038,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -1050,38 +1050,38 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels list-recommended + - sql db sensitivity-classification recommendation list Connection: - keep-alive ParameterSetName: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview response: body: - string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit - Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit + Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' headers: cache-control: - no-cache content-length: - - '9032' + - '9144' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:51 GMT + - Sun, 05 Jan 2020 09:58:03 GMT expires: - '-1' pragma: @@ -1107,7 +1107,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels enable-recommendation + - sql db sensitivity-classification recommendation enable Connection: - keep-alive Content-Length: @@ -1116,11 +1116,11 @@ interactions: - -g -s -n --schema-name --table-name --column-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended/enable?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended/enable?api-version=2017-03-01-preview response: body: string: '' @@ -1130,7 +1130,7 @@ interactions: content-length: - '0' date: - - Tue, 17 Dec 2019 12:26:53 GMT + - Sun, 05 Jan 2020 09:58:04 GMT expires: - '-1' pragma: @@ -1154,39 +1154,39 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels list-recommended + - sql db sensitivity-classification recommendation list Connection: - keep-alive ParameterSetName: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview response: body: - string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential - - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit - Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential + - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit + Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' headers: cache-control: - no-cache content-length: - - '9673' + - '9793' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:53 GMT + - Sun, 05 Jan 2020 09:58:07 GMT expires: - '-1' pragma: @@ -1212,14 +1212,14 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels update + - sql db sensitivity-classification update Connection: - keep-alive ParameterSetName: - -g -s -n --schema-name --table-name --column-name --information-type --label-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-security/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-security/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET @@ -1252,7 +1252,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:55 GMT + - Sun, 05 Jan 2020 09:58:08 GMT expires: - '-1' pragma: @@ -1281,7 +1281,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels update + - sql db sensitivity-classification update Connection: - keep-alive Content-Length: @@ -1292,23 +1292,23 @@ interactions: - -g -s -n --schema-name --table-name --column-name --information-type --label-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview response: body: - string: '{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}' + string: '{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}' headers: cache-control: - no-cache content-length: - - '613' + - '621' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:56 GMT + - Sun, 05 Jan 2020 09:58:08 GMT expires: - '-1' pragma: @@ -1336,30 +1336,30 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels show + - sql db sensitivity-classification show Connection: - keep-alive ParameterSetName: - -g -s -n --schema-name --table-name --column-name --sensitivity-label-source User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview response: body: - string: '{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}' + string: '{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}' headers: cache-control: - no-cache content-length: - - '613' + - '621' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:56 GMT + - Sun, 05 Jan 2020 09:58:10 GMT expires: - '-1' pragma: @@ -1385,38 +1385,38 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels list-recommended + - sql db sensitivity-classification recommendation list Connection: - keep-alive ParameterSetName: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/recommendedSensitivityLabels?api-version=2017-03-01-preview response: body: - string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact - Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit - Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/LastName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/EmailAddress/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/Phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/PasswordHash/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/PasswordSalt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credentials","informationTypeId":"c64aba7b-3a3e-95b6-535d-3bc535da5a59","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/dbo/tables/ErrorLog/columns/UserName/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/AddressLine1/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/AddressLine2/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/City/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Address/columns/PostalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/CustomerAddress/columns/AddressType/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/AccountNumber/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Credit + Card","informationTypeId":"d22fa6e9-5ee4-3bde-4c2b-a409604c4646","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/CreditCardApprovalCode/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"},{"properties":{"labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Financial","informationTypeId":"c44193e1-0e58-4b2a-9001-f7d6e7bc1373","isDisabled":false},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/SalesOrderHeader/columns/TaxAmt/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' headers: cache-control: - no-cache content-length: - - '9032' + - '9144' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:26:58 GMT + - Sun, 05 Jan 2020 09:58:13 GMT expires: - '-1' pragma: @@ -1442,30 +1442,30 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels list + - sql db sensitivity-classification list Connection: - keep-alive ParameterSetName: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/currentSensitivityLabels?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/currentSensitivityLabels?api-version=2017-03-01-preview response: body: - string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + string: '{"value":[{"properties":{"labelName":"Confidential - GDPR","labelId":"bf91e08c-f4f0-478a-b016-25164b2a65ff","informationType":"Name","informationTypeId":"57845286-7598-22f5-9659-15b24aeb125e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' headers: cache-control: - no-cache content-length: - - '625' + - '633' content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:27:00 GMT + - Sun, 05 Jan 2020 09:58:14 GMT expires: - '-1' pragma: @@ -1491,7 +1491,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels delete + - sql db sensitivity-classification delete Connection: - keep-alive Content-Length: @@ -1500,11 +1500,11 @@ interactions: - -g -s -n --schema-name --table-name --column-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview response: body: string: '' @@ -1514,7 +1514,7 @@ interactions: content-length: - '0' date: - - Tue, 17 Dec 2019 12:27:01 GMT + - Sun, 05 Jan 2020 09:58:15 GMT expires: - '-1' pragma: @@ -1538,18 +1538,18 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-labels list + - sql db sensitivity-classification list Connection: - keep-alive ParameterSetName: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.77 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivitylabelsdb01/currentSensitivityLabels?api-version=2017-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/currentSensitivityLabels?api-version=2017-03-01-preview response: body: string: '{"value":[]}' @@ -1561,7 +1561,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 17 Dec 2019 12:27:01 GMT + - Sun, 05 Jan 2020 09:58:16 GMT expires: - '-1' pragma: diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py index 62a583fd23c..6bd726219a8 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py @@ -3603,7 +3603,7 @@ def test_sql_instance_failover_group_mgmt(self): expect_failure=True) -class SqlDbSensitivityLabelsScenarioTest(ScenarioTest): +class SqlDbSensitivityClassificationsScenarioTest(ScenarioTest): def _get_storage_endpoint(self, storage_account, resource_group): return self.cmd('storage account show -g {} -n {}' ' --query primaryEndpoints.blob' @@ -3616,8 +3616,8 @@ def _get_storage_key(self, storage_account, resource_group): @ResourceGroupPreparer(location='westus') @SqlServerPreparer(location='westus') @StorageAccountPreparer(location='westus') - def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location, server, storage_account): - database_name = "sensitivitylabelsdb01" + def test_sql_db_sensitivity_classifications(self, resource_group, resource_group_location, server, storage_account): + database_name = "sensitivityclassificationsdb01" # create db self.cmd('sql db create -g {} -s {} -n {} --sample-name {}' @@ -3627,11 +3627,11 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location JMESPathCheck('name', database_name), JMESPathCheck('status', 'Online')]) - # list current sensitivity labels - self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' + # list current sensitivity classifications + self.cmd('sql db sensitivity-classification list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ - JMESPathCheck('length(@)', 0)]) # No labels are set at the beginning + JMESPathCheck('length(@)', 0)]) # No classifications are set at the beginning # get storage account endpoint and key storage_endpoint = self._get_storage_endpoint(storage_account, resource_group) @@ -3663,44 +3663,44 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location JMESPathCheck('disabledAlerts', disabled_alerts_expected), JMESPathCheck('emailAccountAdmins', email_account_admins)]) - # list recommended sensitivity labels - expected_recommended_sensitivitylabels_count = 15 - self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + # list recommended sensitivity classifications + expected_recommended_sensitivityclassifications_count = 15 + self.cmd('sql db sensitivity-classification recommendation list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ - JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count)]) + JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count)]) schema_name = 'SalesLT' table_name = 'Customer' column_name = 'FirstName' # disable the recommendation for SalesLT/Customer/FirstName - self.cmd('sql db sensitivity-labels disable-recommendation -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db sensitivity-classification recommendation disable -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) - # list recommended sensitivity labels - self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + # list recommended sensitivity classifications + self.cmd('sql db sensitivity-classification recommendation list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ - JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count - 1)]) + JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count - 1)]) # re-enable the disabled recommendation - self.cmd('sql db sensitivity-labels enable-recommendation -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db sensitivity-classification recommendation enable -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) - # lits recommended sensitivity labels - self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + # lits recommended sensitivity classifications + self.cmd('sql db sensitivity-classification recommendation list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ - JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count)]) + JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count)]) - # update the sensitivity label + # update the sensitivity classification information_type = 'Name' label_name = 'Confidential - GDPR' information_type_id = '57845286-7598-22f5-9659-15b24aeb125e' label_id = 'bf91e08c-f4f0-478a-b016-25164b2a65ff' - self.cmd('sql db sensitivity-labels update -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --information-type {} --label-name "{}"' + self.cmd('sql db sensitivity-classification update -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --information-type {} --label-name "{}"' .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type, label_name), checks=[ JMESPathCheck('informationType', information_type), @@ -3709,7 +3709,7 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location JMESPathCheck('labelId', label_id)]) # get the classified column - self.cmd('sql db sensitivity-labels show -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --sensitivity-label-source current' + self.cmd('sql db sensitivity-classification show -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --sensitivity-label-source current' .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type), checks=[ JMESPathCheck('informationType', information_type), @@ -3717,24 +3717,24 @@ def test_sql_db_sensitivity_labels(self, resource_group, resource_group_location JMESPathCheck('informationTypeId', information_type_id), JMESPathCheck('labelId', label_id)]) - # list recommended labels - self.cmd('sql db sensitivity-labels list-recommended -g {} -s {} -n {}' + # list recommended classifications + self.cmd('sql db sensitivity-classification recommendation list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ - JMESPathCheck('length(@)', expected_recommended_sensitivitylabels_count - 1)]) + JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count - 1)]) - # list current labels - self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' + # list current classifications + self.cmd('sql db sensitivity-classification list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', 1)]) # delete the label - self.cmd('sql db sensitivity-labels delete -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db sensitivity-classification delete -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) # list current labels - self.cmd('sql db sensitivity-labels list -g {} -s {} -n {}' + self.cmd('sql db sensitivity-classification list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', 0)]) From 72715a7c6a45c8a6fc15d2781c092085eac1be7d Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Sun, 5 Jan 2020 16:17:04 +0200 Subject: [PATCH 07/13] Fix sensitivity classifications test after sync --- ...st_sql_db_sensitivity_classifications.yaml | 243 +++++++----------- 1 file changed, 98 insertions(+), 145 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml index 44e58f42fc1..84125b6dea2 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml @@ -19,17 +19,17 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002?api-version=2015-05-01-preview response: body: - string: '{"operation":"UpsertLogicalServer","startTime":"2020-01-05T09:55:29.417Z"}' + string: '{"operation":"UpsertLogicalServer","startTime":"2020-01-05T13:26:25.383Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview cache-control: - no-cache content-length: @@ -37,11 +37,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:55:29 GMT + - Sun, 05 Jan 2020 13:26:25 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverOperationResults/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverOperationResults/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview pragma: - no-cache server: @@ -51,7 +51,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -70,12 +70,12 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview response: body: - string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' + string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' headers: cache-control: - no-cache @@ -84,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:55:31 GMT + - Sun, 05 Jan 2020 13:26:27 GMT expires: - '-1' pragma: @@ -117,12 +117,12 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview response: body: - string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' + string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' headers: cache-control: - no-cache @@ -131,7 +131,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:55:32 GMT + - Sun, 05 Jan 2020 13:26:28 GMT expires: - '-1' pragma: @@ -164,12 +164,12 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview response: body: - string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' + string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' headers: cache-control: - no-cache @@ -178,7 +178,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:55:33 GMT + - Sun, 05 Jan 2020 13:26:29 GMT expires: - '-1' pragma: @@ -211,12 +211,12 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview response: body: - string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' + string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' headers: cache-control: - no-cache @@ -225,7 +225,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:55:34 GMT + - Sun, 05 Jan 2020 13:26:31 GMT expires: - '-1' pragma: @@ -258,12 +258,12 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview response: body: - string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"InProgress","startTime":"2020-01-05T09:55:29.417Z"}' + string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' headers: cache-control: - no-cache @@ -272,7 +272,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:55:55 GMT + - Sun, 05 Jan 2020 13:26:51 GMT expires: - '-1' pragma: @@ -305,12 +305,12 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/b82bd8c6-b7ea-4e77-929b-2d3516d89bc8?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview response: body: - string: '{"name":"b82bd8c6-b7ea-4e77-929b-2d3516d89bc8","status":"Succeeded","startTime":"2020-01-05T09:55:29.417Z"}' + string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"Succeeded","startTime":"2020-01-05T13:26:25.383Z"}' headers: cache-control: - no-cache @@ -319,7 +319,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:56:15 GMT + - Sun, 05 Jan 2020 13:27:10 GMT expires: - '-1' pragma: @@ -352,7 +352,7 @@ interactions: - -l -g -n -u -p User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002?api-version=2015-05-01-preview response: @@ -366,7 +366,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:56:15 GMT + - Sun, 05 Jan 2020 13:27:11 GMT expires: - '-1' pragma: @@ -399,7 +399,7 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -415,7 +415,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:56:41 GMT + - Sun, 05 Jan 2020 13:27:38 GMT expires: - '-1' pragma: @@ -452,29 +452,29 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01?api-version=2017-10-01-preview response: body: - string: '{"operation":"CreateLogicalDatabase","startTime":"2020-01-05T09:56:47.5Z"}' + string: '{"operation":"CreateLogicalDatabase","startTime":"2020-01-05T13:27:43.167Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/e29f4894-54dd-4194-946e-d09d4e75e369?api-version=2017-10-01-preview cache-control: - no-cache content-length: - - '74' + - '76' content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:56:47 GMT + - Sun, 05 Jan 2020 13:27:43 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseOperationResults/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseOperationResults/e29f4894-54dd-4194-946e-d09d4e75e369?api-version=2017-10-01-preview pragma: - no-cache server: @@ -484,7 +484,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 202 message: Accepted @@ -503,68 +503,21 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/e29f4894-54dd-4194-946e-d09d4e75e369?api-version=2017-10-01-preview response: body: - string: '{"name":"d364b866-0477-428c-b5e8-51043bd33c95","status":"InProgress","startTime":"2020-01-05T09:56:47.5Z"}' + string: '{"name":"e29f4894-54dd-4194-946e-d09d4e75e369","status":"InProgress","startTime":"2020-01-05T13:27:43.167Z"}' headers: cache-control: - no-cache content-length: - - '106' - content-type: - - application/json; charset=utf-8 - date: - - Sun, 05 Jan 2020 09:57:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sql db create - Connection: - - keep-alive - ParameterSetName: - - -g -s -n --sample-name - User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview - response: - body: - string: '{"name":"d364b866-0477-428c-b5e8-51043bd33c95","status":"InProgress","startTime":"2020-01-05T09:56:47.5Z"}' - headers: - cache-control: - - no-cache - content-length: - - '106' + - '108' content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:57:17 GMT + - Sun, 05 Jan 2020 13:27:58 GMT expires: - '-1' pragma: @@ -597,21 +550,21 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/d364b866-0477-428c-b5e8-51043bd33c95?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/e29f4894-54dd-4194-946e-d09d4e75e369?api-version=2017-10-01-preview response: body: - string: '{"name":"d364b866-0477-428c-b5e8-51043bd33c95","status":"Succeeded","startTime":"2020-01-05T09:56:47.5Z"}' + string: '{"name":"e29f4894-54dd-4194-946e-d09d4e75e369","status":"Succeeded","startTime":"2020-01-05T13:27:43.167Z"}' headers: cache-control: - no-cache content-length: - - '105' + - '107' content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:57:33 GMT + - Sun, 05 Jan 2020 13:28:14 GMT expires: - '-1' pragma: @@ -644,12 +597,12 @@ interactions: - -g -s -n --sample-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01?api-version=2017-10-01-preview response: body: - string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"ee8d89c7-6e8f-4917-8c1c-913542ba8d6e","creationDate":"2020-01-05T09:57:19.843Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"eastus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-01-05T10:27:19.843Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01","name":"sensitivityclassificationsdb01","type":"Microsoft.Sql/servers/databases"}' + string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"bd3c4583-c34b-4d3f-b2d6-caabeb924536","creationDate":"2020-01-05T13:28:11.057Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"eastus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-01-05T13:58:11.057Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01","name":"sensitivityclassificationsdb01","type":"Microsoft.Sql/servers/databases"}' headers: cache-control: - no-cache @@ -658,7 +611,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:57:34 GMT + - Sun, 05 Jan 2020 13:28:14 GMT expires: - '-1' pragma: @@ -691,7 +644,7 @@ interactions: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -707,7 +660,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:57:35 GMT + - Sun, 05 Jan 2020 13:28:15 GMT expires: - '-1' pragma: @@ -740,23 +693,23 @@ interactions: - -g -n --query User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-storage/5.0.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-storage/7.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003?api-version=2019-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003?api-version=2019-06-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","name":"clitest000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-01-05T09:56:21.3733252Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-01-05T09:56:21.3733252Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-01-05T09:56:21.2951960Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/","file":"https://clitest000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","name":"clitest000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-01-05T13:27:18.0751444Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-01-05T13:27:18.0751444Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-01-05T13:27:18.0126153Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/","file":"https://clitest000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' headers: cache-control: - no-cache content-length: - - '1168' + - '1200' content-type: - application/json date: - - Sun, 05 Jan 2020 09:57:37 GMT + - Sun, 05 Jan 2020 13:28:16 GMT expires: - '-1' pragma: @@ -791,11 +744,11 @@ interactions: - -g -n --query User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-storage/5.0.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-storage/7.0.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003/listKeys?api-version=2019-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003/listKeys?api-version=2019-06-01 response: body: string: '{"keys":[{"keyName":"key1","value":"veryFakedStorageAccountKey==","permissions":"FULL"},{"keyName":"key2","value":"veryFakedStorageAccountKey==","permissions":"FULL"}]}' @@ -807,7 +760,7 @@ interactions: content-type: - application/json date: - - Sun, 05 Jan 2020 09:57:38 GMT + - Sun, 05 Jan 2020 13:28:18 GMT expires: - '-1' pragma: @@ -843,7 +796,7 @@ interactions: --disabled-alerts --email-account-admins User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -862,7 +815,7 @@ interactions: dataserviceversion: - 3.0; date: - - Sun, 05 Jan 2020 09:57:39 GMT + - Sun, 05 Jan 2020 13:28:19 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -900,7 +853,7 @@ interactions: --disabled-alerts --email-account-admins User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: PUT @@ -919,7 +872,7 @@ interactions: dataserviceversion: - 3.0; date: - - Sun, 05 Jan 2020 09:57:42 GMT + - Sun, 05 Jan 2020 13:28:21 GMT preference-applied: - return-content server: @@ -933,7 +886,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 200 message: OK @@ -952,7 +905,7 @@ interactions: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -977,7 +930,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:57:59 GMT + - Sun, 05 Jan 2020 13:28:24 GMT expires: - '-1' pragma: @@ -1012,7 +965,7 @@ interactions: - -g -s -n --schema-name --table-name --column-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: POST @@ -1026,7 +979,7 @@ interactions: content-length: - '0' date: - - Sun, 05 Jan 2020 09:58:02 GMT + - Sun, 05 Jan 2020 13:28:25 GMT expires: - '-1' pragma: @@ -1038,7 +991,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 200 message: OK @@ -1057,7 +1010,7 @@ interactions: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -1081,7 +1034,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:58:03 GMT + - Sun, 05 Jan 2020 13:28:49 GMT expires: - '-1' pragma: @@ -1116,7 +1069,7 @@ interactions: - -g -s -n --schema-name --table-name --column-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: POST @@ -1130,7 +1083,7 @@ interactions: content-length: - '0' date: - - Sun, 05 Jan 2020 09:58:04 GMT + - Sun, 05 Jan 2020 13:28:50 GMT expires: - '-1' pragma: @@ -1161,7 +1114,7 @@ interactions: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -1186,7 +1139,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:58:07 GMT + - Sun, 05 Jan 2020 13:28:53 GMT expires: - '-1' pragma: @@ -1219,17 +1172,17 @@ interactions: - -g -s -n --schema-name --table-name --column-name --information-type --label-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-security/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-security/0.1.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET uri: https://management.azure.com/%2Fproviders%2FMicrosoft.Management%2FmanagementGroups%2F00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/informationProtectionPolicies/effective?api-version=2017-08-01-preview response: body: - string: "{\"id\":\"/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/informationProtectionPolicies/effective\",\"name\":\"effective\",\"type\":\"Microsoft.Security/InformationProtectionPolicies\",\"properties\":{\"lastModifiedUtc\":\"2018-08-12T09:07:19.9341023Z\",\"version\":\"2.0\",\"labels\":{\"50e58766-ab53-4846-be8a-35e0bb87723e\":{\"displayName\":\"Public\",\"description\":\"\",\"rank\":\"Medium\",\"order\":100,\"enabled\":true},\"6d21db50-501c-4250-8db3-638960433892\":{\"displayName\":\"General\",\"description\":\"\",\"rank\":\"Medium\",\"order\":200,\"enabled\":true},\"05e6eaa1-075a-4fb4-a732-a92215a2444a\":{\"displayName\":\"Confidential\",\"description\":\"\",\"rank\":\"Medium\",\"order\":300,\"enabled\":true},\"bf91e08c-f4f0-478a-b016-25164b2a65ff\":{\"displayName\":\"Confidential + string: "{\"id\":\"/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/informationProtectionPolicies/effective\",\"name\":\"effective\",\"type\":\"Microsoft.Security/InformationProtectionPolicies\",\"properties\":{\"lastModifiedUtc\":\"2018-08-12T09:07:19.9341023Z\",\"version\":\"2.0\",\"labels\":{\"50e58766-ab53-4846-be8a-35e0bb87723e\":{\"displayName\":\"Public\",\"description\":\"\",\"rank\":\"None\",\"order\":100,\"enabled\":true},\"6d21db50-501c-4250-8db3-638960433892\":{\"displayName\":\"General\",\"description\":\"\",\"rank\":\"Low\",\"order\":200,\"enabled\":true},\"05e6eaa1-075a-4fb4-a732-a92215a2444a\":{\"displayName\":\"Confidential\",\"description\":\"\",\"rank\":\"Medium\",\"order\":300,\"enabled\":true},\"bf91e08c-f4f0-478a-b016-25164b2a65ff\":{\"displayName\":\"Confidential - GDPR\",\"description\":\"\",\"rank\":\"Medium\",\"order\":400,\"enabled\":true},\"1bf478cb-3e74-414f-b579-2075823b138e\":{\"displayName\":\"Highly - Confidential\",\"description\":\"\",\"rank\":\"Medium\",\"order\":500,\"enabled\":true},\"674eabcd-dfb9-4261-8ac2-ac66ce366ab7\":{\"displayName\":\"Highly - Confidential - GDPR\",\"description\":\"\",\"rank\":\"Medium\",\"order\":600,\"enabled\":true}},\"informationTypes\":{\"b40ad280-0f6a-6ca8-11ba-2f1a08651fcf\":{\"displayName\":\"Networking\",\"description\":\"Data + Confidential\",\"description\":\"\",\"rank\":\"High\",\"order\":500,\"enabled\":true},\"674eabcd-dfb9-4261-8ac2-ac66ce366ab7\":{\"displayName\":\"Highly + Confidential - GDPR\",\"description\":\"\",\"rank\":\"High\",\"order\":600,\"enabled\":true}},\"informationTypes\":{\"b40ad280-0f6a-6ca8-11ba-2f1a08651fcf\":{\"displayName\":\"Networking\",\"description\":\"Data related to the network domain. Example: IP, port, etc.\",\"order\":100,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"ip\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%[^h]ip%address%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"ip%address%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%mac%address%\",\"custom\":false,\"canBeNumeric\":false}]},\"5c503e21-22c6-81fa-620b-f369b8ec38d1\":{\"displayName\":\"Contact Info\",\"description\":\"Contact data of a person. Example: address, phone, etc.\",\"order\":200,\"recommendedLabelId\":\"05e6eaa1-075a-4fb4-a732-a92215a2444a\",\"enabled\":true,\"keywords\":[{\"pattern\":\"%email%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%e-mail%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%addr%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%street%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%city%\",\"custom\":false,\"canBeNumeric\":false},{\"pattern\":\"%phone%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%mobile%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%area%code%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%postal%\",\"custom\":false,\"canBeNumeric\":true},{\"pattern\":\"%zip%\",\"custom\":false,\"canBeNumeric\":true}]},\"c64aba7b-3a3e-95b6-535d-3bc535da5a59\":{\"displayName\":\"Credentials\",\"description\":\"Credential @@ -1248,11 +1201,11 @@ interactions: cache-control: - no-cache content-length: - - '27397' + - '27388' content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:58:08 GMT + - Sun, 05 Jan 2020 13:28:54 GMT expires: - '-1' pragma: @@ -1292,7 +1245,7 @@ interactions: - -g -s -n --schema-name --table-name --column-name --information-type --label-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: PUT @@ -1308,7 +1261,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:58:08 GMT + - Sun, 05 Jan 2020 13:28:54 GMT expires: - '-1' pragma: @@ -1343,7 +1296,7 @@ interactions: - -g -s -n --schema-name --table-name --column-name --sensitivity-label-source User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -1359,7 +1312,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:58:10 GMT + - Sun, 05 Jan 2020 13:28:56 GMT expires: - '-1' pragma: @@ -1392,7 +1345,7 @@ interactions: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -1416,7 +1369,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:58:13 GMT + - Sun, 05 Jan 2020 13:28:59 GMT expires: - '-1' pragma: @@ -1449,7 +1402,7 @@ interactions: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -1465,7 +1418,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:58:14 GMT + - Sun, 05 Jan 2020 13:28:59 GMT expires: - '-1' pragma: @@ -1500,7 +1453,7 @@ interactions: - -g -s -n --schema-name --table-name --column-name User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: DELETE @@ -1514,7 +1467,7 @@ interactions: content-length: - '0' date: - - Sun, 05 Jan 2020 09:58:15 GMT + - Sun, 05 Jan 2020 13:29:01 GMT expires: - '-1' pragma: @@ -1545,7 +1498,7 @@ interactions: - -g -s -n User-Agent: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 - azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.78 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 accept-language: - en-US method: GET @@ -1561,7 +1514,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 09:58:16 GMT + - Sun, 05 Jan 2020 13:29:01 GMT expires: - '-1' pragma: From 55b9c2582251b8f2c0d938690ebb94d0b13288b0 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Wed, 8 Jan 2020 10:53:45 +0200 Subject: [PATCH 08/13] Rename command from `sensitivity-classification` to `classification` --- src/azure-cli/HISTORY.rst | 2 +- .../azure/cli/command_modules/sql/_help.py | 32 +++++++++---------- .../azure/cli/command_modules/sql/_params.py | 23 +------------ .../azure/cli/command_modules/sql/commands.py | 6 ++-- .../azure/cli/command_modules/sql/custom.py | 8 +++++ .../sql/tests/latest/test_sql_commands.py | 24 +++++++------- 6 files changed, 41 insertions(+), 54 deletions(-) diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index c8bfdab49e5..c057b0da3eb 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -62,7 +62,7 @@ Release History **SQL** -* New commands `sql db sensitivity-classification show/list/update/delete` and `sql db sensitivity-classification recommendation list/enable/disable` to manage sensitivity classifications for SQL databases. +* New commands `sql db classification show/list/update/delete` and `sql db classification recommendation list/enable/disable` to manage sensitivity classifications for SQL databases. 2.0.78 ++++++ diff --git a/src/azure-cli/azure/cli/command_modules/sql/_help.py b/src/azure-cli/azure/cli/command_modules/sql/_help.py index b505a9e1cdd..c14b57b11f9 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_help.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_help.py @@ -826,68 +826,68 @@ text: az sql virtual-cluster show -g mygroup -n mycluster """ -helps['sql db sensitivity-classification'] = """ +helps['sql db classification'] = """ type: group short-summary: Manage sensitivity classifications. """ -helps['sql db sensitivity-classification update'] = """ +helps['sql db classification update'] = """ type: command short-summary: Update a columns's sensitivity classification. examples: - name: Update sensitivity classification for a given column. - text: az sql db sensitivity-classification update -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --information-type Name --label-name "Confidential - GDPR" + text: az sql db classification update -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --information-type Name --label-name "Confidential - GDPR" """ -helps['sql db sensitivity-classification list'] = """ +helps['sql db classification list'] = """ type: command short-summary: Get the sensitivity classifications of a given database. examples: - name: List the sensitivity classification of a given database. - text: az sql db sensitivity-classification list -g mygroup -s myserver -n mydb + text: az sql db classification list -g mygroup -s myserver -n mydb """ -helps['sql db sensitivity-classification show'] = """ +helps['sql db classification show'] = """ type: command short-summary: Get the sensitivity classification of a given column. examples: - name: Get the sensitivity classification of a given column. - text: az sql db sensitivity-classification show -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --sensitivity-label-source current + text: az sql db classification show -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --sensitivity-label-source current """ -helps['sql db sensitivity-classification delete'] = """ +helps['sql db classification delete'] = """ type: command short-summary: Delete the sensitivity classification of a given column. examples: - name: Delete the sensitivity classification of a given column. - text: az sql db sensitivity-classification delete -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db classification delete -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ -helps['sql db sensitivity-classification recommendation'] = """ +helps['sql db classification recommendation'] = """ type: group short-summary: Manage sensitivity classification recommendations. """ -helps['sql db sensitivity-classification recommendation list'] = """ +helps['sql db classification recommendation list'] = """ type: command short-summary: List the recommended sensitivity classifications of a given database. examples: - name: List the recommended sensitivity classifications of a given database. - text: az sql db sensitivity-classification recommendation list -g mygroup -s myserver -n mydb + text: az sql db classification recommendation list -g mygroup -s myserver -n mydb """ -helps['sql db sensitivity-classification recommendation enable'] = """ +helps['sql db classification recommendation enable'] = """ type: command short-summary: Enable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). examples: - name: Enable sensitivity recommendations for a given column. - text: az sql db sensitivity-classification recommendation enable -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db classification recommendation enable -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ -helps['sql db sensitivity-classification recommendation disable'] = """ +helps['sql db classification recommendation disable'] = """ type: command short-summary: Disable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). examples: - name: Disable sensitivity recommendations for a given column. - text: az sql db sensitivity-classification recommendation disable -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db classification recommendation disable -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn """ diff --git a/src/azure-cli/azure/cli/command_modules/sql/_params.py b/src/azure-cli/azure/cli/command_modules/sql/_params.py index 49f616d8b7c..da81d4a7b7f 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_params.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_params.py @@ -1426,7 +1426,7 @@ def _configure_security_policy_storage_params(arg_ctx): ################################################### # sql sensitivity classification # ################################################### - with self.argument_context('sql db sensitivity-classification update') as c: + with self.argument_context('sql db classification update') as c: c.argument('schema_name', required=True, help='The name of the schema.') @@ -1446,24 +1446,3 @@ def _configure_security_policy_storage_params(arg_ctx): c.argument('label_name', required=True, help='The label name') - - with self.argument_context('sql db sensitivity-classification recommendation list') as c: - c.argument('skip-token', - required=True, - help='The name of the schema.') - - c.argument('table_name', - required=True, - help='The name of the table.') - - c.argument('column_name', - required=True, - help='The name of the column.') - - c.argument('information_type', - required=True, - help='The information type.') - - c.argument('skip_token', - required=False, - help='The skip token.') diff --git a/src/azure-cli/azure/cli/command_modules/sql/commands.py b/src/azure-cli/azure/cli/command_modules/sql/commands.py index b0ba7c67abc..a094897c45c 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/commands.py @@ -236,7 +236,7 @@ def load_command_table(self, _): operations_tmpl='azure.mgmt.sql.operations#SensitivityLabelsOperations.{}', client_factory=get_sql_database_sensitivity_labels_operations) - with self.command_group('sql db sensitivity-classification', + with self.command_group('sql db classification', database_sensitivity_labels_operations, client_factory=get_sql_database_sensitivity_labels_operations) as g: @@ -245,11 +245,11 @@ def load_command_table(self, _): g.command('delete', 'delete') g.custom_command('update', 'db_sensitivity_label_update') - with self.command_group('sql db sensitivity-classification recommendation', + with self.command_group('sql db classification recommendation', database_sensitivity_labels_operations, client_factory=get_sql_database_sensitivity_labels_operations) as g: - g.command('list', 'list_recommended_by_database') + g.custom_command('list', 'db_recommended_sensitivity_labels_list') g.command('enable', 'enable_recommendation') g.command('disable', 'disable_recommendation') diff --git a/src/azure-cli/azure/cli/command_modules/sql/custom.py b/src/azure-cli/azure/cli/command_modules/sql/custom.py index 21dca090348..7723e339dea 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/custom.py +++ b/src/azure-cli/azure/cli/command_modules/sql/custom.py @@ -1484,6 +1484,14 @@ def db_threat_detection_policy_update( return instance +def db_recommended_sensitivity_labels_list( + client, + database_name, + server_name, + resource_group_name): + return client.list_recommended_by_database(resource_group_name, server_name, database_name) + + def db_sensitivity_label_update( cmd, client, diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py index 6bd726219a8..9026c0a0f29 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py @@ -3628,7 +3628,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group JMESPathCheck('status', 'Online')]) # list current sensitivity classifications - self.cmd('sql db sensitivity-classification list -g {} -s {} -n {}' + self.cmd('sql db classification list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', 0)]) # No classifications are set at the beginning @@ -3665,7 +3665,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group # list recommended sensitivity classifications expected_recommended_sensitivityclassifications_count = 15 - self.cmd('sql db sensitivity-classification recommendation list -g {} -s {} -n {}' + self.cmd('sql db classification recommendation list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count)]) @@ -3675,21 +3675,21 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group column_name = 'FirstName' # disable the recommendation for SalesLT/Customer/FirstName - self.cmd('sql db sensitivity-classification recommendation disable -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db classification recommendation disable -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) # list recommended sensitivity classifications - self.cmd('sql db sensitivity-classification recommendation list -g {} -s {} -n {}' + self.cmd('sql db classification recommendation list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count - 1)]) # re-enable the disabled recommendation - self.cmd('sql db sensitivity-classification recommendation enable -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db classification recommendation enable -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) # lits recommended sensitivity classifications - self.cmd('sql db sensitivity-classification recommendation list -g {} -s {} -n {}' + self.cmd('sql db classification recommendation list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count)]) @@ -3700,7 +3700,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group information_type_id = '57845286-7598-22f5-9659-15b24aeb125e' label_id = 'bf91e08c-f4f0-478a-b016-25164b2a65ff' - self.cmd('sql db sensitivity-classification update -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --information-type {} --label-name "{}"' + self.cmd('sql db classification update -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --information-type {} --label-name "{}"' .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type, label_name), checks=[ JMESPathCheck('informationType', information_type), @@ -3709,7 +3709,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group JMESPathCheck('labelId', label_id)]) # get the classified column - self.cmd('sql db sensitivity-classification show -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --sensitivity-label-source current' + self.cmd('sql db classification show -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --sensitivity-label-source current' .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type), checks=[ JMESPathCheck('informationType', information_type), @@ -3718,23 +3718,23 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group JMESPathCheck('labelId', label_id)]) # list recommended classifications - self.cmd('sql db sensitivity-classification recommendation list -g {} -s {} -n {}' + self.cmd('sql db classification recommendation list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count - 1)]) # list current classifications - self.cmd('sql db sensitivity-classification list -g {} -s {} -n {}' + self.cmd('sql db classification list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', 1)]) # delete the label - self.cmd('sql db sensitivity-classification delete -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db classification delete -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) # list current labels - self.cmd('sql db sensitivity-classification list -g {} -s {} -n {}' + self.cmd('sql db classification list -g {} -s {} -n {}' .format(resource_group, server, database_name), checks=[ JMESPathCheck('length(@)', 0)]) From 5005b6fd794c546f4ebf4e061573779710940c06 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Wed, 8 Jan 2020 13:11:46 +0200 Subject: [PATCH 09/13] information_type and label_name should not be required --- .../azure/cli/command_modules/sql/_params.py | 4 +- .../azure/cli/command_modules/sql/custom.py | 38 +++- ...st_sql_db_sensitivity_classifications.yaml | 184 +++++++++++------- 3 files changed, 145 insertions(+), 81 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/sql/_params.py b/src/azure-cli/azure/cli/command_modules/sql/_params.py index da81d4a7b7f..1f80f5155f4 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_params.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_params.py @@ -1440,9 +1440,9 @@ def _configure_security_policy_storage_params(arg_ctx): help='The name of the column.') c.argument('information_type', - required=True, + required=False, help='The information type.') c.argument('label_name', - required=True, + required=False, help='The label name') diff --git a/src/azure-cli/azure/cli/command_modules/sql/custom.py b/src/azure-cli/azure/cli/command_modules/sql/custom.py index 7723e339dea..992f71f067e 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/custom.py +++ b/src/azure-cli/azure/cli/command_modules/sql/custom.py @@ -1506,12 +1506,11 @@ def db_sensitivity_label_update( ''' Updates a sensitivity label. Custom update function to apply parameters to instance. ''' - if (label_name is None and information_type is None): - raise CLIError('A label name or an information type must be provided.') # Get the information protection policy from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.mgmt.security import SecurityCenter + from msrestazure.azure_exceptions import CloudError securityCenterclient = get_mgmt_service_client(cmd.cli_ctx, SecurityCenter, asc_location="centralus") @@ -1519,29 +1518,48 @@ def db_sensitivity_label_update( scope='/providers/Microsoft.Management/managementGroups/{}'.format(_get_tenant_id()), information_protection_policy_name="effective") + params = { + 'label_name': None, + 'label_id': None, + 'information_type': None, + 'information_type_id': None} + + # Get the current label + try: + current_label = client.get( + resource_group_name, server_name, database_name, schema_name, table_name, column_name, 'current') + # Initialize with existing values + params = { + 'label_name': current_label.label_name, + 'label_id': current_label.label_id, + 'information_type': current_label.information_type, + 'information_type_id': current_label.information_type_id} + + except CloudError as ex: + if not(ex.error and ex.error.error and 'SensitivityLabelsLabelNotFound' in ex.error.error): + raise ex + # Find the label id and information type id in the policy by the label name provided label_id = None - if label_name is not None: + if label_name: label_id = next((id for id in informationProtectionPolicy.labels if informationProtectionPolicy.labels[id].display_name.lower() == label_name.lower()), None) if label_id is None: raise CLIError('The provided label name was not found in the information protection policy.') + params['label_id'] = label_id + params['label_name'] = label_name information_type_id = None - if information_type is not None: + if information_type: information_type_id = next((id for id in informationProtectionPolicy.information_types if informationProtectionPolicy.information_types[id].display_name.lower() == information_type.lower()), None) if information_type_id is None: raise CLIError('The provided information type was not found in the information protection policy.') - - params = { - 'label_name': label_name, - 'label_id': label_id, - 'information_type': information_type, - 'information_type_id': information_type_id} + params['information_type_id'] = information_type_id + params['information_type'] = information_type return client.create_or_update( resource_group_name, server_name, database_name, schema_name, table_name, column_name, params) diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml index 84125b6dea2..47c08788717 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml @@ -26,10 +26,10 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002?api-version=2015-05-01-preview response: body: - string: '{"operation":"UpsertLogicalServer","startTime":"2020-01-05T13:26:25.383Z"}' + string: '{"operation":"UpsertLogicalServer","startTime":"2020-01-08T10:44:28.697Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview cache-control: - no-cache content-length: @@ -37,11 +37,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:26:25 GMT + - Wed, 08 Jan 2020 10:44:28 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverOperationResults/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverOperationResults/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview pragma: - no-cache server: @@ -72,10 +72,10 @@ interactions: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview response: body: - string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' + string: '{"name":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' headers: cache-control: - no-cache @@ -84,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:26:27 GMT + - Wed, 08 Jan 2020 10:44:29 GMT expires: - '-1' pragma: @@ -119,10 +119,10 @@ interactions: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview response: body: - string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' + string: '{"name":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' headers: cache-control: - no-cache @@ -131,7 +131,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:26:28 GMT + - Wed, 08 Jan 2020 10:44:31 GMT expires: - '-1' pragma: @@ -166,10 +166,10 @@ interactions: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview response: body: - string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' + string: '{"name":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' headers: cache-control: - no-cache @@ -178,7 +178,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:26:29 GMT + - Wed, 08 Jan 2020 10:44:33 GMT expires: - '-1' pragma: @@ -213,10 +213,10 @@ interactions: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview response: body: - string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' + string: '{"name":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' headers: cache-control: - no-cache @@ -225,7 +225,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:26:31 GMT + - Wed, 08 Jan 2020 10:44:34 GMT expires: - '-1' pragma: @@ -260,10 +260,10 @@ interactions: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview response: body: - string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"InProgress","startTime":"2020-01-05T13:26:25.383Z"}' + string: '{"name":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' headers: cache-control: - no-cache @@ -272,7 +272,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:26:51 GMT + - Wed, 08 Jan 2020 10:44:54 GMT expires: - '-1' pragma: @@ -307,10 +307,10 @@ interactions: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/c694c633-5a9b-4adc-a89f-80f054f5dfb3?api-version=2015-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/serverAzureAsyncOperation/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview response: body: - string: '{"name":"c694c633-5a9b-4adc-a89f-80f054f5dfb3","status":"Succeeded","startTime":"2020-01-05T13:26:25.383Z"}' + string: '{"name":"577ff409-61d7-4565-9e63-d1641534e241","status":"Succeeded","startTime":"2020-01-08T10:44:28.697Z"}' headers: cache-control: - no-cache @@ -319,7 +319,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:27:10 GMT + - Wed, 08 Jan 2020 10:45:14 GMT expires: - '-1' pragma: @@ -366,7 +366,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:27:11 GMT + - Wed, 08 Jan 2020 10:45:14 GMT expires: - '-1' pragma: @@ -415,7 +415,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:27:38 GMT + - Wed, 08 Jan 2020 10:45:41 GMT expires: - '-1' pragma: @@ -459,10 +459,10 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01?api-version=2017-10-01-preview response: body: - string: '{"operation":"CreateLogicalDatabase","startTime":"2020-01-05T13:27:43.167Z"}' + string: '{"operation":"CreateLogicalDatabase","startTime":"2020-01-08T10:45:46.933Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/e29f4894-54dd-4194-946e-d09d4e75e369?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/920cf962-7400-4bca-9057-e201a34d864d?api-version=2017-10-01-preview cache-control: - no-cache content-length: @@ -470,11 +470,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:27:43 GMT + - Wed, 08 Jan 2020 10:45:46 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseOperationResults/e29f4894-54dd-4194-946e-d09d4e75e369?api-version=2017-10-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseOperationResults/920cf962-7400-4bca-9057-e201a34d864d?api-version=2017-10-01-preview pragma: - no-cache server: @@ -484,7 +484,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -505,10 +505,10 @@ interactions: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/e29f4894-54dd-4194-946e-d09d4e75e369?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/920cf962-7400-4bca-9057-e201a34d864d?api-version=2017-10-01-preview response: body: - string: '{"name":"e29f4894-54dd-4194-946e-d09d4e75e369","status":"InProgress","startTime":"2020-01-05T13:27:43.167Z"}' + string: '{"name":"920cf962-7400-4bca-9057-e201a34d864d","status":"InProgress","startTime":"2020-01-08T10:45:46.933Z"}' headers: cache-control: - no-cache @@ -517,7 +517,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:27:58 GMT + - Wed, 08 Jan 2020 10:46:02 GMT expires: - '-1' pragma: @@ -552,10 +552,10 @@ interactions: - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/e29f4894-54dd-4194-946e-d09d4e75e369?api-version=2017-10-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/locations/westus/databaseAzureAsyncOperation/920cf962-7400-4bca-9057-e201a34d864d?api-version=2017-10-01-preview response: body: - string: '{"name":"e29f4894-54dd-4194-946e-d09d4e75e369","status":"Succeeded","startTime":"2020-01-05T13:27:43.167Z"}' + string: '{"name":"920cf962-7400-4bca-9057-e201a34d864d","status":"Succeeded","startTime":"2020-01-08T10:45:46.933Z"}' headers: cache-control: - no-cache @@ -564,7 +564,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:14 GMT + - Wed, 08 Jan 2020 10:46:17 GMT expires: - '-1' pragma: @@ -602,7 +602,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01?api-version=2017-10-01-preview response: body: - string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"bd3c4583-c34b-4d3f-b2d6-caabeb924536","creationDate":"2020-01-05T13:28:11.057Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"eastus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-01-05T13:58:11.057Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01","name":"sensitivityclassificationsdb01","type":"Microsoft.Sql/servers/databases"}' + string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"f5945a70-e799-48cd-818a-12674f2e059d","creationDate":"2020-01-08T10:46:17.187Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"eastus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-01-08T11:16:17.187Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2}},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01","name":"sensitivityclassificationsdb01","type":"Microsoft.Sql/servers/databases"}' headers: cache-control: - no-cache @@ -611,7 +611,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:14 GMT + - Wed, 08 Jan 2020 10:46:17 GMT expires: - '-1' pragma: @@ -637,7 +637,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification list + - sql db classification list Connection: - keep-alive ParameterSetName: @@ -660,7 +660,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:15 GMT + - Wed, 08 Jan 2020 10:46:21 GMT expires: - '-1' pragma: @@ -700,7 +700,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003?api-version=2019-06-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","name":"clitest000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-01-05T13:27:18.0751444Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-01-05T13:27:18.0751444Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-01-05T13:27:18.0126153Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/","file":"https://clitest000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clitest000003","name":"clitest000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-01-08T10:45:21.0811849Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-01-08T10:45:21.0811849Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-01-08T10:45:21.0030313Z","primaryEndpoints":{"blob":"https://clitest000003.blob.core.windows.net/","queue":"https://clitest000003.queue.core.windows.net/","table":"https://clitest000003.table.core.windows.net/","file":"https://clitest000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}' headers: cache-control: - no-cache @@ -709,7 +709,7 @@ interactions: content-type: - application/json date: - - Sun, 05 Jan 2020 13:28:16 GMT + - Wed, 08 Jan 2020 10:46:22 GMT expires: - '-1' pragma: @@ -760,7 +760,7 @@ interactions: content-type: - application/json date: - - Sun, 05 Jan 2020 13:28:18 GMT + - Wed, 08 Jan 2020 10:46:24 GMT expires: - '-1' pragma: @@ -815,7 +815,7 @@ interactions: dataserviceversion: - 3.0; date: - - Sun, 05 Jan 2020 13:28:19 GMT + - Wed, 08 Jan 2020 10:46:25 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -872,7 +872,7 @@ interactions: dataserviceversion: - 3.0; date: - - Sun, 05 Jan 2020 13:28:21 GMT + - Wed, 08 Jan 2020 10:46:27 GMT preference-applied: - return-content server: @@ -898,7 +898,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification recommendation list + - sql db classification recommendation list Connection: - keep-alive ParameterSetName: @@ -930,7 +930,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:24 GMT + - Wed, 08 Jan 2020 10:46:30 GMT expires: - '-1' pragma: @@ -956,7 +956,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification recommendation disable + - sql db classification recommendation disable Connection: - keep-alive Content-Length: @@ -979,7 +979,7 @@ interactions: content-length: - '0' date: - - Sun, 05 Jan 2020 13:28:25 GMT + - Wed, 08 Jan 2020 10:46:31 GMT expires: - '-1' pragma: @@ -1003,7 +1003,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification recommendation list + - sql db classification recommendation list Connection: - keep-alive ParameterSetName: @@ -1034,7 +1034,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:49 GMT + - Wed, 08 Jan 2020 10:46:32 GMT expires: - '-1' pragma: @@ -1060,7 +1060,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification recommendation enable + - sql db classification recommendation enable Connection: - keep-alive Content-Length: @@ -1083,7 +1083,7 @@ interactions: content-length: - '0' date: - - Sun, 05 Jan 2020 13:28:50 GMT + - Wed, 08 Jan 2020 10:46:33 GMT expires: - '-1' pragma: @@ -1107,7 +1107,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification recommendation list + - sql db classification recommendation list Connection: - keep-alive ParameterSetName: @@ -1139,7 +1139,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:53 GMT + - Wed, 08 Jan 2020 10:46:35 GMT expires: - '-1' pragma: @@ -1165,7 +1165,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification update + - sql db classification update Connection: - keep-alive ParameterSetName: @@ -1205,7 +1205,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:54 GMT + - Wed, 08 Jan 2020 10:46:37 GMT expires: - '-1' pragma: @@ -1225,6 +1225,52 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db classification update + Connection: + - keep-alive + ParameterSetName: + - -g -s -n --schema-name --table-name --column-name --information-type --label-name + User-Agent: + - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2 + azure-mgmt-sql/0.15.0 Azure-SDK-For-Python AZURECLI/2.0.79 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current?api-version=2017-03-01-preview + response: + body: + string: '{"error":{"code":"SensitivityLabelsLabelNotFound","message":"The specified + sensitivity label could not be found"}}' + headers: + cache-control: + - no-cache + content-length: + - '114' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 404 + message: Not Found - request: body: '{"properties": {"labelName": "Confidential - GDPR", "labelId": "bf91e08c-f4f0-478a-b016-25164b2a65ff", "informationType": "Name", "informationTypeId": "57845286-7598-22f5-9659-15b24aeb125e"}}' @@ -1234,7 +1280,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification update + - sql db classification update Connection: - keep-alive Content-Length: @@ -1261,7 +1307,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:54 GMT + - Wed, 08 Jan 2020 10:46:38 GMT expires: - '-1' pragma: @@ -1277,7 +1323,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -1289,7 +1335,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification show + - sql db classification show Connection: - keep-alive ParameterSetName: @@ -1312,7 +1358,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:56 GMT + - Wed, 08 Jan 2020 10:46:39 GMT expires: - '-1' pragma: @@ -1338,7 +1384,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification recommendation list + - sql db classification recommendation list Connection: - keep-alive ParameterSetName: @@ -1369,7 +1415,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:59 GMT + - Wed, 08 Jan 2020 10:46:40 GMT expires: - '-1' pragma: @@ -1395,7 +1441,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification list + - sql db classification list Connection: - keep-alive ParameterSetName: @@ -1418,7 +1464,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:28:59 GMT + - Wed, 08 Jan 2020 10:46:42 GMT expires: - '-1' pragma: @@ -1444,7 +1490,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification delete + - sql db classification delete Connection: - keep-alive Content-Length: @@ -1467,7 +1513,7 @@ interactions: content-length: - '0' date: - - Sun, 05 Jan 2020 13:29:01 GMT + - Wed, 08 Jan 2020 10:46:43 GMT expires: - '-1' pragma: @@ -1491,7 +1537,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - sql db sensitivity-classification list + - sql db classification list Connection: - keep-alive ParameterSetName: @@ -1514,7 +1560,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sun, 05 Jan 2020 13:29:01 GMT + - Wed, 08 Jan 2020 10:46:44 GMT expires: - '-1' pragma: From 651d15513bbf23b4ed17bfa8cc21cabb1b000393 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Tue, 14 Jan 2020 13:08:21 +0200 Subject: [PATCH 10/13] SQl classification - fix comments --- src/azure-cli/HISTORY.rst | 8 +-- .../azure/cli/command_modules/sql/_params.py | 16 ++++-- .../azure/cli/command_modules/sql/commands.py | 2 +- .../azure/cli/command_modules/sql/custom.py | 50 +++++++------------ .../sql/tests/latest/test_sql_commands.py | 14 +++--- 5 files changed, 43 insertions(+), 47 deletions(-) diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index aa5fa01e9b1..1689da8d2b2 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +**SQL** + +* New commands `sql db classification show/list/update/delete` and `sql db classification recommendation list/enable/disable` to manage sensitivity classifications for SQL databases. + 2.0.80 ++++++ @@ -16,10 +20,6 @@ Release History * Upgrade azure-mgmt-storage version to 7.1.0 * `az storage account create`: Add `--encryption-key-type-for-table` and `--encryption-key-type-for-queue` to support Table and Queue Encryption Service -**SQL** - -* New commands `sql db classification show/list/update/delete` and `sql db classification recommendation list/enable/disable` to manage sensitivity classifications for SQL databases. - 2.0.79 ++++++ diff --git a/src/azure-cli/azure/cli/command_modules/sql/_params.py b/src/azure-cli/azure/cli/command_modules/sql/_params.py index 1f80f5155f4..577bd3f36c3 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_params.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_params.py @@ -1426,18 +1426,21 @@ def _configure_security_policy_storage_params(arg_ctx): ################################################### # sql sensitivity classification # ################################################### - with self.argument_context('sql db classification update') as c: + with self.argument_context('sql db classification') as c: c.argument('schema_name', required=True, - help='The name of the schema.') + help='The name of the schema.', + options_list=['--schema']) c.argument('table_name', required=True, - help='The name of the table.') + help='The name of the table.', + options_list=['--table']) c.argument('column_name', required=True, - help='The name of the column.') + help='The name of the column.', + options_list=['--column']) c.argument('information_type', required=False, @@ -1445,4 +1448,7 @@ def _configure_security_policy_storage_params(arg_ctx): c.argument('label_name', required=False, - help='The label name') + help='The label name.') + + with self.argument_context('sql db classification recommendation list') as c: + c.ignore('skip_token') \ No newline at end of file diff --git a/src/azure-cli/azure/cli/command_modules/sql/commands.py b/src/azure-cli/azure/cli/command_modules/sql/commands.py index a094897c45c..0a46925ba4d 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/commands.py @@ -249,7 +249,7 @@ def load_command_table(self, _): database_sensitivity_labels_operations, client_factory=get_sql_database_sensitivity_labels_operations) as g: - g.custom_command('list', 'db_recommended_sensitivity_labels_list') + g.command('list', 'list_recommended_by_database') g.command('enable', 'enable_recommendation') g.command('disable', 'disable_recommendation') diff --git a/src/azure-cli/azure/cli/command_modules/sql/custom.py b/src/azure-cli/azure/cli/command_modules/sql/custom.py index 992f71f067e..112cacc8b16 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/custom.py +++ b/src/azure-cli/azure/cli/command_modules/sql/custom.py @@ -26,6 +26,8 @@ ReplicationRole, ResourceIdentity, SecurityAlertPolicyState, + SensitivityLabel, + SensitivityLabelSource, ServerKey, ServerKeyType, ServiceObjectiveName, @@ -1483,15 +1485,6 @@ def db_threat_detection_policy_update( return instance - -def db_recommended_sensitivity_labels_list( - client, - database_name, - server_name, - resource_group_name): - return client.list_recommended_by_database(resource_group_name, server_name, database_name) - - def db_sensitivity_label_update( cmd, client, @@ -1512,28 +1505,23 @@ def db_sensitivity_label_update( from azure.mgmt.security import SecurityCenter from msrestazure.azure_exceptions import CloudError - securityCenterclient = get_mgmt_service_client(cmd.cli_ctx, SecurityCenter, asc_location="centralus") + security_center_client = get_mgmt_service_client(cmd.cli_ctx, SecurityCenter, asc_location="centralus") - informationProtectionPolicy = securityCenterclient.information_protection_policies.get( + information_protection_policy = security_center_client.information_protection_policies.get( scope='/providers/Microsoft.Management/managementGroups/{}'.format(_get_tenant_id()), information_protection_policy_name="effective") - params = { - 'label_name': None, - 'label_id': None, - 'information_type': None, - 'information_type_id': None} + sensitivity_label = SensitivityLabel() # Get the current label try: current_label = client.get( - resource_group_name, server_name, database_name, schema_name, table_name, column_name, 'current') + resource_group_name, server_name, database_name, schema_name, table_name, column_name, SensitivityLabelSource.current) # Initialize with existing values - params = { - 'label_name': current_label.label_name, - 'label_id': current_label.label_id, - 'information_type': current_label.information_type, - 'information_type_id': current_label.information_type_id} + sensitivity_label.label_name = current_label.label_name, + sensitivity_label.label_id = current_label.label_id, + sensitivity_label.information_type = current_label.information_type, + sensitivity_label.information_type_id = current_label.information_type_id except CloudError as ex: if not(ex.error and ex.error.error and 'SensitivityLabelsLabelNotFound' in ex.error.error): @@ -1542,27 +1530,27 @@ def db_sensitivity_label_update( # Find the label id and information type id in the policy by the label name provided label_id = None if label_name: - label_id = next((id for id in informationProtectionPolicy.labels - if informationProtectionPolicy.labels[id].display_name.lower() == + label_id = next((id for id in information_protection_policy.labels + if information_protection_policy.labels[id].display_name.lower() == label_name.lower()), None) if label_id is None: raise CLIError('The provided label name was not found in the information protection policy.') - params['label_id'] = label_id - params['label_name'] = label_name + sensitivity_label.label_id = label_id + sensitivity_label.label_name = label_name information_type_id = None if information_type: - information_type_id = next((id for id in informationProtectionPolicy.information_types - if informationProtectionPolicy.information_types[id].display_name.lower() == + information_type_id = next((id for id in information_protection_policy.information_types + if information_protection_policy.information_types[id].display_name.lower() == information_type.lower()), None) if information_type_id is None: raise CLIError('The provided information type was not found in the information protection policy.') - params['information_type_id'] = information_type_id - params['information_type'] = information_type + sensitivity_label.information_type_id = information_type_id + sensitivity_label.information_type = information_type return client.create_or_update( - resource_group_name, server_name, database_name, schema_name, table_name, column_name, params) + resource_group_name, server_name, database_name, schema_name, table_name, column_name, sensitivity_label) ############################################### diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py index 9026c0a0f29..23bea8b52ef 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py @@ -3617,11 +3617,13 @@ def _get_storage_key(self, storage_account, resource_group): @SqlServerPreparer(location='westus') @StorageAccountPreparer(location='westus') def test_sql_db_sensitivity_classifications(self, resource_group, resource_group_location, server, storage_account): + from azure.mgmt.sql.models import SampleName + database_name = "sensitivityclassificationsdb01" # create db self.cmd('sql db create -g {} -s {} -n {} --sample-name {}' - .format(resource_group, server, database_name, 'AdventureWorksLT'), + .format(resource_group, server, database_name, SampleName.adventure_works_lt), checks=[ JMESPathCheck('resourceGroup', resource_group), JMESPathCheck('name', database_name), @@ -3675,7 +3677,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group column_name = 'FirstName' # disable the recommendation for SalesLT/Customer/FirstName - self.cmd('sql db classification recommendation disable -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db classification recommendation disable -g {} -s {} -n {} --schema {} --table {} --column {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) # list recommended sensitivity classifications @@ -3685,7 +3687,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count - 1)]) # re-enable the disabled recommendation - self.cmd('sql db classification recommendation enable -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db classification recommendation enable -g {} -s {} -n {} --schema {} --table {} --column {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) # lits recommended sensitivity classifications @@ -3700,7 +3702,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group information_type_id = '57845286-7598-22f5-9659-15b24aeb125e' label_id = 'bf91e08c-f4f0-478a-b016-25164b2a65ff' - self.cmd('sql db classification update -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --information-type {} --label-name "{}"' + self.cmd('sql db classification update -g {} -s {} -n {} --schema {} --table {} --column {} --information-type {} --label-name "{}"' .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type, label_name), checks=[ JMESPathCheck('informationType', information_type), @@ -3709,7 +3711,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group JMESPathCheck('labelId', label_id)]) # get the classified column - self.cmd('sql db classification show -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {} --sensitivity-label-source current' + self.cmd('sql db classification show -g {} -s {} -n {} --schema {} --table {} --column {} --sensitivity-label-source current' .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type), checks=[ JMESPathCheck('informationType', information_type), @@ -3730,7 +3732,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group JMESPathCheck('length(@)', 1)]) # delete the label - self.cmd('sql db classification delete -g {} -s {} -n {} --schema-name {} --table-name {} --column-name {}' + self.cmd('sql db classification delete -g {} -s {} -n {} --schema {} --table {} --column {}' .format(resource_group, server, database_name, schema_name, table_name, column_name)) # list current labels From af8b77292b149eeff55fc28ac7de910ffd322414 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Tue, 14 Jan 2020 13:17:35 +0200 Subject: [PATCH 11/13] SQL classification Additional fixes --- .../azure/cli/command_modules/sql/_params.py | 2 +- .../azure/cli/command_modules/sql/custom.py | 15 +++++++++++---- .../sql/tests/latest/test_sql_commands.py | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/sql/_params.py b/src/azure-cli/azure/cli/command_modules/sql/_params.py index 577bd3f36c3..237a4da8353 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_params.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_params.py @@ -1451,4 +1451,4 @@ def _configure_security_policy_storage_params(arg_ctx): help='The label name.') with self.argument_context('sql db classification recommendation list') as c: - c.ignore('skip_token') \ No newline at end of file + c.ignore('skip_token') diff --git a/src/azure-cli/azure/cli/command_modules/sql/custom.py b/src/azure-cli/azure/cli/command_modules/sql/custom.py index 112cacc8b16..8275637e7fc 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/custom.py +++ b/src/azure-cli/azure/cli/command_modules/sql/custom.py @@ -1485,6 +1485,7 @@ def db_threat_detection_policy_update( return instance + def db_sensitivity_label_update( cmd, client, @@ -1516,11 +1517,17 @@ def db_sensitivity_label_update( # Get the current label try: current_label = client.get( - resource_group_name, server_name, database_name, schema_name, table_name, column_name, SensitivityLabelSource.current) + resource_group_name, + server_name, + database_name, + schema_name, + table_name, + column_name, + SensitivityLabelSource.current) # Initialize with existing values - sensitivity_label.label_name = current_label.label_name, - sensitivity_label.label_id = current_label.label_id, - sensitivity_label.information_type = current_label.information_type, + sensitivity_label.label_name = current_label.label_name + sensitivity_label.label_id = current_label.label_id + sensitivity_label.information_type = current_label.information_type sensitivity_label.information_type_id = current_label.information_type_id except CloudError as ex: diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py index 23bea8b52ef..c7172a8b9de 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py @@ -3618,7 +3618,7 @@ def _get_storage_key(self, storage_account, resource_group): @StorageAccountPreparer(location='westus') def test_sql_db_sensitivity_classifications(self, resource_group, resource_group_location, server, storage_account): from azure.mgmt.sql.models import SampleName - + database_name = "sensitivityclassificationsdb01" # create db From b099a1d51c1a59b023debe4b493474fd5a5a8b8e Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Tue, 14 Jan 2020 13:20:00 +0200 Subject: [PATCH 12/13] Update help --- src/azure-cli/azure/cli/command_modules/sql/_help.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/sql/_help.py b/src/azure-cli/azure/cli/command_modules/sql/_help.py index c14b57b11f9..f836eed5973 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_help.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_help.py @@ -836,7 +836,7 @@ short-summary: Update a columns's sensitivity classification. examples: - name: Update sensitivity classification for a given column. - text: az sql db classification update -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --information-type Name --label-name "Confidential - GDPR" + text: az sql db classification update -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn --information-type Name --label-name "Confidential - GDPR" """ helps['sql db classification list'] = """ @@ -852,7 +852,7 @@ short-summary: Get the sensitivity classification of a given column. examples: - name: Get the sensitivity classification of a given column. - text: az sql db classification show -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn --sensitivity-label-source current + text: az sql db classification show -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn --sensitivity-label-source current """ helps['sql db classification delete'] = """ @@ -860,7 +860,7 @@ short-summary: Delete the sensitivity classification of a given column. examples: - name: Delete the sensitivity classification of a given column. - text: az sql db classification delete -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db classification delete -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn """ helps['sql db classification recommendation'] = """ @@ -881,7 +881,7 @@ short-summary: Enable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). examples: - name: Enable sensitivity recommendations for a given column. - text: az sql db classification recommendation enable -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db classification recommendation enable -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn """ helps['sql db classification recommendation disable'] = """ @@ -889,5 +889,5 @@ short-summary: Disable sensitivity recommendations for a given column (recommendations are enabled by default on all columns). examples: - name: Disable sensitivity recommendations for a given column. - text: az sql db classification recommendation disable -g mygroup -s myserver -n mydb --schema-name dbo --table-name mytable --column-name mycolumn + text: az sql db classification recommendation disable -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn """ From c715ee22965f221bc05d3deebfebb40c0179f2ec Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Sun, 19 Jan 2020 12:31:07 +0200 Subject: [PATCH 13/13] SQL classification - show command should be seperated for current/recommended --- .../azure/cli/command_modules/sql/_help.py | 4 ++-- .../azure/cli/command_modules/sql/_params.py | 3 ++- .../azure/cli/command_modules/sql/commands.py | 2 +- .../azure/cli/command_modules/sql/custom.py | 19 +++++++++++++++++++ .../sql/tests/latest/test_sql_commands.py | 4 ++-- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/sql/_help.py b/src/azure-cli/azure/cli/command_modules/sql/_help.py index f836eed5973..8be1a558807 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_help.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_help.py @@ -836,7 +836,7 @@ short-summary: Update a columns's sensitivity classification. examples: - name: Update sensitivity classification for a given column. - text: az sql db classification update -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn --information-type Name --label-name "Confidential - GDPR" + text: az sql db classification update -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn --information-type Name --label "Confidential - GDPR" """ helps['sql db classification list'] = """ @@ -852,7 +852,7 @@ short-summary: Get the sensitivity classification of a given column. examples: - name: Get the sensitivity classification of a given column. - text: az sql db classification show -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn --sensitivity-label-source current + text: az sql db classification show -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn """ helps['sql db classification delete'] = """ diff --git a/src/azure-cli/azure/cli/command_modules/sql/_params.py b/src/azure-cli/azure/cli/command_modules/sql/_params.py index fe65fb03474..407dbbd7621 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_params.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_params.py @@ -1452,7 +1452,8 @@ def _configure_security_policy_storage_params(arg_ctx): c.argument('label_name', required=False, - help='The label name.') + help='The label name.', + options_list=['--label']) with self.argument_context('sql db classification recommendation list') as c: c.ignore('skip_token') diff --git a/src/azure-cli/azure/cli/command_modules/sql/commands.py b/src/azure-cli/azure/cli/command_modules/sql/commands.py index 0a46925ba4d..1ad4ca78bab 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/commands.py @@ -241,7 +241,7 @@ def load_command_table(self, _): client_factory=get_sql_database_sensitivity_labels_operations) as g: g.command('list', 'list_current_by_database') - g.show_command('show', 'get') + g.custom_command('show', 'db_sensitivity_label_show') g.command('delete', 'delete') g.custom_command('update', 'db_sensitivity_label_update') diff --git a/src/azure-cli/azure/cli/command_modules/sql/custom.py b/src/azure-cli/azure/cli/command_modules/sql/custom.py index 8275637e7fc..fd52db7518a 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/custom.py +++ b/src/azure-cli/azure/cli/command_modules/sql/custom.py @@ -1486,6 +1486,25 @@ def db_threat_detection_policy_update( return instance +def db_sensitivity_label_show( + client, + database_name, + server_name, + schema_name, + table_name, + column_name, + resource_group_name): + + return client.get( + resource_group_name, + server_name, + database_name, + schema_name, + table_name, + column_name, + SensitivityLabelSource.current) + + def db_sensitivity_label_update( cmd, client, diff --git a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py index c7172a8b9de..104db957f4e 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py @@ -3702,7 +3702,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group information_type_id = '57845286-7598-22f5-9659-15b24aeb125e' label_id = 'bf91e08c-f4f0-478a-b016-25164b2a65ff' - self.cmd('sql db classification update -g {} -s {} -n {} --schema {} --table {} --column {} --information-type {} --label-name "{}"' + self.cmd('sql db classification update -g {} -s {} -n {} --schema {} --table {} --column {} --information-type {} --label "{}"' .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type, label_name), checks=[ JMESPathCheck('informationType', information_type), @@ -3711,7 +3711,7 @@ def test_sql_db_sensitivity_classifications(self, resource_group, resource_group JMESPathCheck('labelId', label_id)]) # get the classified column - self.cmd('sql db classification show -g {} -s {} -n {} --schema {} --table {} --column {} --sensitivity-label-source current' + self.cmd('sql db classification show -g {} -s {} -n {} --schema {} --table {} --column {}' .format(resource_group, server, database_name, schema_name, table_name, column_name, information_type), checks=[ JMESPathCheck('informationType', information_type),