From 5aaf4e4946ca14ecec6f4fe823ba3098c7397db6 Mon Sep 17 00:00:00 2001 From: ranisha2 Date: Thu, 30 Jan 2020 15:40:36 +0200 Subject: [PATCH] [SQL] Add new commands `sql db classification show/list/update/delete` and `sql db classification recommendation list/enable/disable` to manage sensitivity classifications for SQL databases. (#11597) * New commands `sql db sensitivity-labels show/list/list-recommended/update/delete/enable-recommendation/disable-recommendation` to manage sensitivity labels for SQL databases. * Fix history file * Fix failing style checks * Fix help * Use g.command() for list, list-recommended, delete, enable-recommendation and disable-recommendation * rename sensitivity-labels to sensitivity-classification and add another group for recommendation * Fix sensitivity classifications test after sync * Rename command from `sensitivity-classification` to `classification` * information_type and label_name should not be required * SQl classification - fix comments * SQL classification Additional fixes * Update help * SQL classification - show command should be seperated for current/recommended Co-authored-by: Zunli Hu --- src/azure-cli/HISTORY.rst | 1 + .../azure/cli/command_modules/sql/_help.py | 66 + .../azure/cli/command_modules/sql/_params.py | 31 + .../azure/cli/command_modules/sql/_util.py | 4 + .../azure/cli/command_modules/sql/commands.py | 22 + .../azure/cli/command_modules/sql/custom.py | 95 + ...st_sql_db_sensitivity_classifications.yaml | 1581 +++++++++++++++++ .../sql/tests/latest/test_sql_commands.py | 139 ++ 8 files changed, 1939 insertions(+) create mode 100644 src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index b881c5d3091..7f83e25c55f 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -79,6 +79,7 @@ Release History **SQL** * [BREAKING CHANGE] `az sql db create`: Remove "WideWorldImportersStd" and "WideWorldImportersFull" as documented allowed values for "az sql db create --sample-name". These sample databases would always cause creation to fail. +* Add New commands `sql db classification show/list/update/delete` and `sql db classification recommendation list/enable/disable` to manage sensitivity classifications for SQL databases. **Storage** 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..8be1a558807 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,69 @@ - name: Get the details for a virtual cluster text: az sql virtual-cluster show -g mygroup -n mycluster """ + +helps['sql db classification'] = """ +type: group +short-summary: Manage sensitivity classifications. +""" + +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 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'] = """ +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 classification list -g mygroup -s myserver -n mydb +""" + +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 classification show -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn +""" + +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 classification delete -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn +""" + +helps['sql db classification recommendation'] = """ +type: group +short-summary: Manage sensitivity classification recommendations. +""" + +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 classification recommendation list -g mygroup -s myserver -n mydb +""" + +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 classification recommendation enable -g mygroup -s myserver -n mydb --schema dbo --table mytable --column mycolumn +""" + +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 classification recommendation disable -g mygroup -s myserver -n mydb --schema dbo --table mytable --column 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 54fcc2a96d5..8ab45a14717 100644 --- a/src/azure-cli/azure/cli/command_modules/sql/_params.py +++ b/src/azure-cli/azure/cli/command_modules/sql/_params.py @@ -1428,3 +1428,34 @@ def _configure_security_policy_storage_params(arg_ctx): c.argument('allow_data_loss', arg_type=allow_data_loss_param_type) + + ################################################### + # sql sensitivity classification # + ################################################### + with self.argument_context('sql db classification') as c: + c.argument('schema_name', + required=True, + help='The name of the schema.', + options_list=['--schema']) + + c.argument('table_name', + required=True, + help='The name of the table.', + options_list=['--table']) + + c.argument('column_name', + required=True, + help='The name of the column.', + options_list=['--column']) + + c.argument('information_type', + required=False, + help='The information type.') + + c.argument('label_name', + required=False, + 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/_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..1ad4ca78bab 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,27 @@ 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 classification', + database_sensitivity_labels_operations, + client_factory=get_sql_database_sensitivity_labels_operations) as g: + + g.command('list', 'list_current_by_database') + g.custom_command('show', 'db_sensitivity_label_show') + g.command('delete', 'delete') + g.custom_command('update', 'db_sensitivity_label_update') + + 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.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/custom.py b/src/azure-cli/azure/cli/command_modules/sql/custom.py index 63504c78d0e..fd52db7518a 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, @@ -1484,6 +1486,99 @@ 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, + 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. + ''' + + # 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 + + security_center_client = get_mgmt_service_client(cmd.cli_ctx, SecurityCenter, asc_location="centralus") + + information_protection_policy = security_center_client.information_protection_policies.get( + scope='/providers/Microsoft.Management/managementGroups/{}'.format(_get_tenant_id()), + information_protection_policy_name="effective") + + 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, + 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.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: + 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.') + 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 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.') + 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, sensitivity_label) + + ############################################### # sql dw # ############################################### 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 new file mode 100644 index 00000000000..47c08788717 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_db_sensitivity_classifications.yaml @@ -0,0 +1,1581 @@ +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.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-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/577ff409-61d7-4565-9e63-d1641534e241?api-version=2015-05-01-preview + cache-control: + - no-cache + content-length: + - '74' + content-type: + - application/json; charset=utf-8 + date: + - 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/577ff409-61d7-4565-9e63-d1641534e241?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.79 + method: GET + 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":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:44:29 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.79 + method: GET + 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":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:44:31 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.79 + method: GET + 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":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:44:33 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.79 + method: GET + 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":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:44:34 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.79 + method: GET + 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":"577ff409-61d7-4565-9e63-d1641534e241","status":"InProgress","startTime":"2020-01-08T10:44:28.697Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:44:54 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.79 + method: GET + 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":"577ff409-61d7-4565-9e63-d1641534e241","status":"Succeeded","startTime":"2020-01-08T10:44:28.697Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:45:14 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.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: + 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: + - '577' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:45:14 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.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?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: + - '577' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:45: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: '{"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.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-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/920cf962-7400-4bca-9057-e201a34d864d?api-version=2017-10-01-preview + cache-control: + - no-cache + content-length: + - '76' + content-type: + - application/json; charset=utf-8 + date: + - 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/920cf962-7400-4bca-9057-e201a34d864d?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.79 + method: GET + 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":"920cf962-7400-4bca-9057-e201a34d864d","status":"InProgress","startTime":"2020-01-08T10:45:46.933Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46: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.79 + method: GET + 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":"920cf962-7400-4bca-9057-e201a34d864d","status":"Succeeded","startTime":"2020-01-08T10:45:46.933Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46:17 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.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":"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 + content-length: + - '1123' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46:17 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 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.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/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: + - Wed, 08 Jan 2020 10:46: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: + - 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/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-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-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 + content-length: + - '1200' + content-type: + - application/json + date: + - Wed, 08 Jan 2020 10:46:22 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/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-06-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: + - Wed, 08 Jan 2020 10:46:24 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.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/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/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: + - '634' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Wed, 08 Jan 2020 10:46:25 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.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/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/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: + - '853' + content-type: + - application/json; odata=minimalmetadata; streaming=true; charset=utf-8 + dataserviceversion: + - 3.0; + date: + - Wed, 08 Jan 2020 10:46:27 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 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.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/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/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: + - '9793' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46:30 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 classification recommendation disable + 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.79 + 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/sensitivityclassificationsdb01/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: + - Wed, 08 Jan 2020 10:46:31 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 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.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/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/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: + - '9144' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46:32 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 classification recommendation enable + 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.79 + 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/sensitivityclassificationsdb01/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: + - Wed, 08 Jan 2020 10:46:33 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 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.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/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/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: + - '9793' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46:35 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 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.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\":\"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\":\"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 + 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: + - '27388' + 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 + 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: 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"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db classification 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.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/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/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}' + headers: + cache-control: + - no-cache + content-length: + - '621' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46:38 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: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - sql db 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.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: '{"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: + - '621' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46: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 db 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.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/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/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: + - '9144' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46: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 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.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/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/sensitivityclassificationsdb01/schemas/SalesLT/tables/Customer/columns/FirstName/sensitivityLabels/current","name":"current","type":"Microsoft.Sql/servers/databases/sensitivityLabels"}]}' + headers: + cache-control: + - no-cache + content-length: + - '633' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 08 Jan 2020 10:46: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: + - sql db classification 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.79 + 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/sensitivityclassificationsdb01/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: + - Wed, 08 Jan 2020 10:46:43 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 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.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/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: + - Wed, 08 Jan 2020 10:46:44 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 b59d6d50043..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 @@ -3601,3 +3601,142 @@ 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 SqlDbSensitivityClassificationsScenarioTest(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_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, SampleName.adventure_works_lt), + checks=[ + JMESPathCheck('resourceGroup', resource_group), + JMESPathCheck('name', database_name), + JMESPathCheck('status', 'Online')]) + + # list current sensitivity classifications + 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 + + # 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 classifications + expected_recommended_sensitivityclassifications_count = 15 + self.cmd('sql db classification recommendation list -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[ + 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 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 + 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 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 + self.cmd('sql db classification recommendation list -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', expected_recommended_sensitivityclassifications_count)]) + + # 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 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), + JMESPathCheck('labelName', label_name), + JMESPathCheck('informationTypeId', information_type_id), + JMESPathCheck('labelId', label_id)]) + + # get the classified column + 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), + JMESPathCheck('labelName', label_name), + JMESPathCheck('informationTypeId', information_type_id), + JMESPathCheck('labelId', label_id)]) + + # list recommended classifications + 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 classification list -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', 1)]) + + # delete the label + 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 + self.cmd('sql db classification list -g {} -s {} -n {}' + .format(resource_group, server, database_name), + checks=[ + JMESPathCheck('length(@)', 0)])