diff --git a/src/azure-cli/azure/cli/command_modules/synapse/_client_factory.py b/src/azure-cli/azure/cli/command_modules/synapse/_client_factory.py index 4eeecb69a2f..ea31164f78a 100644 --- a/src/azure-cli/azure/cli/command_modules/synapse/_client_factory.py +++ b/src/azure-cli/azure/cli/command_modules/synapse/_client_factory.py @@ -22,6 +22,26 @@ def cf_synapse_client_sqlpool_factory(cli_ctx, *_): return cf_synapse(cli_ctx).sql_pools +def cf_synapse_client_sqlpool_sensitivity_labels_factory(cli_ctx, *_): + return cf_synapse(cli_ctx).sql_pool_sensitivity_labels + + +def cf_synapse_client_restorable_dropped_sqlpools_factory(cli_ctx, *_): + return cf_synapse(cli_ctx).restorable_dropped_sql_pools + + +def cf_synapse_client_sqlpool_transparent_data_encryptions_factory(cli_ctx, *_): + return cf_synapse(cli_ctx).sql_pool_transparent_data_encryptions + + +def cf_synapse_client_sqlpool_security_alert_policies_factory(cli_ctx, *_): + return cf_synapse(cli_ctx).sql_pool_security_alert_policies + + +def cf_synapse_client_sqlpool_blob_auditing_policies_factory(cli_ctx, *_): + return cf_synapse(cli_ctx).sql_pool_blob_auditing_policies + + def cf_synapse_client_ipfirewallrules_factory(cli_ctx, *_): return cf_synapse(cli_ctx).ip_firewall_rules diff --git a/src/azure-cli/azure/cli/command_modules/synapse/_help.py b/src/azure-cli/azure/cli/command_modules/synapse/_help.py index 0a8f0a919b7..ce76610167e 100644 --- a/src/azure-cli/azure/cli/command_modules/synapse/_help.py +++ b/src/azure-cli/azure/cli/command_modules/synapse/_help.py @@ -170,7 +170,7 @@ examples: - name: Create a SQL pool. text: |- - az synapse sql pool create --name sqlpoolcli1 --performance-level "DW1000c" \\ + az synapse sql pool create --name sqlpool --performance-level "DW1000c" \\ --workspace-name testsynapseworkspace --resource-group rg """ @@ -180,7 +180,7 @@ examples: - name: Get a SQL pool. text: |- - az synapse sql pool show --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg + az synapse sql pool show --name sqlpool --workspace-name testsynapseworkspace --resource-group rg """ helps['synapse sql pool list'] = """ @@ -198,7 +198,7 @@ examples: - name: Update a SQL pool. text: |- - az synapse sql pool update --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg \\ + az synapse sql pool update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ --tags key1=value1 """ @@ -208,7 +208,7 @@ examples: - name: Pause a SQL pool. text: |- - az synapse sql pool pause --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg + az synapse sql pool pause --name sqlpool --workspace-name testsynapseworkspace --resource-group rg """ helps['synapse sql pool resume'] = """ @@ -217,7 +217,7 @@ examples: - name: Resume a SQL pool. text: |- - az synapse sql pool resume --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg + az synapse sql pool resume --name sqlpool --workspace-name testsynapseworkspace --resource-group rg """ helps['synapse sql pool delete'] = """ @@ -226,7 +226,35 @@ examples: - name: Delete a SQL pool. text: |- - az synapse sql pool delete --name sqlpoolcli1 --workspace-name testsynapseworkspace --resource-group rg + az synapse sql pool delete --name sqlpool --workspace-name testsynapseworkspace --resource-group rg +""" + +helps['synapse sql pool restore'] = """ +type: command +short-summary: Create a new SQL pool by restoring from a backup. +examples: + - name: Create a new SQL pool by restoring an existing SQL pool's restore point. + text: |- + az synapse sql pool restore --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --dest-name newsqlpool --time 2020-11-25T02:47:37 +""" + +helps['synapse sql pool show-connection-string'] = """ +type: command +short-summary: Generate a connection string to a SQL pool. +examples: + - name: Generate connection string for ado.net + text: |- + az synapse sql pool show-connection-string --name sqlpool --workspace-name testsynapseworkspace -c ado.net +""" + +helps['synapse sql pool list-deleted'] = """ +type: command +short-summary: List all deleted SQL pools. +examples: + - name: List deleted SQL pools. + text: |- + az synapse sql pool list-deleted --workspace-name testsynapseworkspace --resource-group rg """ helps['synapse sql pool wait'] = """ @@ -234,6 +262,198 @@ short-summary: Place the CLI in a waiting state until a condition of a SQL pool is met. """ +helps['synapse sql pool classification'] = """ +type: group +short-summary: Manage sensitivity classifications. +""" + +helps['synapse sql pool classification create'] = """ +type: command +short-summary: Create a column's sensitivity classification. +examples: + - name: Create sensitivity classification for a given column. + text: |- + az synapse sql pool classification create --name sqlpool --workspace-name testsynapseworkspace \\ + --resource-group rg --schema dbo --table mytable --column mycolumn \\ + --information-type Name --label "Confidential - GDPR" +""" + +helps['synapse sql pool classification update'] = """ +type: command +short-summary: Update a column's sensitivity classification. +examples: + - name: Update sensitivity classification for a given column. + text: |- + az synapse sql pool classification update --name sqlpool --workspace-name testsynapseworkspace \\ + --resource-group rg --schema dbo --table mytable --column mycolumn \\ + --information-type Name --label "Confidential - GDPR" +""" + +helps['synapse sql pool classification list'] = """ +type: command +short-summary: Get the sensitivity classifications of a given SQL pool. +examples: + - name: List the sensitivity classification of a given SQL pool. + text: |- + az synapse sql pool classification list --name sqlpool --workspace-name testsynapseworkspace --resource-group rg +""" + +helps['synapse sql pool 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 synapse sql pool classification show --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --schema dbo --table mytable --column mycolumn +""" + +helps['synapse sql pool 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 synapse sql pool classification delete --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --schema dbo --table mytable --column mycolumn +""" + +helps['synapse sql pool classification recommendation'] = """ +type: group +short-summary: Manage sensitivity classification recommendations. +""" + +helps['synapse sql pool classification recommendation list'] = """ +type: command +short-summary: List the recommended sensitivity classifications of a given SQL pool. +examples: + - name: List the recommended sensitivity classifications of a given SQL pool. + text: |- + az synapse sql pool classification recommendation list --name sqlpool --workspace-name testsynapseworkspace \\ + --resource-group rg +""" + +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 synapse sql pool classification recommendation enable --name sqlpool --workspace-name testsynapseworkspace \\ + --resource-group rg --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 synapse sql pool classification recommendation disable --name sqlpool --workspace-name testsynapseworkspace \\ + --resource-group rg --schema dbo --table mytable --column mycolumn +""" + +helps['synapse sql pool tde'] = """ +type: group +short-summary: Manage a SQL pool's transparent data encryption. +""" + +helps['synapse sql pool tde set'] = """ +type: command +short-summary: Set a SQL pool's transparent data encryption configuration. +examples: + - name: Set a SQL pool's transparent data encryption configuration. (autogenerated) + text: |- + az synapse sql pool tde set --name sqlpool --workspace-name testsynapseworkspace --resource-group rg --status Enabled +""" + +helps['synapse sql pool tde show'] = """ +type: command +short-summary: Get a SQL pool's transparent data encryption configuration. +examples: + - name: Get a SQL pool's transparent data encryption configuration. (autogenerated) + text: |- + az synapse sql pool tde show --name sqlpool --workspace-name testsynapseworkspace --resource-group rg +""" + +helps['synapse sql pool threat-policy'] = """ +type: group +short-summary: Manage a SQL pool's threat detection policies. +""" + +helps['synapse sql pool threat-policy show'] = """ +type: command +short-summary: Get a SQL pool's threat detection policy. +examples: + - name: Get a SQL pool's threat detection policy. + text: |- + az synapse sql pool threat-policy show --name sqlpool --workspace-name testsynapseworkspace --resource-group rg +""" + +helps['synapse sql pool threat-policy update'] = """ +type: command +short-summary: Update a SQL pool's threat detection policy. +long-summary: If the policy is being enabled, storage_account or both storage_endpoint and storage_account_access_key must be specified. +examples: + - name: Enable by storage account name. + text: |- + az synapse sql pool threat-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --state Enabled --storage-account mystorageaccount + - name: Enable by storage endpoint and key. + text: |- + az synapse sql pool threat-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --state Enabled --storage-endpoint https://mystorage.blob.core.windows.net --storage-key MYKEY== + - name: Disable a subset of alert types. + text: |- + az synapse sql pool threat-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --disabled-alerts Sql_Injection_Vulnerability Access_Anomaly + - name: Configure email recipients for a policy. + text: |- + az synapse sql pool threat-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --email-addresses me@examlee.com you@example.com --email-account-admins true + - name: Disable a threat policy. + text: |- + az synapse sql pool threat-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --state Disabled +""" + +helps['synapse sql pool audit-policy'] = """ +type: group +short-summary: Manage a SQL pool's auditing policy. +""" + +helps['synapse sql pool audit-policy show'] = """ +type: command +short-summary: Get a SQL pool's auditing policy. +examples: + - name: Get a SQL pool's auditing policy. + text: |- + az synapse sql pool audit-policy show --name sqlpool --workspace-name testsynapseworkspace --resource-group rg +""" + +helps['synapse sql pool audit-policy update'] = """ +type: command +short-summary: Update a SQL pool's auditing policy. +long-summary: If the policy is being enabled, `--storage-account` or both `--storage-endpoint` and `--storage-key` must be specified. +examples: + - name: Enable by storage account name. + text: |- + az synapse sql pool audit-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --state Enabled --storage-account mystorageaccount + - name: Enable by storage endpoint and key. + text: |- + az synapse sql pool audit-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --state Enabled --storage-endpoint https://mystorage.blob.core.windows.net --storage-key MYKEY== + - name: Set the list of audit actions. + text: | + az synapse sql pool audit-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --actions FAILED_DATABASE_AUTHENTICATION_GROUP 'UPDATE on database::mydb by public' + - name: Disable an auditing policy. + text: |- + az synapse sql pool audit-policy update --name sqlpool --workspace-name testsynapseworkspace --resource-group rg \\ + --state Disabled +""" + helps['synapse workspace firewall-rule'] = """ type: group short-summary: Manage a workspace's firewall rules. diff --git a/src/azure-cli/azure/cli/command_modules/synapse/_params.py b/src/azure-cli/azure/cli/command_modules/synapse/_params.py index aa939e898cf..44298ade11b 100644 --- a/src/azure-cli/azure/cli/command_modules/synapse/_params.py +++ b/src/azure-cli/azure/cli/command_modules/synapse/_params.py @@ -5,17 +5,44 @@ # pylint: disable=too-many-statements, line-too-long from knack.arguments import CLIArgumentType from argcomplete import FilesCompleter -from azure.cli.core.commands.parameters import name_type, tags_type, get_three_state_flag, get_enum_type, get_resource_name_completion_list +from azure.mgmt.synapse.models import TransparentDataEncryptionStatus, SecurityAlertPolicyState, BlobAuditingPolicyState +from azure.cli.core.commands.parameters import name_type, tags_type, get_three_state_flag, get_enum_type, \ + get_resource_name_completion_list from azure.cli.core.util import get_json_object, shell_safe_json_parse from ._validators import validate_storage_account, validate_statement_language from ._completers import get_role_definition_name_completion_list -from .constant import SparkBatchLanguage, SparkStatementLanguage +from .constant import SparkBatchLanguage, SparkStatementLanguage, SqlPoolConnectionClientType, \ + SqlPoolConnectionClientAuthenticationType from .action import AddFilters, AddOrderBy -workspace_name_arg_type = CLIArgumentType(help='The workspace name.', completer=get_resource_name_completion_list('Microsoft.Synapse/workspaces')) -assignee_arg_type = CLIArgumentType(help='Represent a user, group, or service principal. Supported format: object id, user sign-in name, or service principal name.') -role_arg_type = CLIArgumentType(help='The role name/id that is assigned to the principal.', completer=get_role_definition_name_completion_list) -definition_file_arg_type = CLIArgumentType(options_list=['--file'], completer=FilesCompleter(), type=shell_safe_json_parse, help='Properties may be supplied from a JSON file using the `@{path}` syntax or a JSON string.') +workspace_name_arg_type = CLIArgumentType(help='The workspace name.', + completer=get_resource_name_completion_list('Microsoft.Synapse/workspaces')) +assignee_arg_type = CLIArgumentType( + help='Represent a user, group, or service principal. Supported format: object id, user sign-in name, or service principal name.') +role_arg_type = CLIArgumentType(help='The role name/id that is assigned to the principal.', + completer=get_role_definition_name_completion_list) +definition_file_arg_type = CLIArgumentType(options_list=['--file'], completer=FilesCompleter(), + type=shell_safe_json_parse, + help='Properties may be supplied from a JSON file using the `@{path}` syntax or a JSON string.') +time_format_help = 'Time should be in following format: "YYYY-MM-DDTHH:MM:SS".' +storage_arg_group = "Storage" +policy_arg_group = 'Policy' + + +def _configure_security_or_audit_policy_storage_params(arg_ctx): + arg_ctx.argument('storage_account', + options_list=['--storage-account'], + arg_group=storage_arg_group, + help='Name of the storage account.') + + arg_ctx.argument('storage_account_access_key', + options_list=['--storage-key'], + arg_group=storage_arg_group, + help='Access key for the storage account.') + + arg_ctx.argument('storage_endpoint', + arg_group=storage_arg_group, + help='The storage account endpoint.') def load_arguments(self, _): @@ -36,6 +63,10 @@ def load_arguments(self, _): c.argument('file_system', help='The file system of the data lake storage account.') c.argument('sql_admin_login_user', options_list=['--sql-admin-login-user', '-u'], help='The sql administrator login user name.') + c.argument('enable_managed_virtual_network', options_list=['--enable-managed-vnet', + '--enable-managed-virtual-network'], + arg_type=get_three_state_flag(), + help='The flag indicates whether enable managed virtual network.') with self.argument_context('synapse workspace check-name') as c: c.argument('name', arg_type=name_type, help='The name you wanted to check.') @@ -114,7 +145,10 @@ def load_arguments(self, _): with self.argument_context('synapse sql pool list') as c: c.argument('workspace_name', id_part=None, help='The workspace name.') - for scope in ['show', 'create', 'delete', 'update', 'pause', 'resume']: + with self.argument_context('synapse sql pool list-deleted') as c: + c.argument('workspace_name', id_part=None, help='The workspace name.') + + for scope in ['show', 'create', 'delete', 'update', 'pause', 'resume', 'restore', 'show-connection-string']: with self.argument_context('synapse sql pool ' + scope) as c: c.argument('sql_pool_name', arg_type=name_type, id_part='child_name_1', help='The SQL pool name.') @@ -128,6 +162,119 @@ def load_arguments(self, _): c.argument('sku_name', options_list=['--performance-level'], help='The performance level.') c.argument('tags', arg_type=tags_type) + with self.argument_context('synapse sql pool restore') as c: + c.argument('performance_level', help='The performance level.') + c.argument('destination_name', options_list=['--dest-name', '--destination-name'], + help='Name of the sql pool that will be created as the restore destination.') + + restore_point_arg_group = 'Restore Point' + c.argument('restore_point_in_time', + options_list=['--time', '-t'], + arg_group=restore_point_arg_group, + help='The point in time of the source database that will be restored to create the new database. Must be greater than or equal to the source database\'s earliestRestoreDate value. Either --time or --deleted-time (or both) must be specified. {0}'.format( + time_format_help)) + c.argument('source_database_deletion_date', + options_list=['--deleted-time'], + arg_group=restore_point_arg_group, + help='If specified, restore from a deleted database instead of from an existing database. Must match the deleted time of a deleted database in the same server. Either --time or --deleted-time (or both) must be specified. {0}'.format( + time_format_help)) + + with self.argument_context('synapse sql pool show-connection-string') as c: + c.argument('client_provider', + options_list=['--client', '-c'], + help='Type of client connection provider.', + arg_type=get_enum_type(SqlPoolConnectionClientType)) + + auth_group = 'Authentication' + c.argument('auth_type', + options_list=['--auth-type', '-a'], + arg_group=auth_group, + help='Type of authentication.', + arg_type=get_enum_type(SqlPoolConnectionClientAuthenticationType)) + + # synapse sql pool classification + with self.argument_context('synapse sql pool classification') as c: + c.argument('sql_pool_name', arg_type=name_type, id_part='child_name_1', help='The SQL pool name.') + + with self.argument_context('synapse sql pool classification list') as c: + c.argument('workspace_name', id_part=None, help='The workspace name.') + + with self.argument_context('synapse sql pool classification recommendation list') as c: + c.argument('workspace_name', id_part=None, help='The workspace name.') + c.argument('include_disabled_recommendations', options_list=['--included-disabled'], + arg_type=get_three_state_flag(), + help='Indicates whether the result should include disabled recommendations') + + for scope in ['show', 'create', 'update', 'delete', 'recommendation enable', 'recommendation disable']: + with self.argument_context('synapse sql pool classification ' + scope) as c: + c.argument('schema_name', help='The name of schema.', options_list=['--schema']) + c.argument('table_name', help='The name of table.', options_list=['--table']) + c.argument('column_name', help='The name of column.', options_list=['--column']) + c.argument('information_type', help='The information type.') + c.argument('label_name', help='The label name.', options_list=['--label']) + + # synapse sql pool tde + with self.argument_context('synapse sql pool tde') as c: + c.argument('sql_pool_name', arg_type=name_type, id_part='child_name_1', help='The SQL pool name.') + c.argument('status', arg_type=get_enum_type(TransparentDataEncryptionStatus), + required=True, help='Status of the transparent data encryption.') + + # synapse sql pool threat-policy + with self.argument_context('synapse sql pool threat-policy') as c: + c.argument('sql_pool_name', arg_type=name_type, id_part='child_name_1', help='The SQL pool name.') + + with self.argument_context('synapse sql pool threat-policy update') as c: + _configure_security_or_audit_policy_storage_params(c) + notification_arg_group = 'Notification' + + c.argument('state', + arg_group=policy_arg_group, + help='Threat detection policy state', + arg_type=get_enum_type(SecurityAlertPolicyState)) + c.argument('retention_days', + arg_group=policy_arg_group, + help='The number of days to retain threat detection logs.') + c.argument('disabled_alerts', + arg_group=policy_arg_group, + help='List of disabled alerts.', + nargs='+') + c.argument('email_addresses', + arg_group=notification_arg_group, + help='List of email addresses that alerts are sent to.', + nargs='+') + c.argument('email_account_admins', + arg_group=notification_arg_group, + help='Whether the alert is sent to the account administrators.', + arg_type=get_three_state_flag()) + + # synapse sql pool audit-policy + with self.argument_context('synapse sql pool audit-policy') as c: + c.argument('sql_pool_name', arg_type=name_type, id_part='child_name_1', help='The SQL pool name.') + + with self.argument_context('synapse sql pool audit-policy update') as c: + _configure_security_or_audit_policy_storage_params(c) + c.argument('storage_account_subscription_id', arg_group=storage_arg_group, + options_list=['--storage-subscription'], + help='The subscription id of storage account') + c.argument('is_storage_secondary_key_in_use', arg_group=storage_arg_group, + arg_type=get_three_state_flag(), options_list=['--use-secondary-key'], + help='Indicates whether using the secondary storeage key or not') + c.argument('is_azure_monitor_target_enabled', options_list=['--enable-azure-monitor'], + help='Whether enabling azure monitor target or not.', + arg_type=get_three_state_flag()) + c.argument('state', + arg_group=policy_arg_group, + help='Auditing policy state', + arg_type=get_enum_type(BlobAuditingPolicyState)) + c.argument('audit_actions_and_groups', + options_list=['--actions'], + arg_group=policy_arg_group, + help='List of actions and action groups to audit.', + nargs='+') + c.argument('retention_days', + arg_group=policy_arg_group, + help='The number of days to retain audit logs.') + # synapse workspace firewall-rule with self.argument_context('synapse workspace firewall-rule') as c: c.argument('workspace_name', id_part='name', help='The workspace name.') @@ -203,7 +350,8 @@ def load_arguments(self, _): with self.argument_context('synapse spark statement invoke') as c: c.argument('code', completer=FilesCompleter(), help='The code of Spark statement. This is either the code contents or use `@` to load the content from a file') - c.argument('language', arg_type=get_enum_type(SparkStatementLanguage), validator=validate_statement_language, help='The language of Spark statement.') + c.argument('language', arg_type=get_enum_type(SparkStatementLanguage), validator=validate_statement_language, + help='The language of Spark statement.') # synapse workspace access-control for scope in ['create', 'list']: @@ -214,13 +362,15 @@ def load_arguments(self, _): with self.argument_context('synapse role assignment show') as c: c.argument('workspace_name', arg_type=workspace_name_arg_type) - c.argument('role_assignment_id', options_list=['--id'], help='Id of the role that is assigned to the principal.') + c.argument('role_assignment_id', options_list=['--id'], + help='Id of the role that is assigned to the principal.') with self.argument_context('synapse role assignment delete') as c: c.argument('workspace_name', arg_type=workspace_name_arg_type) c.argument('role', arg_type=role_arg_type) c.argument('assignee', arg_type=assignee_arg_type) - c.argument('ids', nargs='+', help='space-separated role assignment ids. You should not provide --role or --assignee when --ids is provided.') + c.argument('ids', nargs='+', + help='space-separated role assignment ids. You should not provide --role or --assignee when --ids is provided.') with self.argument_context('synapse role definition show') as c: c.argument('workspace_name', arg_type=workspace_name_arg_type) @@ -290,16 +440,20 @@ def load_arguments(self, _): help='The pipeline run ID for rerun. If run ID is specified, the parameters of the specified run will be used to create a new run.') c.argument('is_recovery', arg_type=get_three_state_flag(), help='Recovery mode flag. If recovery mode is set to true, the specified referenced pipeline run and the new run will be grouped under the same groupId.') - c.argument('start_activity_name', help='In recovery mode, the rerun will start from this activity. If not specified, all activities will run.') + c.argument('start_activity_name', + help='In recovery mode, the rerun will start from this activity. If not specified, all activities will run.') c.argument('parameters', completer=FilesCompleter(), type=shell_safe_json_parse, help='Parameters for pipeline run. Can be supplied from a JSON file using the `@{path}` syntax or a JSON string.') # synapse artifacts pipeline run with self.argument_context('synapse pipeline-run query-by-workspace') as c: c.argument('workspace_name', arg_type=workspace_name_arg_type) - c.argument('continuation_token', help='The continuation token for getting the next page of results. Null for first page.') - c.argument('last_updated_after', help='The time at or after which the run event was updated in \'ISO 8601\' format.') - c.argument('last_updated_before', help='The time at or before which the run event was updated in \'ISO 8601\' format.') + c.argument('continuation_token', + help='The continuation token for getting the next page of results. Null for first page.') + c.argument('last_updated_after', + help='The time at or after which the run event was updated in \'ISO 8601\' format.') + c.argument('last_updated_before', + help='The time at or before which the run event was updated in \'ISO 8601\' format.') c.argument('filters', action=AddFilters, nargs='*', help='List of filters.') c.argument('order_by', action=AddOrderBy, nargs='*', help='List of OrderBy option.') @@ -317,9 +471,12 @@ def load_arguments(self, _): c.argument('workspace_name', arg_type=workspace_name_arg_type) c.argument('pipeline_name', arg_type=name_type, help='The pipeline name.') c.argument('run_id', help='The pipeline run identifier.') - c.argument('continuation_token', help='The continuation token for getting the next page of results. Null for first page.') - c.argument('last_updated_after', help='The time at or after which the run event was updated in \'ISO 8601\' format.') - c.argument('last_updated_before', help='The time at or before which the run event was updated in \'ISO 8601\' format.') + c.argument('continuation_token', + help='The continuation token for getting the next page of results. Null for first page.') + c.argument('last_updated_after', + help='The time at or after which the run event was updated in \'ISO 8601\' format.') + c.argument('last_updated_before', + help='The time at or before which the run event was updated in \'ISO 8601\' format.') c.argument('filters', action=AddFilters, nargs='*', help='List of filters.') c.argument('order_by', action=AddOrderBy, nargs='*', help='List of OrderBy option.') @@ -369,9 +526,12 @@ def load_arguments(self, _): with self.argument_context('synapse trigger-run query-by-workspace') as c: c.argument('workspace_name', arg_type=workspace_name_arg_type) - c.argument('continuation_token', help='The continuation token for getting the next page of results. Null for first page.') - c.argument('last_updated_after', help='The time at or after which the run event was updated in \'ISO 8601\' format.') - c.argument('last_updated_before', help='The time at or before which the run event was updated in \'ISO 8601\' format.') + c.argument('continuation_token', + help='The continuation token for getting the next page of results. Null for first page.') + c.argument('last_updated_after', + help='The time at or after which the run event was updated in \'ISO 8601\' format.') + c.argument('last_updated_before', + help='The time at or before which the run event was updated in \'ISO 8601\' format.') c.argument('filters', action=AddFilters, nargs='*', help='List of filters.') c.argument('order_by', action=AddOrderBy, nargs='*', help='List of OrderBy option.') @@ -402,7 +562,8 @@ def load_arguments(self, _): c.argument('spark_pool_name', help='The name of the Spark pool.') c.argument('executor_size', arg_type=get_enum_type(['Small', 'Medium', 'Large']), help='Number of core and memory to be used for executors allocated in the specified Spark pool for the job.') - c.argument('executor_count', help='Number of executors to be allocated in the specified Spark pool for the job.') + c.argument('executor_count', + help='Number of executors to be allocated in the specified Spark pool for the job.') with self.argument_context('synapse notebook list') as c: c.argument('workspace_name', arg_type=workspace_name_arg_type) diff --git a/src/azure-cli/azure/cli/command_modules/synapse/commands.py b/src/azure-cli/azure/cli/command_modules/synapse/commands.py index b68578568ac..0078d8667f5 100644 --- a/src/azure-cli/azure/cli/command_modules/synapse/commands.py +++ b/src/azure-cli/azure/cli/command_modules/synapse/commands.py @@ -5,13 +5,18 @@ from azure.cli.core.commands import CliCommandType -# pylint: disable=line-too-long, too-many-statements +# pylint: disable=line-too-long, too-many-statements, too-many-locals def load_command_table(self, _): from ._client_factory import cf_synapse_client_workspace_factory from ._client_factory import cf_synapse_client_operations_factory from ._client_factory import cf_synapse_client_bigdatapool_factory from ._client_factory import cf_synapse_client_sqlpool_factory from ._client_factory import cf_synapse_client_ipfirewallrules_factory + from ._client_factory import cf_synapse_client_sqlpool_sensitivity_labels_factory + from ._client_factory import cf_synapse_client_restorable_dropped_sqlpools_factory + from ._client_factory import cf_synapse_client_sqlpool_transparent_data_encryptions_factory + from ._client_factory import cf_synapse_client_sqlpool_security_alert_policies_factory + from ._client_factory import cf_synapse_client_sqlpool_blob_auditing_policies_factory def get_custom_sdk(custom_module, client_factory): return CliCommandType( @@ -35,6 +40,31 @@ def get_custom_sdk(custom_module, client_factory): operations_tmpl='azure.mgmt.synapse.operations#SqlPoolsOperations.{}', client_factory=cf_synapse_client_sqlpool_factory) + # Classification operation + synapse_sqlpool_sensitivity_labels_sdk = CliCommandType( + operations_tmpl='azure.mgmt.synapse.operations#SqlPoolSensitivityLabelsOperations.{}', + client_factory=cf_synapse_client_sqlpool_sensitivity_labels_factory) + + # List deleted + synapse_restorable_dropped_sqlpools_sdk = CliCommandType( + operations_tmpl='azure.mgmt.synapse.operations#RestorableDroppedSqlPoolsOperations.{}', + client_factory=cf_synapse_client_restorable_dropped_sqlpools_factory) + + # Tde operation + synapse_sqlpool_transparent_data_encryptions_sdk = CliCommandType( + operations_tmpl='azure.mgmt.synapse.operations#SqlPoolTransparentDataEncryptionsOperations.{}', + client_factory=cf_synapse_client_sqlpool_transparent_data_encryptions_factory) + + # Threat Policy operation + synapse_sqlpool_security_alert_policies_sdk = CliCommandType( + operations_tmpl='azure.mgmt.synapse.operations#SqlPoolSecurityAlertPoliciesOperations.{}', + client_factory=cf_synapse_client_sqlpool_security_alert_policies_factory) + + # Audit policy operation + synapse_sqlpool_blob_auditing_policies_sdk = CliCommandType( + operations_tmpl='azure.mgmt.synapse.operations#SqlPoolBlobAuditingPoliciesOperations.{}', + client_factory=cf_synapse_client_sqlpool_blob_auditing_policies_factory) + synapse_firewallrules_sdk = CliCommandType( operations_tmpl='azure.mgmt.synapse.operations#IpFirewallRulesOperations.{}', client_factory=cf_synapse_client_ipfirewallrules_factory) @@ -119,8 +149,57 @@ def get_custom_sdk(custom_module, client_factory): g.custom_command('update', 'update_sql_pool') g.command('pause', 'pause') g.command('resume', 'resume') + g.custom_command('restore', 'restore_sql_pool') + g.custom_command('show-connection-string', 'sql_pool_show_connection_string') g.wait_command('wait') + # Management Plane Commands --SqlPool list-deleted + with self.command_group('synapse sql pool', command_type=synapse_restorable_dropped_sqlpools_sdk, + client_factory=cf_synapse_client_restorable_dropped_sqlpools_factory) as g: + g.command('list-deleted', 'list_by_workspace') + + # Management Plane Commands --SqlPool Classification + with self.command_group('synapse sql pool classification', command_type=synapse_sqlpool_sensitivity_labels_sdk, + custom_command_type=get_custom_sdk('sqlpoolsensitivitylabel', + cf_synapse_client_sqlpool_sensitivity_labels_factory), + client_factory=cf_synapse_client_sqlpool_sensitivity_labels_factory) as g: + g.custom_show_command('show', 'sqlpool_sensitivity_label_show') + g.command('list', 'list_current') + g.custom_command('create', 'sqlpool_sensitivity_label_create') + g.command('delete', 'delete') + g.custom_command('update', 'sqlpool_sensitivity_label_update') + + with self.command_group('synapse sql pool classification recommendation', + command_type=synapse_sqlpool_sensitivity_labels_sdk, + custom_command_type=get_custom_sdk('sqlpoolsensitivitylabel', + cf_synapse_client_sqlpool_sensitivity_labels_factory), + client_factory=cf_synapse_client_sqlpool_sensitivity_labels_factory) as g: + g.command('list', 'list_recommended') + g.command('enable', 'enable_recommendation') + g.command('disable', 'disable_recommendation') + + # Management Plane Commands --SqlPool Tde + with self.command_group('synapse sql pool tde', command_type=synapse_sqlpool_transparent_data_encryptions_sdk, + client_factory=cf_synapse_client_sqlpool_transparent_data_encryptions_factory) as g: + g.command('set', 'create_or_update') + g.show_command('show', 'get') + + # Management Plane Commands --SqlPool Threat-policy + with self.command_group('synapse sql pool threat-policy', command_type=synapse_sqlpool_security_alert_policies_sdk, + custom_command_type=get_custom_sdk('sqlpoolsecurityalertpolicy', + cf_synapse_client_sqlpool_security_alert_policies_factory), + client_factory=cf_synapse_client_sqlpool_security_alert_policies_factory) as g: + g.show_command('show', 'get') + g.generic_update_command('update', custom_func_name='sqlpool_security_alert_policy_update') + + # Management Plane Commands --SqlPool Audit-policy + with self.command_group('synapse sql pool audit-policy', command_type=synapse_sqlpool_blob_auditing_policies_sdk, + custom_command_type=get_custom_sdk('sqlpoolblobauditingpolicy', + cf_synapse_client_sqlpool_blob_auditing_policies_factory), + client_factory=cf_synapse_client_sqlpool_blob_auditing_policies_factory) as g: + g.show_command('show', 'get') + g.generic_update_command('update', custom_func_name='sqlpool_blob_auditing_policy_update') + # Management Plane Commands --FirewallRule with self.command_group('synapse workspace firewall-rule', command_type=synapse_firewallrules_sdk, custom_command_type=get_custom_sdk('workspace', cf_synapse_client_ipfirewallrules_factory), diff --git a/src/azure-cli/azure/cli/command_modules/synapse/constant.py b/src/azure-cli/azure/cli/command_modules/synapse/constant.py index c434908370e..995ddc3c98b 100644 --- a/src/azure-cli/azure/cli/command_modules/synapse/constant.py +++ b/src/azure-cli/azure/cli/command_modules/synapse/constant.py @@ -37,3 +37,27 @@ class SparkStatementLanguage(str, Enum): SparkDotNet = 'SparkDotNet' CSharp = 'CSharp' SQL = 'SQL' + + +# pylint: disable=too-few-public-methods +class SqlPoolConnectionClientType(str, Enum): + ''' + Types of SQL clients whose connection strings we can generate. + ''' + + AdoDotNet = 'ado.net' + Jdbc = 'jdbc' + Php = 'php' + Odbc = 'odbc' + PhpPdo = 'php_pdo' + + +class SqlPoolConnectionClientAuthenticationType(str, Enum): + ''' + Types of SQL client authentication mechanisms for connection strings + that we can generate. + ''' + + SqlPassword = 'SqlPassword' + ActiveDirectoryPassword = 'ADPassword' + ActiveDirectoryIntegrated = 'ADIntegrated' diff --git a/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpool.py b/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpool.py index 3329cc6d528..3e692bcf187 100644 --- a/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpool.py +++ b/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpool.py @@ -5,8 +5,9 @@ # pylint: disable=unused-argument from azure.cli.core.util import sdk_no_wait from azure.mgmt.synapse.models import SqlPool, SqlPoolPatchInfo, Sku +from knack.util import CLIError from .._client_factory import cf_synapse_client_workspace_factory -from ..constant import SynapseSqlCreateMode +from ..constant import SynapseSqlCreateMode, SqlPoolConnectionClientAuthenticationType, SqlPoolConnectionClientType # Synapse sqlpool @@ -27,3 +28,141 @@ def update_sql_pool(cmd, client, resource_group_name, workspace_name, sql_pool_n sku = Sku(name=sku_name) sql_pool_patch_info = SqlPoolPatchInfo(sku=sku, tags=tags) return client.update(resource_group_name, workspace_name, sql_pool_name, sql_pool_patch_info) + + +def restore_sql_pool(cmd, client, resource_group_name, workspace_name, sql_pool_name, destination_name, + performance_level=None, restore_point_in_time=None, source_database_deletion_date=None, + no_wait=False, **kwargs): + """ + Restores an existing or deleted SQL pool (i.e. create with 'Restore' + or 'PointInTimeRestore' create mode.) + + Custom function makes create mode more convenient. + """ + if not (restore_point_in_time or source_database_deletion_date): + raise CLIError('Either --time or --deleted-time must be specified.') + + # Set create mode properties + is_deleted = source_database_deletion_date is not None + create_mode = SynapseSqlCreateMode.Restore if is_deleted else SynapseSqlCreateMode.PointInTimeRestore + + source_sql_pool_info = client.get(resource_group_name, workspace_name, sql_pool_name) + + # get the default performance_level + if performance_level is None: + performance_level = source_sql_pool_info.sku.name + + # create source database id + source_database_id = _construct_database_resource_id(cmd.cli_ctx, resource_group_name, workspace_name, + sql_pool_name) + + sku = Sku(name=performance_level) + dest_sql_pool_info = SqlPool(sku=sku, location=source_sql_pool_info.location, create_mode=create_mode, + restore_point_in_time=restore_point_in_time, source_database_id=source_database_id) + + return sdk_no_wait(no_wait, client.create, resource_group_name, workspace_name, destination_name, + dest_sql_pool_info) + + +def sql_pool_show_connection_string( + cmd, + client_provider, + sql_pool_name='', + workspace_name='', + auth_type=SqlPoolConnectionClientAuthenticationType.SqlPassword.value): + """ + Builds a SQL connection string for a specified client provider. + """ + + workspace_sql_pool_compute_suffix = cmd.cli_ctx.cloud.suffixes.synapse_analytics_endpoint.replace('dev', 'sql') + + conn_str_props = { + 'workspace': workspace_name, + 'workspace_fqdn': '{}{}'.format(workspace_name, workspace_sql_pool_compute_suffix), + 'workspace_suffix': workspace_sql_pool_compute_suffix, + 'sql_pool': sql_pool_name + } + + formats = { + SqlPoolConnectionClientType.AdoDotNet: { + SqlPoolConnectionClientAuthenticationType.SqlPassword: + 'Server=tcp:{workspace_fqdn},1433;Initial Catalog={sql_pool};Persist Security Info=False;' + 'User ID=;Password=;MultipleActiveResultSets=False;Encrypt=True;' + 'TrustServerCertificate=False;Connection Timeout=30;', + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryPassword: + 'Server=tcp:{workspace_fqdn},1433;Initial Catalog={sql_pool};Persist Security Info=False;' + 'User ID=;Password=;MultipleActiveResultSets=False;Encrypt=True;' + 'TrustServerCertificate=False;Authentication="Active Directory Password";', + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryIntegrated: + 'Server=tcp:{workspace_fqdn},1433;Initial Catalog={sql_pool};Persist Security Info=False;' + 'User ID=;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;' + 'Authentication="Active Directory Integrated";' + }, + SqlPoolConnectionClientType.Jdbc: { + SqlPoolConnectionClientAuthenticationType.SqlPassword: + 'jdbc:sqlserver://{workspace_fqdn}:1433;database={sql_pool};user=@{workspace};' + 'password=;encrypt=true;trustServerCertificate=false;' + 'hostNameInCertificate=*{workspace_suffix};loginTimeout=30;', + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryPassword: + 'jdbc:sqlserver://{workspace_fqdn}:1433;database={sql_pool};user=;' + 'password=;encrypt=true;trustServerCertificate=false;' + 'hostNameInCertificate=*{workspace_suffix};loginTimeout=30;authentication=ActiveDirectoryPassword', + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryIntegrated: + 'jdbc:sqlserver://{workspace_fqdn}:1433;database={sql_pool};' + 'encrypt=true;trustServerCertificate=false;' + 'hostNameInCertificate=*{workspace_suffix};loginTimeout=30;Authentication=ActiveDirectoryIntegrated', + }, + SqlPoolConnectionClientType.Odbc: { + SqlPoolConnectionClientAuthenticationType.SqlPassword: + 'Driver={{ODBC Driver 13 for SQL Server}};Server=tcp:{workspace_fqdn},1433;' + 'Database={sql_pool};Uid=;Pwd=;Encrypt=yes;' + 'TrustServerCertificate=no;Connection Timeout=30;', + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryPassword: + 'Driver={{ODBC Driver 13 for SQL Server}};Server=tcp:{workspace_fqdn},1433;' + 'Database={sql_pool};Uid=;Pwd=;Encrypt=yes;' + 'TrustServerCertificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword', + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryIntegrated: + 'Driver={{ODBC Driver 13 for SQL Server}};Server=tcp:{workspace_fqdn},1433;' + 'Database={sql_pool};Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;' + 'Authentication=ActiveDirectoryIntegrated', + }, + SqlPoolConnectionClientType.Php: { + # pylint: disable=line-too-long + SqlPoolConnectionClientAuthenticationType.SqlPassword: + '$connectionOptions = array("UID"=>"@{workspace}", "PWD"=>"", "Database"=>{sql_pool}, "LoginTimeout" => 30, "Encrypt" => 1, "TrustServerCertificate" => 0); $serverName = "tcp:{workspace_fqdn},1433"; $conn = sqlsrv_connect($serverName, $connectionOptions);', + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryPassword: + CLIError('PHP sqlsrv driver only supports SQL Password authentication.'), + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryIntegrated: + CLIError('PHP sqlsrv driver only supports SQL Password authentication.'), + }, + SqlPoolConnectionClientType.PhpPdo: { + # pylint: disable=line-too-long + SqlPoolConnectionClientAuthenticationType.SqlPassword: + '$conn = new PDO("sqlsrv:server = tcp:{workspace_fqdn},1433; Database = {sql_pool}; LoginTimeout = 30; Encrypt = 1; TrustServerCertificate = 0;", "", "");', + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryPassword: + CLIError('PHP Data Object (PDO) driver only supports SQL Password authentication.'), + SqlPoolConnectionClientAuthenticationType.ActiveDirectoryIntegrated: + CLIError('PHP Data Object (PDO) driver only supports SQL Password authentication.'), + } + } + + f = formats[client_provider][auth_type] + + if isinstance(f, Exception): + # Error + raise f + + # Success + return f.format(**conn_str_props) + + +def _construct_database_resource_id(cli_ctx, resource_group_name, server_name, database_name): + # url parse package has different names in Python 2 and 3. 'six' package works cross-version. + from six.moves.urllib.parse import quote # pylint: disable=import-error + from azure.cli.core.commands.client_factory import get_subscription_id + + return '/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Sql/servers/{}/databases/{}'.format( + quote(get_subscription_id(cli_ctx)), + quote(resource_group_name), + quote(server_name), + quote(database_name)) diff --git a/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolblobauditingpolicy.py b/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolblobauditingpolicy.py new file mode 100644 index 00000000000..2fe67ee6497 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolblobauditingpolicy.py @@ -0,0 +1,225 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=unused-argument +from azure.mgmt.synapse.models import BlobAuditingPolicyState +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.cli.core.profiles import ResourceType +from knack.util import CLIError + + +def sqlpool_blob_auditing_policy_update( + cmd, + instance, + state=None, + storage_account=None, + storage_endpoint=None, + storage_account_access_key=None, + retention_days=None, + audit_actions_and_groups=None, + storage_account_subscription_id=None, + is_storage_secondary_key_in_use=None, + is_azure_monitor_target_enabled=None): + """ + Updates a sql pool blob auditing policy. Custom update function to apply parameters to instance. + """ + + # Validate input arguments + blob_storage_arguments_provided = any( + [storage_account, storage_endpoint, storage_account_access_key, retention_days]) + if not state and not blob_storage_arguments_provided: + raise CLIError('Either state or blob storage arguments are missing') + + if retention_days is not None and (not retention_days.isdigit() or int(retention_days) <= 0): + raise CLIError('retention-days must be a positive number greater than zero') + + if state is not None: + instance.state = BlobAuditingPolicyState[state.lower()] + + if _is_audit_policy_state_enabled(instance.state): + if is_storage_secondary_key_in_use is not None: + instance.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use + + if is_azure_monitor_target_enabled is not None: + instance.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + + # handle storage account and storage endpoint + _audit_policy_update_apply_blob_storage_details(cmd, instance, retention_days, storage_account, + storage_account_access_key, storage_endpoint, + storage_account_subscription_id) + + if audit_actions_and_groups is not None: + instance.audit_actions_and_groups = audit_actions_and_groups + + if not instance.audit_actions_and_groups or instance.audit_actions_and_groups == []: + instance.audit_actions_and_groups = [ + "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", + "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP"] + + return instance + + +def _audit_policy_update_apply_blob_storage_details(cmd, instance, retention_days, storage_account, + storage_account_access_key, storage_endpoint, + storage_account_subscription_id): + if storage_account is not None: + storage_resource_group = _find_storage_account_resource_group(cmd.cli_ctx, storage_account) + storage_endpoint = _get_storage_endpoint(cmd.cli_ctx, storage_account, storage_resource_group) + storage_account_subscription_id = _find_storage_account_subscription_id(cmd.cli_ctx, storage_account) + + if storage_endpoint is not None: + instance.storage_endpoint = storage_endpoint + + if storage_account_subscription_id is not None: + instance.storage_account_subscription_id = storage_account_subscription_id + + if storage_account_access_key is not None: + instance.storage_account_access_key = storage_account_access_key + elif storage_endpoint is not None: + # Resolve storage_account if not provided + if storage_account is None: + storage_account = _get_storage_account_name(storage_endpoint) + storage_resource_group = _find_storage_account_resource_group(cmd.cli_ctx, storage_account) + + # Resolve storage_account_access_key based on storage_account + instance.storage_account_access_key = _get_storage_key( + cli_ctx=cmd.cli_ctx, + storage_account=storage_account, + resource_group_name=storage_resource_group, + use_secondary_key=instance.is_storage_secondary_key_in_use) + + if retention_days is not None: + instance.retention_days = retention_days + + +def _find_storage_account_resource_id(cli_ctx, name): + ''' + Finds a storage account's resource group by querying ARM resource cache. + + Why do we have to do this: so we know the resource group in order to later query the storage API + to determine the account's keys and endpoint. Why isn't this just a command line parameter: + because if it was a command line parameter then the customer would need to specify storage + resource group just to update some unrelated property, which is annoying and makes no sense to + the customer. + ''' + + storage_type = 'Microsoft.Storage/storageAccounts' + classic_storage_type = 'Microsoft.ClassicStorage/storageAccounts' + + query = "name eq '{}' and (resourceType eq '{}' or resourceType eq '{}')".format( + name, storage_type, classic_storage_type) + + client = get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES) + resources = list(client.resources.list(filter=query)) + + if not resources: + raise CLIError("No storage account with name '{}' was found.".format(name)) + + if len(resources) > 1: + raise CLIError("Multiple storage accounts with name '{}' were found.".format(name)) + + if resources[0].type == classic_storage_type: + raise CLIError("The storage account with name '{}' is a classic storage account which is" + " not supported by this command. Use a non-classic storage account or" + " specify storage endpoint and key instead.".format(name)) + + return resources[0].id + + +def _find_storage_account_resource_group(cli_ctx, name): + """ + Finds a storage account's resource group by querying ARM resource cache. + + Why do we have to do this: so we know the resource group in order to later query the storage API + to determine the account's keys and endpoint. Why isn't this just a command line parameter: + because if it was a command line parameter then the customer would need to specify storage + resource group just to update some unrelated property, which is annoying and makes no sense to + the customer. + """ + resource_id = _find_storage_account_resource_id(cli_ctx, name) + # Split the uri and return just the resource group + return resource_id.split('/')[4] + + +def _find_storage_account_subscription_id(cli_ctx, name): + """ + Finds a storage account's resource group by querying ARM resource cache. + + Why do we have to do this: so we know the resource group in order to later query the storage API + to determine the account's keys and endpoint. Why isn't this just a command line parameter: + because if it was a command line parameter then the customer would need to specify storage + resource group just to update some unrelated property, which is annoying and makes no sense to + the customer. + """ + resource_id = _find_storage_account_resource_id(cli_ctx, name) + # Split the uri and return just the resource group + return resource_id.split('/')[2] + + +def _get_storage_account_name(storage_endpoint): + """ + Determines storage account name from endpoint url string. + e.g. 'https://mystorage.blob.core.windows.net' -> 'mystorage' + """ + # url parse package has different names in Python 2 and 3. 'six' package works cross-version. + from six.moves.urllib.parse import urlparse # pylint: disable=import-error + + return urlparse(storage_endpoint).netloc.split('.')[0] + + +def _get_storage_endpoint( + cli_ctx, + storage_account, + resource_group_name): + ''' + Gets storage account endpoint by querying storage ARM API. + ''' + from azure.mgmt.storage import StorageManagementClient + + # Get storage account + client = get_mgmt_service_client(cli_ctx, StorageManagementClient) + account = client.storage_accounts.get_properties( + resource_group_name=resource_group_name, + account_name=storage_account) + + # Get endpoint + # pylint: disable=no-member + endpoints = account.primary_endpoints + try: + return endpoints.blob + except AttributeError: + raise CLIError("The storage account with name '{}' (id '{}') has no blob endpoint. Use a" + " different storage account.".format(account.name, account.id)) + + +def _get_storage_key( + cli_ctx, + storage_account, + resource_group_name, + use_secondary_key): + ''' + Gets storage account key by querying storage ARM API. + ''' + from azure.mgmt.storage import StorageManagementClient + + # Get storage keys + client = get_mgmt_service_client(cli_ctx, StorageManagementClient) + keys = client.storage_accounts.list_keys( + resource_group_name=resource_group_name, + account_name=storage_account) + + # Choose storage key + index = 1 if use_secondary_key else 0 + return keys.keys[index].value # pylint: disable=no-member + + +def _check_audit_policy_state( + state, + value): + return state is not None and state.lower() == value.lower() + + +def _is_audit_policy_state_enabled(state): + return _check_audit_policy_state(state, BlobAuditingPolicyState.enabled.value) diff --git a/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolsecurityalertpolicy.py b/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolsecurityalertpolicy.py new file mode 100644 index 00000000000..a4053e364af --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolsecurityalertpolicy.py @@ -0,0 +1,102 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=unused-argument +from azure.mgmt.synapse.models import SecurityAlertPolicyState +from knack.util import CLIError +from .sqlpoolblobauditingpolicy import _find_storage_account_resource_group, _get_storage_endpoint, \ + _get_storage_account_name, _get_storage_key + + +def sqlpool_security_alert_policy_update( + cmd, + instance, + state=None, + storage_account=None, + storage_endpoint=None, + storage_account_access_key=None, + retention_days=None, + email_addresses=None, + disabled_alerts=None, + email_account_admins=None): + ''' + Updates a SQL pool's security alert policy. Custom update function to apply parameters to instance. + ''' + + # Apply state + if state: + instance.state = SecurityAlertPolicyState[state.lower()] + enabled = instance.state.value.lower() == SecurityAlertPolicyState.enabled.value.lower() # pylint: disable=no-member + + # Set storage-related properties + _sqlpool_security_policy_update( + cmd.cli_ctx, + instance, + enabled, + storage_account, + storage_endpoint, + storage_account_access_key, + False) + + # Set other properties + if retention_days: + instance.retention_days = retention_days + + if email_addresses: + instance.email_addresses = ";".join(email_addresses) + + if disabled_alerts: + instance.disabled_alerts = ";".join(disabled_alerts) + + if email_account_admins: + instance.email_account_admins = email_account_admins + + return instance + + +def _sqlpool_security_policy_update( + cli_ctx, + instance, + enabled, + storage_account, + storage_endpoint, + storage_account_access_key, + use_secondary_key): + """ + Common code for updating audit and threat detection policy. + """ + + # Validate storage endpoint arguments + if storage_endpoint and storage_account: + raise CLIError('--storage-endpoint and --storage-account cannot both be specified.') + + # Set storage endpoint + if storage_endpoint: + instance.storage_endpoint = storage_endpoint + if storage_account: + storage_resource_group = _find_storage_account_resource_group(cli_ctx, storage_account) + instance.storage_endpoint = _get_storage_endpoint(cli_ctx, storage_account, storage_resource_group) + + # Set storage access key + if storage_account_access_key: + # Access key is specified + instance.storage_account_access_key = storage_account_access_key + elif enabled: + # Access key is not specified, but state is Enabled. + # If state is Enabled, then access key property is required in PUT. However access key is + # readonly (GET returns empty string for access key), so we need to determine the value + # and then PUT it back. (We don't want the user to be force to specify this, because that + # would be very annoying when updating non-storage-related properties). + # This doesn't work if the user used generic update args, i.e. `--set state=Enabled` + # instead of `--state Enabled`, since the generic update args are applied after this custom + # function, but at least we tried. + if not storage_account: + storage_account = _get_storage_account_name(instance.storage_endpoint) + storage_resource_group = _find_storage_account_resource_group(cli_ctx, storage_account) + + instance.storage_account_access_key = _get_storage_key( + cli_ctx, + storage_account, + storage_resource_group, + use_secondary_key) diff --git a/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolsensitivitylabel.py b/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolsensitivitylabel.py new file mode 100644 index 00000000000..1783baaa47d --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/operations/sqlpoolsensitivitylabel.py @@ -0,0 +1,152 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=unused-argument +from azure.cli.core.commands.client_factory import get_mgmt_service_client +from azure.mgmt.synapse.models import SensitivityLabel, SensitivityLabelSource +from knack.util import CLIError + + +def sqlpool_sensitivity_label_show( + client, + sql_pool_name, + workspace_name, + schema_name, + table_name, + column_name, + resource_group_name): + + return client.get( + resource_group_name, + workspace_name, + sql_pool_name, + schema_name, + table_name, + column_name, + SensitivityLabelSource.current) + + +def sqlpool_sensitivity_label_update( + cmd, + client, + sql_pool_name, + workspace_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.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=_create_scope(), information_protection_policy_name="effective") + + sensitivity_label = SensitivityLabel() + + # Get the current label + try: + current_label = client.get( + resource_group_name, + workspace_name, + sql_pool_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 + 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 + + 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, workspace_name, sql_pool_name, schema_name, table_name, column_name, sensitivity_label) + + +def sqlpool_sensitivity_label_create( + cmd, + client, + sql_pool_name, + workspace_name, + schema_name, + table_name, + column_name, + resource_group_name, + label_name, + information_type): + # Get the information protection policy + from azure.mgmt.security import SecurityCenter + 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=_create_scope(), information_protection_policy_name="effective") + + sensitivity_label = SensitivityLabel() + # Find the label id and information type id in the policy by the label name provided + 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 + + 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, workspace_name, sql_pool_name, schema_name, table_name, column_name, sensitivity_label) + + +def _create_scope(): + # Gets tenantId from current subscription. + from azure.cli.core._profile import Profile + profile = Profile() + sub = profile.get_subscription() + tenant_id = sub['tenantId'] + + scope_format_string = '/providers/Microsoft.Management/managementGroups/{}' + return scope_format_string.format(tenant_id) diff --git a/src/azure-cli/azure/cli/command_modules/synapse/operations/workspace.py b/src/azure-cli/azure/cli/command_modules/synapse/operations/workspace.py index a3a505703ec..a13932aff3c 100644 --- a/src/azure-cli/azure/cli/command_modules/synapse/operations/workspace.py +++ b/src/azure-cli/azure/cli/command_modules/synapse/operations/workspace.py @@ -15,7 +15,8 @@ def list_workspaces(cmd, client, resource_group_name=None): def create_workspace(cmd, client, resource_group_name, workspace_name, storage_account, file_system, - sql_admin_login_user, sql_admin_login_password, location, tags=None, no_wait=False): + sql_admin_login_user, sql_admin_login_password, location, enable_managed_virtual_network=None, + tags=None, no_wait=False): identity_type = "SystemAssigned" identity = ManagedIdentity(type=identity_type) account_url = "https://{}.dfs.{}".format(storage_account, cmd.cli_ctx.cloud.suffixes.storage_endpoint) @@ -26,6 +27,7 @@ def create_workspace(cmd, client, resource_group_name, workspace_name, storage_a sql_administrator_login=sql_admin_login_user, sql_administrator_login_password=sql_admin_login_password, location=location, + managed_virtual_network="default" if enable_managed_virtual_network is True else None, tags=tags ) return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, workspace_name, workspace_info) diff --git a/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_managed_virtual_network_workspace.yaml b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_managed_virtual_network_workspace.yaml new file mode 100644 index 00000000000..c3a5687ffcd --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_managed_virtual_network_workspace.yaml @@ -0,0 +1,926 @@ +interactions: +- request: + body: '{"sku": {"name": "Standard_RAGRS"}, "kind": "StorageV2", "location": "northeurope", + "properties": {"encryption": {"services": {"blob": {}}, "keySource": "Microsoft.Storage"}, + "isHnsEnabled": true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage account create + Connection: + - keep-alive + Content-Length: + - '197' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --enable-hierarchical-namespace --location + User-Agent: + - AZURECLI/2.15.0 azsdk-python-azure-mgmt-storage/16.0.0 Python/3.7.2 (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Storage/storageAccounts/adlsgen2000004?api-version=2019-06-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-type: + - text/plain; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:11:37 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/northeurope/asyncoperations/3b7a36ed-59f2-4582-be03-d8eaa0a6aff5?monitor=true&api-version=2019-06-01 + 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 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - storage account create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --enable-hierarchical-namespace --location + User-Agent: + - AZURECLI/2.15.0 azsdk-python-azure-mgmt-storage/16.0.0 Python/3.7.2 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/northeurope/asyncoperations/3b7a36ed-59f2-4582-be03-d8eaa0a6aff5?monitor=true&api-version=2019-06-01 + response: + body: + string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Storage/storageAccounts/adlsgen2000004","name":"adlsgen2000004","type":"Microsoft.Storage/storageAccounts","location":"northeurope","tags":{},"properties":{"privateEndpointConnections":[],"isHnsEnabled":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-11-30T13:11:36.4655386Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-11-30T13:11:36.4655386Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-11-30T13:11:36.3718363Z","primaryEndpoints":{"dfs":"https://adlsgen2000004.dfs.core.windows.net/","web":"https://adlsgen2000004.z16.web.core.windows.net/","blob":"https://adlsgen2000004.blob.core.windows.net/","queue":"https://adlsgen2000004.queue.core.windows.net/","table":"https://adlsgen2000004.table.core.windows.net/","file":"https://adlsgen2000004.file.core.windows.net/"},"primaryLocation":"northeurope","statusOfPrimary":"available","secondaryLocation":"westeurope","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://adlsgen2000004-secondary.dfs.core.windows.net/","web":"https://adlsgen2000004-secondary.z16.web.core.windows.net/","blob":"https://adlsgen2000004-secondary.blob.core.windows.net/","queue":"https://adlsgen2000004-secondary.queue.core.windows.net/","table":"https://adlsgen2000004-secondary.table.core.windows.net/"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1727' + content-type: + - application/json + date: + - Mon, 30 Nov 2020 13:11:54 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: '{"location": "northeurope", "properties": {"defaultDataLakeStorage": {"accountUrl": + "https://adlsgen2000004.dfs.core.windows.net", "filesystem": "testfilesystem"}, + "sqlAdministratorLoginPassword": "Pswd1000003", "sqlAdministratorLogin": "cliuser1", + "managedVirtualNetwork": "default"}, "identity": {"type": "SystemAssigned"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse workspace create + Connection: + - keep-alive + Content-Length: + - '332' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002?api-version=2019-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002","location":"northeurope","name":"clitest000002","type":"Microsoft.Synapse/workspaces","identity":{"type":"SystemAssigned","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"e049a101-1b70-4920-b228-342dc92c532f"},"properties":{"managedVirtualNetwork":"default","connectivityEndpoints":{"web":"https://web.azuresynapse.net?workspace=%2fsubscriptions%2f051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3%2fresourceGroups%2fsynapse-cli000001%2fproviders%2fMicrosoft.Synapse%2fworkspaces%2fclitest000002","dev":"https://clitest000002.dev.azuresynapse.net","sqlOnDemand":"clitest000002-ondemand.sql.azuresynapse.net","sql":"clitest000002.sql.azuresynapse.net"},"managedResourceGroupName":"synapseworkspace-managedrg-3c86d4ae-9ceb-4365-8a68-fcd33cbf157d","defaultDataLakeStorage":{"accountUrl":"https://adlsgen2000004.dfs.core.windows.net","filesystem":"testfilesystem"},"privateEndpointConnections":[],"workspaceUID":"81e3f28b-e154-4523-a3d7-8c2e80b5de45","extraProperties":{"IsScopeEnabled":false,"WorkspaceType":"Normal"},"managedVirtualNetworkSettings":{"preventDataExfiltration":false},"encryption":{"doubleEncryptionEnabled":false},"provisioningState":"Provisioning"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + cache-control: + - no-cache + content-length: + - '1331' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:13:08 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: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:13: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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:14:11 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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:14:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:15:11 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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:15: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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:16:12 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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:16: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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:17:13 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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:17:43 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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:18: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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:18: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 +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:19:15 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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:19:46 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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002/operationStatuses/e2ba1163-f02e-4a86-b3cc-d52bca42f577?api-version=2019-06-01-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:20:16 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: + - synapse workspace create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --storage-account --file-system --sql-admin-login-user + --sql-admin-login-password --location --enable-managed-virtual-network + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002?api-version=2019-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002","location":"northeurope","name":"clitest000002","type":"Microsoft.Synapse/workspaces","identity":{"type":"SystemAssigned","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"e049a101-1b70-4920-b228-342dc92c532f"},"properties":{"managedVirtualNetwork":"default","connectivityEndpoints":{"web":"https://web.azuresynapse.net?workspace=%2fsubscriptions%2f051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3%2fresourceGroups%2fsynapse-cli000001%2fproviders%2fMicrosoft.Synapse%2fworkspaces%2fclitest000002","dev":"https://clitest000002.dev.azuresynapse.net","sqlOnDemand":"clitest000002-ondemand.sql.azuresynapse.net","sql":"clitest000002.sql.azuresynapse.net"},"managedResourceGroupName":"synapseworkspace-managedrg-3c86d4ae-9ceb-4365-8a68-fcd33cbf157d","defaultDataLakeStorage":{"accountUrl":"https://adlsgen2000004.dfs.core.windows.net","filesystem":"testfilesystem"},"sqlAdministratorLogin":"cliuser1","privateEndpointConnections":[],"workspaceUID":"81e3f28b-e154-4523-a3d7-8c2e80b5de45","extraProperties":{"IsScopeEnabled":false,"WorkspaceType":"Normal"},"managedVirtualNetworkSettings":{"preventDataExfiltration":false},"encryption":{"doubleEncryptionEnabled":false},"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1363' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:20:16 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: + - synapse workspace show + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002?api-version=2019-06-01-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/synapse-cli000001/providers/Microsoft.Synapse/workspaces/clitest000002","location":"northeurope","name":"clitest000002","type":"Microsoft.Synapse/workspaces","identity":{"type":"SystemAssigned","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"e049a101-1b70-4920-b228-342dc92c532f"},"properties":{"managedVirtualNetwork":"default","connectivityEndpoints":{"web":"https://web.azuresynapse.net?workspace=%2fsubscriptions%2f051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3%2fresourceGroups%2fsynapse-cli000001%2fproviders%2fMicrosoft.Synapse%2fworkspaces%2fclitest000002","dev":"https://clitest000002.dev.azuresynapse.net","sqlOnDemand":"clitest000002-ondemand.sql.azuresynapse.net","sql":"clitest000002.sql.azuresynapse.net"},"managedResourceGroupName":"synapseworkspace-managedrg-3c86d4ae-9ceb-4365-8a68-fcd33cbf157d","defaultDataLakeStorage":{"accountUrl":"https://adlsgen2000004.dfs.core.windows.net","filesystem":"testfilesystem"},"sqlAdministratorLogin":"cliuser1","privateEndpointConnections":[],"workspaceUID":"81e3f28b-e154-4523-a3d7-8c2e80b5de45","extraProperties":{"IsScopeEnabled":false,"WorkspaceType":"Normal"},"managedVirtualNetworkSettings":{"preventDataExfiltration":false},"encryption":{"doubleEncryptionEnabled":false},"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1363' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 13:20:19 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/synapse/tests/latest/recordings/test_sql_pool_audit_policy.yaml b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_audit_policy.yaml new file mode 100644 index 00000000000..4d2c4d9b964 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_audit_policy.yaml @@ -0,0 +1,435 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool audit-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/auditingSettings/default?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"retentionDays":0,"auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"],"isStorageSecondaryKeyInUse":false,"isAzureMonitorTargetEnabled":false,"state":"Enabled","storageEndpoint":"https://zzystorageforsynapse.blob.core.windows.net/","storageAccountSubscriptionId":"051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/auditingSettings/Default","name":"Default","type":"Microsoft.Synapse/workspaces/sqlPools/auditingSettings"}' + headers: + cache-control: + - no-cache + content-length: + - '670' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:56:52 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: + - synapse sql pool audit-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=name%20eq%20%27zzystorageforsynapse%27%20and%20%28resourceType%20eq%20%27Microsoft.Storage%2FstorageAccounts%27%20or%20resourceType%20eq%20%27Microsoft.ClassicStorage%2FstorageAccounts%27%29&api-version=2020-06-01 + response: + body: + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?%24filter=name+eq+%27zzystorageforsynapse%27+and+(resourceType+eq+%27Microsoft.Storage%2fstorageAccounts%27+or+resourceType+eq+%27Microsoft.ClassicStorage%2fstorageAccounts%27)&api-version=2020-06-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IU9UTTVPVEUtIiwibmV4dFJvd0tleSI6IjEhMjA4IU1EVXhSRVJGUTBFeFJVUTJORVE0UWtKQk5rWXhSa1kxTmpGRk5VWXpRak5mUjFKTUxWTlpUa0ZRVTBWWFQxSkxVMUJCUTBVNk1rUk5RVTVCUjBWRVVrYzZNa1ExTkVNMU5EUkJPRG95UkVSQlJqVTZmRVJFTURSRU9FRTVSREEzTmpOQ05UY3RUVWxEVWs5VFQwWlVPakpGVTFGTU9qSkdVMFZTVmtWU1V6b3lSa1pGVGtkUlNWTkRWVk10VTA5VlZFaERSVTVVVWtGTVZWTS0ifQ%3d%3d"}' + headers: + cache-control: + - no-cache + content-length: + - '689' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:56:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + 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: + - synapse sql pool audit-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?%24filter=name+eq+%27zzystorageforsynapse%27+and+(resourceType+eq+%27Microsoft.Storage%2FstorageAccounts%27+or+resourceType+eq+%27Microsoft.ClassicStorage%2FstorageAccounts%27)&api-version=2020-06-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IU9UTTVPVEUtIiwibmV4dFJvd0tleSI6IjEhMjA4IU1EVXhSRVJGUTBFeFJVUTJORVE0UWtKQk5rWXhSa1kxTmpGRk5VWXpRak5mUjFKTUxWTlpUa0ZRVTBWWFQxSkxVMUJCUTBVNk1rUk5RVTVCUjBWRVVrYzZNa1ExTkVNMU5EUkJPRG95UkVSQlJqVTZmRVJFTURSRU9FRTVSREEzTmpOQ05UY3RUVWxEVWs5VFQwWlVPakpGVTFGTU9qSkdVMFZTVmtWU1V6b3lSa1pGVGtkUlNWTkRWVk10VTA5VlZFaERSVTVVVWtGTVZWTS0ifQ%3D%3D + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse","name":"zzystorageforsynapse","type":"Microsoft.Storage/storageAccounts","sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","location":"eastus","tags":{}}]}' + headers: + cache-control: + - no-cache + content-length: + - '336' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:56:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + 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: + - synapse sql pool audit-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - AZURECLI/2.15.0 azsdk-python-azure-mgmt-storage/16.0.0 Python/3.7.2 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse?api-version=2019-06-01 + response: + body: + string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse","name":"zzystorageforsynapse","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_2","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-11-26T07:26:22.1500019Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-11-26T07:26:22.1500019Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-11-26T07:26:22.0093601Z","primaryEndpoints":{"dfs":"https://zzystorageforsynapse.dfs.core.windows.net/","web":"https://zzystorageforsynapse.z13.web.core.windows.net/","blob":"https://zzystorageforsynapse.blob.core.windows.net/","queue":"https://zzystorageforsynapse.queue.core.windows.net/","table":"https://zzystorageforsynapse.table.core.windows.net/","file":"https://zzystorageforsynapse.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://zzystorageforsynapse-secondary.dfs.core.windows.net/","web":"https://zzystorageforsynapse-secondary.z13.web.core.windows.net/","blob":"https://zzystorageforsynapse-secondary.blob.core.windows.net/","queue":"https://zzystorageforsynapse-secondary.queue.core.windows.net/","table":"https://zzystorageforsynapse-secondary.table.core.windows.net/"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1798' + content-type: + - application/json + date: + - Fri, 27 Nov 2020 12:56:54 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: + - synapse sql pool audit-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=name%20eq%20%27zzystorageforsynapse%27%20and%20%28resourceType%20eq%20%27Microsoft.Storage%2FstorageAccounts%27%20or%20resourceType%20eq%20%27Microsoft.ClassicStorage%2FstorageAccounts%27%29&api-version=2020-06-01 + response: + body: + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?%24filter=name+eq+%27zzystorageforsynapse%27+and+(resourceType+eq+%27Microsoft.Storage%2fstorageAccounts%27+or+resourceType+eq+%27Microsoft.ClassicStorage%2fstorageAccounts%27)&api-version=2020-06-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IU9UTTVPVEUtIiwibmV4dFJvd0tleSI6IjEhMjA4IU1EVXhSRVJGUTBFeFJVUTJORVE0UWtKQk5rWXhSa1kxTmpGRk5VWXpRak5mUjFKTUxWTlpUa0ZRVTBWWFQxSkxVMUJCUTBVNk1rUk5RVTVCUjBWRVVrYzZNa1ExTkVNMU5EUkJPRG95UkVSQlJqVTZmRVJFTURSRU9FRTVSREEzTmpOQ05UY3RUVWxEVWs5VFQwWlVPakpGVTFGTU9qSkdVMFZTVmtWU1V6b3lSa1pGVGtkUlNWTkRWVk10VTA5VlZFaERSVTVVVWtGTVZWTS0ifQ%3d%3d"}' + headers: + cache-control: + - no-cache + content-length: + - '689' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:56:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + 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: + - synapse sql pool audit-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?%24filter=name+eq+%27zzystorageforsynapse%27+and+(resourceType+eq+%27Microsoft.Storage%2FstorageAccounts%27+or+resourceType+eq+%27Microsoft.ClassicStorage%2FstorageAccounts%27)&api-version=2020-06-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IU9UTTVPVEUtIiwibmV4dFJvd0tleSI6IjEhMjA4IU1EVXhSRVJGUTBFeFJVUTJORVE0UWtKQk5rWXhSa1kxTmpGRk5VWXpRak5mUjFKTUxWTlpUa0ZRVTBWWFQxSkxVMUJCUTBVNk1rUk5RVTVCUjBWRVVrYzZNa1ExTkVNMU5EUkJPRG95UkVSQlJqVTZmRVJFTURSRU9FRTVSREEzTmpOQ05UY3RUVWxEVWs5VFQwWlVPakpGVTFGTU9qSkdVMFZTVmtWU1V6b3lSa1pGVGtkUlNWTkRWVk10VTA5VlZFaERSVTVVVWtGTVZWTS0ifQ%3D%3D + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse","name":"zzystorageforsynapse","type":"Microsoft.Storage/storageAccounts","sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","location":"eastus","tags":{}}]}' + headers: + cache-control: + - no-cache + content-length: + - '336' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:56:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + 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: + - synapse sql pool audit-policy update + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - AZURECLI/2.15.0 azsdk-python-azure-mgmt-storage/16.0.0 Python/3.7.2 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse/listKeys?api-version=2019-06-01&$expand=kerb + 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: + - Fri, 27 Nov 2020 12:56:56 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-resource-requests: + - '11999' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"state": "Enabled", "storageEndpoint": "https://zzystorageforsynapse.blob.core.windows.net/", + "storageAccountAccessKey": "veryFakedStorageAccountKey==", "retentionDays": + 0, "auditActionsAndGroups": ["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", + "BATCH_COMPLETED_GROUP"], "storageAccountSubscriptionId": "051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3", + "isStorageSecondaryKeyInUse": false, "isAzureMonitorTargetEnabled": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool audit-policy update + Connection: + - keep-alive + Content-Length: + - '532' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/auditingSettings/default?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"retentionDays":0,"auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"],"isStorageSecondaryKeyInUse":false,"isAzureMonitorTargetEnabled":false,"state":"Enabled","storageEndpoint":"https://zzystorageforsynapse.blob.core.windows.net/","storageAccountSubscriptionId":"051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/auditingSettings/Default","name":"Default","type":"Microsoft.Synapse/workspaces/sqlPools/auditingSettings"}' + headers: + cache-control: + - no-cache + content-length: + - '670' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:56:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool audit-policy show + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/auditingSettings/default?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"retentionDays":0,"auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"],"isStorageSecondaryKeyInUse":false,"isAzureMonitorTargetEnabled":false,"state":"Enabled","storageEndpoint":"https://zzystorageforsynapse.blob.core.windows.net/","storageAccountSubscriptionId":"051ddeca-1ed6-4d8b-ba6f-1ff561e5f3b3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/auditingSettings/Default","name":"Default","type":"Microsoft.Synapse/workspaces/sqlPools/auditingSettings"}' + headers: + cache-control: + - no-cache + content-length: + - '670' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:56:59 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/synapse/tests/latest/recordings/test_sql_pool_classification_and_recommendation.yaml b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_classification_and_recommendation.yaml new file mode 100644 index 00000000000..79c6174f12a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_classification_and_recommendation.yaml @@ -0,0 +1,519 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool classification create + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --schema --table --column --label + --information-type + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-security/0.4.1 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/providers/Microsoft.Management/managementGroups/00000000-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: + - Tue, 01 Dec 2020 05:26:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-tenant-resource-requests: + - '749' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"labelName": "Confidential", "labelId": "05e6eaa1-075a-4fb4-a732-a92215a2444a", + "informationType": "Contact Info", "informationTypeId": "5c503e21-22c6-81fa-620b-f369b8ec38d1"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool classification create + Connection: + - keep-alive + Content-Length: + - '192' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --name --workspace-name --resource-group --schema --table --column --label + --information-type + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/current?api-version=2019-06-01-preview + response: + body: + string: '{"managedBy":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1","properties":{"schemaName":"dbo","tableName":"Person","columnName":"phone","labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/current","name":"current","type":"Microsoft.Synapse/workspaces/sqlPools/sensitivityLabels"}' + headers: + cache-control: + - no-cache + content-length: + - '734' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 01 Dec 2020 05:27:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool classification show + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --schema --table --column + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/current?api-version=2019-06-01-preview + response: + body: + string: '{"managedBy":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1","properties":{"schemaName":"dbo","tableName":"Person","columnName":"phone","labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/current","name":"current","type":"Microsoft.Synapse/workspaces/sqlPools/sensitivityLabels"}' + headers: + cache-control: + - no-cache + content-length: + - '734' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 01 Dec 2020 05:27:04 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: + - synapse sql pool classification list + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/currentSensitivityLabels?api-version=2019-06-01-preview + response: + body: + string: '{"value":[{"managedBy":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1","properties":{"schemaName":"dbo","tableName":"Person","columnName":"phone","labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/current","name":"current","type":"Microsoft.Synapse/workspaces/sqlPools/sensitivityLabels"}]}' + headers: + cache-control: + - no-cache + content-length: + - '746' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 01 Dec 2020 05:27:06 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: + - synapse sql pool classification show + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --schema --table --column + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/current?api-version=2019-06-01-preview + response: + body: + string: '{"managedBy":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1","properties":{"schemaName":"dbo","tableName":"Person","columnName":"phone","labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/current","name":"current","type":"Microsoft.Synapse/workspaces/sqlPools/sensitivityLabels"}' + headers: + cache-control: + - no-cache + content-length: + - '734' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 01 Dec 2020 05:27:08 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: + - synapse sql pool classification delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --workspace-name --resource-group --schema --table --column + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/current?api-version=2019-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 01 Dec 2020 05:27:10 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: + - synapse sql pool classification recommendation enable + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --workspace-name --resource-group --schema --table --column + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/recommended/enable?api-version=2019-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 01 Dec 2020 05:27:15 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: + - synapse sql pool classification recommendation list + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/recommendedSensitivityLabels?api-version=2019-06-01-preview + response: + body: + string: '{"value":[{"managedBy":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1","properties":{"schemaName":"dbo","tableName":"Person","columnName":"phone","labelName":"Confidential","labelId":"05e6eaa1-075a-4fb4-a732-a92215a2444a","informationType":"Contact + Info","informationTypeId":"5c503e21-22c6-81fa-620b-f369b8ec38d1","isDisabled":false,"rank":"Medium"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/recommended","name":"recommended","type":"Microsoft.Synapse/workspaces/sqlPools/sensitivityLabels"}]}' + headers: + cache-control: + - no-cache + content-length: + - '789' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 01 Dec 2020 05:27:20 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: + - synapse sql pool classification recommendation disable + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --workspace-name --resource-group --schema --table --column + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/schemas/dbo/tables/Person/columns/phone/sensitivityLabels/recommended/disable?api-version=2019-06-01-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 01 Dec 2020 05:27:23 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: + - synapse sql pool classification recommendation list + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/recommendedSensitivityLabels?api-version=2019-06-01-preview + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 01 Dec 2020 05:27: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 +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_restore_and_list_deleted.yaml b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_restore_and_list_deleted.yaml new file mode 100644 index 00000000000..bf3c2b0f0e9 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_restore_and_list_deleted.yaml @@ -0,0 +1,1419 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"status":"Online","maxSizeBytes":263882790666240,"collation":"SQL_Latin1_General_CP1_CI_AS","restorePointInTime":"0001-01-01T00:00:00","creationDate":"2020-03-02T04:27:54.933Z","provisioningState":"Succeeded"},"sku":{"name":"DW1500c","capacity":0},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1","name":"sqlpoolcli1","type":"Microsoft.Synapse/workspaces/sqlPools","location":"eastus"}' + headers: + cache-control: + - no-cache + content-length: + - '518' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:17:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "sku": {"name": "DW1500c"}, "properties": {"sourceDatabaseId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Sql/servers/testsynapseworkspace/databases/sqlpoolcli1", + "restorePointInTime": "2020-11-25T02:47:37", "createMode": "PointInTimeRestore"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/destsqlpool000001?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"maxSizeBytes":0,"restorePointInTime":"0001-01-01T00:00:00","creationDate":"0001-01-01T00:00:00","provisioningState":"Provisioning"},"sku":{"name":"DW1500c","capacity":0},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/destsqlpool000001","name":"destsqlpool000001","type":"Microsoft.Synapse/workspaces/sqlPools"}' + headers: + access-control-allow-headers: + - Location + - Retry-After + access-control-expose-headers: + - Location + - Retry-After + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + cache-control: + - no-cache + content-length: + - '429' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:17:06 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationResults/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:17: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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:17:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:18:18 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:18:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:19:19 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:19:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:20:19 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:20:50 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:21:20 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:21:50 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:22:20 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:22:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:23: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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:23:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:24:22 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:24:52 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:25:22 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:25:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:26:23 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: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/ebcb2af2-7599-4030-92a9-dbc84dc83b0f?api-version=2019-06-01-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:26:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool restore + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --dest-name --time + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/destsqlpool000001?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"status":"Online","maxSizeBytes":263882790666240,"collation":"SQL_Latin1_General_CP1_CI_AS","restorePointInTime":"0001-01-01T00:00:00","creationDate":"2020-11-27T08:25:33.317Z","provisioningState":"Succeeded"},"sku":{"name":"DW1500c","capacity":0},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/destsqlpool000001","name":"destsqlpool000001","type":"Microsoft.Synapse/workspaces/sqlPools","location":"eastus"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:26: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: + - synapse sql pool show + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/destsqlpool000001?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"status":"Online","maxSizeBytes":263882790666240,"collation":"SQL_Latin1_General_CP1_CI_AS","restorePointInTime":"0001-01-01T00:00:00","creationDate":"2020-11-27T08:25:33.317Z","provisioningState":"Succeeded"},"sku":{"name":"DW1500c","capacity":0},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/destsqlpool000001","name":"destsqlpool000001","type":"Microsoft.Synapse/workspaces/sqlPools","location":"eastus"}' + headers: + cache-control: + - no-cache + content-length: + - '526' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:26:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --workspace-name --resource-group --yes + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/destsqlpool000001?api-version=2019-06-01-preview + response: + body: + string: '' + headers: + access-control-allow-headers: + - Location + - Retry-After + access-control-expose-headers: + - Location + - Retry-After + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/21e16cd3-b9be-42fe-b6a2-25f08e4c52ae?api-version=2019-06-01-preview + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 27 Nov 2020 08:26:58 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationResults/21e16cd3-b9be-42fe-b6a2-25f08e4c52ae?api-version=2019-06-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-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool delete + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --yes + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/21e16cd3-b9be-42fe-b6a2-25f08e4c52ae?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:27:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool delete + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --yes + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/21e16cd3-b9be-42fe-b6a2-25f08e4c52ae?api-version=2019-06-01-preview + response: + body: + string: '{"status":"InProgress"}' + headers: + cache-control: + - no-cache + content-length: + - '23' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:27: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: + - synapse sql pool delete + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group --yes + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/operationStatuses/21e16cd3-b9be-42fe-b6a2-25f08e4c52ae?api-version=2019-06-01-preview + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:28:10 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: + - synapse sql pool list-deleted + Connection: + - keep-alive + ParameterSetName: + - --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools?api-version=2019-06-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps2518,132503483760900000","name":"ps2518,132503483760900000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps2518","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-20T12:06:53.97Z","deletionDate":"2020-11-20T12:19:36.09Z","earliestRestoreDate":"2020-11-20T12:41:53.127Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/restoresqlpool,132508473190600000","name":"restoresqlpool,132508473190600000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"restoresqlpool","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-25T04:30:51.747Z","deletionDate":"2020-11-26T06:55:19.06Z","earliestRestoreDate":"2020-11-25T05:05:58.53Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/restoresqlpool2,132507583142800000","name":"restoresqlpool2,132507583142800000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"restoresqlpool2","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-25T05:29:06.557Z","deletionDate":"2020-11-25T06:11:54.28Z","earliestRestoreDate":"2020-11-25T06:05:12.357Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps1227,132507740882800000","name":"ps1227,132507740882800000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps1227","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T10:13:50.547Z","deletionDate":"2020-11-25T10:34:48.28Z","earliestRestoreDate":"2020-11-25T11:00:54.427Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/restoresqlpool4,132508473225270000","name":"restoresqlpool4,132508473225270000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"restoresqlpool4","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-25T05:51:02.673Z","deletionDate":"2020-11-26T06:55:22.527Z","earliestRestoreDate":"2020-11-25T06:28:32.407Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps1227,132507754057130000","name":"ps1227,132507754057130000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps1227","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T10:35:22.177Z","deletionDate":"2020-11-25T10:56:45.713Z","earliestRestoreDate":"2020-11-25T11:16:25.51Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/restoresqlpool3,132507583135130000","name":"restoresqlpool3,132507583135130000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"restoresqlpool3","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-25T05:39:16.967Z","deletionDate":"2020-11-25T06:11:53.513Z","earliestRestoreDate":"2020-11-25T06:18:42.88Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/destsqlpool4eci,132509361219500000","name":"destsqlpool4eci,132509361219500000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"destsqlpool4eci","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-27T07:24:36.277Z","deletionDate":"2020-11-27T07:35:21.95Z","earliestRestoreDate":"2020-11-27T08:03:26.94Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/clisql3038,132506951047370000","name":"clisql3038,132506951047370000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"clisql3038","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-04-09T16:28:39.847Z","deletionDate":"2020-11-24T12:38:24.737Z","earliestRestoreDate":"2020-11-20T00:00:00Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/newsqlpool,132508473202600000","name":"newsqlpool,132508473202600000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"newsqlpool","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-25T11:06:36.92Z","deletionDate":"2020-11-26T06:55:20.26Z","earliestRestoreDate":"2020-11-25T11:44:16.05Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps2609,132507794431400000","name":"ps2609,132507794431400000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps2609","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T11:53:27.057Z","deletionDate":"2020-11-25T12:04:03.14Z","earliestRestoreDate":"2020-11-25T12:29:55.607Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/restoresqlpool,132506951091900000","name":"restoresqlpool,132506951091900000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"restoresqlpool","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-20T07:00:10.097Z","deletionDate":"2020-11-24T12:38:29.19Z","earliestRestoreDate":"2020-11-20T07:40:44.617Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps9067,132507815243170000","name":"ps9067,132507815243170000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps9067","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T12:29:31.783Z","deletionDate":"2020-11-25T12:38:44.317Z","earliestRestoreDate":"2020-11-25T13:04:57.55Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps4436,132507708424830000","name":"ps4436,132507708424830000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps4436","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T09:25:36.477Z","deletionDate":"2020-11-25T09:40:42.483Z","earliestRestoreDate":"2020-11-25T10:03:20.06Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/restoresqlpool5,132508473198270000","name":"restoresqlpool5,132508473198270000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"restoresqlpool5","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-25T06:08:29.75Z","deletionDate":"2020-11-26T06:55:19.827Z","earliestRestoreDate":"2020-11-25T06:44:24.097Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps2518,132503475849970000","name":"ps2518,132503475849970000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps2518","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-20T11:58:24.743Z","deletionDate":"2020-11-20T12:06:24.997Z","earliestRestoreDate":"2020-11-20T12:32:22.23Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps1179,132507768177970000","name":"ps1179,132507768177970000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps1179","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T11:10:34.42Z","deletionDate":"2020-11-25T11:20:17.797Z","earliestRestoreDate":"2020-11-25T11:46:07.407Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps7881,132507842220530000","name":"ps7881,132507842220530000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps7881","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T13:07:10.537Z","deletionDate":"2020-11-25T13:23:42.053Z","earliestRestoreDate":"2020-11-25T13:45:25.507Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/toviewsqlpoolid,132506951032530000","name":"toviewsqlpoolid,132506951032530000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"toviewsqlpoolid","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-24T12:12:54.83Z","deletionDate":"2020-11-24T12:38:23.253Z","earliestRestoreDate":"2020-11-24T12:50:39.193Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps7881,132507832105330000","name":"ps7881,132507832105330000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps7881","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T12:57:27.387Z","deletionDate":"2020-11-25T13:06:50.533Z","earliestRestoreDate":"2020-11-25T13:32:43.683Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/destsqlpoolvxev,132509376879570000","name":"destsqlpoolvxev,132509376879570000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"destsqlpoolvxev","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW1500c","elasticPoolName":null,"creationDate":"2020-11-27T07:52:40.623Z","deletionDate":"2020-11-27T08:01:27.957Z","earliestRestoreDate":"2020-11-27T08:29:44.02Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/restorableDroppedSqlPools/ps4436,132507699086470000","name":"ps4436,132507699086470000","type":"Microsoft.Synapse/workspaces/restorableDroppedSqlPools","location":"East + US","properties":{"databaseName":"ps4436","edition":"DataWarehouse","maxSizeBytes":"263882790666240","serviceLevelObjective":"DW200c","elasticPoolName":null,"creationDate":"2020-11-25T09:15:34.53Z","deletionDate":"2020-11-25T09:25:08.647Z","earliestRestoreDate":"2020-11-25T09:50:51.987Z"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '13609' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 08:28:12 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/synapse/tests/latest/recordings/test_sql_pool_tde.yaml b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_tde.yaml new file mode 100644 index 00000000000..494917cd5b8 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_tde.yaml @@ -0,0 +1,106 @@ +interactions: +- request: + body: '{"properties": {"status": "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool tde set + Connection: + - keep-alive + Content-Length: + - '37' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --status --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testtde1/sqlPools/sqlpooltde/transparentDataEncryption/current?api-version=2019-06-01-preview + response: + body: + string: '{"name":"current","location":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testtde1/sqlPools/sqlpooltde/transparentDataEncryption/current","type":"Microsoft.Synapse/workspaces/sqlPools/transparentDataEncryption","properties":{"status":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '329' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 07:35: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 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool tde show + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testtde1/sqlPools/sqlpooltde/transparentDataEncryption/current?api-version=2019-06-01-preview + response: + body: + string: '{"name":"current","location":"North Europe","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testtde1/sqlPools/sqlpooltde/transparentDataEncryption/current","type":"Microsoft.Synapse/workspaces/sqlPools/transparentDataEncryption","properties":{"status":"Enabled"}}' + headers: + cache-control: + - no-cache + content-length: + - '339' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 30 Nov 2020 07:35:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_threat_policy.yaml b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_threat_policy.yaml new file mode 100644 index 00000000000..ded5e5e4077 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/recordings/test_sql_pool_threat_policy.yaml @@ -0,0 +1,344 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool threat-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/securityAlertPolicies/default?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"state":"Enabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"https://zzystorageforsynapse.blob.core.windows.net/","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-03-02T04:27:54.54Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/securityAlertPolicies/Default","name":"Default","type":"Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies"}' + headers: + cache-control: + - no-cache + content-length: + - '548' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:54:15 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: + - synapse sql pool threat-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=name%20eq%20%27zzystorageforsynapse%27%20and%20%28resourceType%20eq%20%27Microsoft.Storage%2FstorageAccounts%27%20or%20resourceType%20eq%20%27Microsoft.ClassicStorage%2FstorageAccounts%27%29&api-version=2020-06-01 + response: + body: + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?%24filter=name+eq+%27zzystorageforsynapse%27+and+(resourceType+eq+%27Microsoft.Storage%2fstorageAccounts%27+or+resourceType+eq+%27Microsoft.ClassicStorage%2fstorageAccounts%27)&api-version=2020-06-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IU9UTTVPVEUtIiwibmV4dFJvd0tleSI6IjEhMjA4IU1EVXhSRVJGUTBFeFJVUTJORVE0UWtKQk5rWXhSa1kxTmpGRk5VWXpRak5mUjFKTUxWTlpUa0ZRVTBWWFQxSkxVMUJCUTBVNk1rUk5RVTVCUjBWRVVrYzZNa1ExTkVNMU5EUkJPRG95UkVSQlJqVTZmRVJFTURSRU9FRTVSREEzTmpOQ05UY3RUVWxEVWs5VFQwWlVPakpGVTFGTU9qSkdVMFZTVmtWU1V6b3lSa1pGVGtkUlNWTkRWVk10VTA5VlZFaERSVTVVVWtGTVZWTS0ifQ%3d%3d"}' + headers: + cache-control: + - no-cache + content-length: + - '689' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:54:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + 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: + - synapse sql pool threat-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-resource/10.2.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?%24filter=name+eq+%27zzystorageforsynapse%27+and+(resourceType+eq+%27Microsoft.Storage%2FstorageAccounts%27+or+resourceType+eq+%27Microsoft.ClassicStorage%2FstorageAccounts%27)&api-version=2020-06-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IU9UTTVPVEUtIiwibmV4dFJvd0tleSI6IjEhMjA4IU1EVXhSRVJGUTBFeFJVUTJORVE0UWtKQk5rWXhSa1kxTmpGRk5VWXpRak5mUjFKTUxWTlpUa0ZRVTBWWFQxSkxVMUJCUTBVNk1rUk5RVTVCUjBWRVVrYzZNa1ExTkVNMU5EUkJPRG95UkVSQlJqVTZmRVJFTURSRU9FRTVSREEzTmpOQ05UY3RUVWxEVWs5VFQwWlVPakpGVTFGTU9qSkdVMFZTVmtWU1V6b3lSa1pGVGtkUlNWTkRWVk10VTA5VlZFaERSVTVVVWtGTVZWTS0ifQ%3D%3D + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse","name":"zzystorageforsynapse","type":"Microsoft.Storage/storageAccounts","sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","location":"eastus","tags":{}}]}' + headers: + cache-control: + - no-cache + content-length: + - '336' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:54:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + 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: + - synapse sql pool threat-policy update + Connection: + - keep-alive + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - AZURECLI/2.15.0 azsdk-python-azure-mgmt-storage/16.0.0 Python/3.7.2 (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse?api-version=2019-06-01 + response: + body: + string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse","name":"zzystorageforsynapse","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_2","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-11-26T07:26:22.1500019Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-11-26T07:26:22.1500019Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-11-26T07:26:22.0093601Z","primaryEndpoints":{"dfs":"https://zzystorageforsynapse.dfs.core.windows.net/","web":"https://zzystorageforsynapse.z13.web.core.windows.net/","blob":"https://zzystorageforsynapse.blob.core.windows.net/","queue":"https://zzystorageforsynapse.queue.core.windows.net/","table":"https://zzystorageforsynapse.table.core.windows.net/","file":"https://zzystorageforsynapse.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://zzystorageforsynapse-secondary.dfs.core.windows.net/","web":"https://zzystorageforsynapse-secondary.z13.web.core.windows.net/","blob":"https://zzystorageforsynapse-secondary.blob.core.windows.net/","queue":"https://zzystorageforsynapse-secondary.queue.core.windows.net/","table":"https://zzystorageforsynapse-secondary.table.core.windows.net/"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1798' + content-type: + - application/json + date: + - Fri, 27 Nov 2020 12:54:16 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: + - synapse sql pool threat-policy update + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - AZURECLI/2.15.0 azsdk-python-azure-mgmt-storage/16.0.0 Python/3.7.2 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/zzystorageforsynapse/listKeys?api-version=2019-06-01&$expand=kerb + 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: + - Fri, 27 Nov 2020 12:54:16 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-resource-requests: + - '11999' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"state": "Enabled", "disabledAlerts": [""], "emailAddresses": + [""], "emailAccountAdmins": false, "storageEndpoint": "https://zzystorageforsynapse.blob.core.windows.net/", + "storageAccountAccessKey": "veryFakedStorageAccountKey==", "retentionDays": + 0}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool threat-policy update + Connection: + - keep-alive + Content-Length: + - '326' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --state --storage-account --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/securityAlertPolicies/default?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"state":"Enabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"https://zzystorageforsynapse.blob.core.windows.net/","storageAccountAccessKey":"","retentionDays":0,"creationTime":"0001-01-01T00:00:00Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/securityAlertPolicies/Default","name":"Default","type":"Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies"}' + headers: + cache-control: + - no-cache + content-length: + - '545' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:54:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - synapse sql pool threat-policy show + Connection: + - keep-alive + ParameterSetName: + - --name --workspace-name --resource-group + User-Agent: + - python/3.7.2 (Windows-10-10.0.18362-SP0) msrest/0.6.18 msrest_azure/0.6.3 + azure-mgmt-synapse/0.5.0 Azure-SDK-For-Python AZURECLI/2.15.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/securityAlertPolicies/default?api-version=2019-06-01-preview + response: + body: + string: '{"properties":{"state":"Enabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"https://zzystorageforsynapse.blob.core.windows.net/","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-03-02T04:27:54.54Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Synapse/workspaces/testsynapseworkspace/sqlPools/sqlpoolcli1/securityAlertPolicies/Default","name":"Default","type":"Microsoft.Synapse/workspaces/sqlPools/securityAlertPolicies"}' + headers: + cache-control: + - no-cache + content-length: + - '548' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 27 Nov 2020 12:54: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 +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/test_synapse_scenario.py b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/test_synapse_scenario.py index e298dcc23f5..ebdc23a0593 100644 --- a/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/test_synapse_scenario.py +++ b/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/test_synapse_scenario.py @@ -53,6 +53,17 @@ def test_workspaces(self, resource_group): time.sleep(120) self.cmd('az synapse workspace show --name {workspace} --resource-group {rg}', expect_failure=True) + @ResourceGroupPreparer(name_prefix='synapse-cli', random_name_length=16) + def test_managed_virtual_network_workspace(self): + # test workspace with managed virtual network + self._create_workspace("--enable-managed-virtual-network") + self.cmd('az synapse workspace show --name {workspace} --resource-group {rg}', checks=[ + self.check('name', self.kwargs['workspace']), + self.check('type', 'Microsoft.Synapse/workspaces'), + self.check('provisioningState', 'Succeeded'), + self.check('managedVirtualNetwork', 'default') + ]) + @record_only() def test_spark_pool(self): self.kwargs.update({ @@ -158,7 +169,8 @@ def test_sql_pool(self): ]) # resume sql pool - self.cmd('az synapse sql pool resume --name {sql-pool} --workspace {workspace} --resource-group {rg}', checks=[]) + self.cmd('az synapse sql pool resume --name {sql-pool} --workspace {workspace} --resource-group {rg}', + checks=[]) self.cmd('az synapse sql pool show --name {sql-pool} --workspace {workspace} --resource-group {rg}', checks=[ self.check('name', self.kwargs['sql-pool']), @@ -173,6 +185,167 @@ def test_sql_pool(self): self.cmd('az synapse sql pool show --name {sql-pool} --workspace {workspace} --resource-group {rg}', expect_failure=True) + @record_only() + def test_sql_pool_restore_and_list_deleted(self): + self.kwargs.update({ + 'location': 'eastus', + 'workspace': 'testsynapseworkspace', + 'rg': 'rg', + 'sql-pool': 'sqlpoolcli1', + 'dest-sql-pool': self.create_random_name(prefix='destsqlpool', length=15), + 'restore-point-time': '2020-11-25T02:47:37' + }) + + # restore sql pool + self.cmd('az synapse sql pool restore --name {sql-pool} --workspace-name {workspace} --resource-group {rg} ' + '--dest-name {dest-sql-pool} --time {restore-point-time}', + checks=[ + self.check('name', self.kwargs['dest-sql-pool']) + ]) + + # get the new created sql pool + self.cmd('az synapse sql pool show --name {dest-sql-pool} --workspace-name {workspace} --resource-group {rg}', + checks=[ + self.check('name', self.kwargs['dest-sql-pool']), + self.check('type', 'Microsoft.Synapse/workspaces/sqlPools'), + self.check('provisioningState', 'Succeeded'), + self.check('status', 'Online') + ]) + + # delete dest sql pool with dest sql pool name + self.cmd( + 'az synapse sql pool delete --name {dest-sql-pool} --workspace-name {workspace} --resource-group {rg} --yes') + + # test list-deleted + self.cmd('az synapse sql pool list-deleted --workspace-name {workspace} --resource-group {rg}', + checks=[ + self.greater_than("length([])", 0) + ]) + + @record_only() + def test_sql_pool_classification_and_recommendation(self): + self.kwargs.update({ + 'location': 'eastus', + 'workspace': 'testsynapseworkspace', + 'rg': 'rg', + 'sql-pool': 'sqlpoolcli1', + 'schema': 'dbo', + 'table': 'Person', + 'column': 'phone', + 'label': 'Confidential', + 'information-type': '"Contact Info"' + }) + + # classification create + self.cmd('az synapse sql pool classification create --name {sql-pool} --workspace-name {workspace} ' + '--resource-group {rg} --schema {schema} --table {table} --column {column} ' + '--label {label} --information-type {information-type}', + checks=[ + self.check('labelName', self.kwargs['label']) + ]) + + # classification show + self.cmd('az synapse sql pool classification show --name {sql-pool} --workspace-name {workspace} ' + '--resource-group {rg} --schema {schema} --table {table} --column {column}', + checks=[ + self.check('labelName', self.kwargs['label']) + ]) + + # classification list + self.cmd('az synapse sql pool classification list --name {sql-pool} --workspace-name {workspace} ' + '--resource-group {rg}', + checks=[ + self.check('[0].labelName', self.kwargs['label']) + ]) + + # classification update + self.cmd('az synapse sql pool classification show --name {sql-pool} --workspace-name {workspace} ' + '--resource-group {rg} --schema {schema} --table {table} --column {column}') + + # classification delete + self.cmd('az synapse sql pool classification delete --name {sql-pool} --workspace-name {workspace} ' + '--resource-group {rg} --schema {schema} --table {table} --column {column}') + + # recommendation enable + self.cmd('az synapse sql pool classification recommendation enable --name {sql-pool} ' + '--workspace-name {workspace} --resource-group {rg} ' + '--schema {schema} --table {table} --column {column}') + + # recommendation list + self.cmd('az synapse sql pool classification recommendation list --name {sql-pool} ' + '--workspace-name {workspace} --resource-group {rg}', + checks=[ + self.greater_than("length([])", 0) + ]) + + self.cmd('az synapse sql pool classification recommendation disable --name {sql-pool} ' + '--workspace-name {workspace} --resource-group {rg} ' + '--schema {schema} --table {table} --column {column}') + + # After disable the length of list should be equal with 0 + self.cmd('az synapse sql pool classification recommendation list --name {sql-pool} ' + '--workspace-name {workspace} --resource-group {rg}', + checks=[ + self.check("length([])", 0) + ]) + + @record_only() + def test_sql_pool_tde(self): + self.kwargs.update({ + 'location': 'northeurope', + 'workspace': 'testtde1', + 'rg': 'rg', + 'sql-pool': 'sqlpooltde', # self.create_random_name(prefix='testsqlpool', length=15), + }) + + self.cmd( + 'az synapse sql pool tde set --status Enabled ' + '--name {sql-pool} --workspace-name {workspace} --resource-group {rg}') + + self.cmd('az synapse sql pool tde show --name {sql-pool} --workspace-name {workspace} --resource-group {rg}', + checks=[ + self.check('name', "current"), + self.check('status', "Enabled") + ]) + + @record_only() + def test_sql_pool_threat_policy(self): + self.kwargs.update({ + 'location': 'eastus', + 'workspace': 'testsynapseworkspace', + 'rg': 'rg', + 'sql-pool': 'sqlpoolcli1', # self.create_random_name(prefix='testsqlpool', length=15), + 'storage-account': 'zzystorageforsynapse' + }) + + self.cmd('az synapse sql pool threat-policy update --state Enabled --storage-account {storage-account} ' + '--name {sql-pool} --workspace-name {workspace} --resource-group {rg}') + + self.cmd('az synapse sql pool threat-policy show ' + '--name {sql-pool} --workspace-name {workspace} --resource-group {rg}', + checks=[ + self.check('state', 'Enabled') + ]) + + @record_only() + def test_sql_pool_audit_policy(self): + self.kwargs.update({ + 'location': 'eastus', + 'workspace': 'testsynapseworkspace', + 'rg': 'rg', + 'sql-pool': 'sqlpoolcli1', # self.create_random_name(prefix='testsqlpool', length=15), + 'storage-account': 'zzystorageforsynapse' + }) + + self.cmd('az synapse sql pool audit-policy update --state Enabled --storage-account {storage-account} ' + '--name {sql-pool} --workspace-name {workspace} --resource-group {rg}') + + self.cmd('az synapse sql pool audit-policy show ' + '--name {sql-pool} --workspace-name {workspace} --resource-group {rg}', + checks=[ + self.check('state', 'Enabled') + ]) + @record_only() @ResourceGroupPreparer(name_prefix='synapse-cli', random_name_length=16) def test_ip_firewall_rules(self, resource_group): @@ -434,9 +607,10 @@ def test_access_control(self): 'az synapse role assignment show --workspace-name {workspace} --id {roleAssignmentId} ', expect_failure=True) - def _create_workspace(self): + def _create_workspace(self, *additional_create_params): self.kwargs.update({ 'workspace': self.create_random_name(prefix='clitest', length=16), + 'location': self.location, 'file-system': 'testfilesystem', 'login-user': 'cliuser1', 'login-password': self.create_random_name(prefix='Pswd1', length=16) @@ -455,7 +629,7 @@ def _create_workspace(self): 'az synapse workspace create --name {workspace} --resource-group {rg} --storage-account {storage-account} ' '--file-system {file-system} --sql-admin-login-user {login-user} ' '--sql-admin-login-password {login-password}' - ' --location {location}', checks=[ + ' --location {location} ' + ' '.join(additional_create_params), checks=[ self.check('name', self.kwargs['workspace']), self.check('type', 'Microsoft.Synapse/workspaces'), self.check('provisioningState', 'Succeeded') @@ -463,7 +637,7 @@ def _create_workspace(self): def _create_storage_account(self): self.kwargs.update({ - 'location': 'eastus', + 'location': self.location, 'storage-account': self.create_random_name(prefix='adlsgen2', length=16) }) @@ -472,9 +646,10 @@ def _create_storage_account(self): import time time.sleep(60) - # create synapse workspace + # create storage account self.cmd( - 'az storage account create --name {storage-account} --resource-group {rg} --enable-hierarchical-namespace true --location {location}', checks=[ + 'az storage account create --name {storage-account} --resource-group {rg} --enable-hierarchical-namespace true --location {location}', + checks=[ self.check('name', self.kwargs['storage-account']), self.check('type', 'Microsoft.Storage/storageAccounts'), self.check('provisioningState', 'Succeeded') @@ -544,8 +719,9 @@ def test_dataset(self): import time time.sleep(20) - self.kwargs['file'] = ('{\\"properties\\":{\\"linkedServiceName\\":{\\"referenceName\\":\\"' + self.kwargs['workspace'] + '-WorkspaceDefaultStorage\\",' - '\\"type\\":\\"LinkedServiceReference\\"},\\"type\\":\\"Orc\\",\\"typeProperties\\":{\\"location\\":{\\"type\\":\\"AzureBlobFSLocation\\"}}}}') + self.kwargs['file'] = ('{\\"properties\\":{\\"linkedServiceName\\":{\\"referenceName\\":\\"' + self.kwargs[ + 'workspace'] + '-WorkspaceDefaultStorage\\",' + '\\"type\\":\\"LinkedServiceReference\\"},\\"type\\":\\"Orc\\",\\"typeProperties\\":{\\"location\\":{\\"type\\":\\"AzureBlobFSLocation\\"}}}}') # create dataset self.cmd( diff --git a/src/azure-cli/requirements.py3.Darwin.txt b/src/azure-cli/requirements.py3.Darwin.txt index 7de3e4adecc..f4f8b428b87 100644 --- a/src/azure-cli/requirements.py3.Darwin.txt +++ b/src/azure-cli/requirements.py3.Darwin.txt @@ -79,7 +79,7 @@ azure-mgmt-sqlvirtualmachine==0.5.0 azure-mgmt-storage==16.0.0 azure-mgmt-trafficmanager==0.51.0 azure-mgmt-web==0.48.0 -azure-mgmt-synapse==0.3.0 +azure-mgmt-synapse==0.5.0 azure-multiapi-storage==0.5.2 azure-nspkg==3.0.2 azure-loganalytics==0.1.0 diff --git a/src/azure-cli/requirements.py3.Linux.txt b/src/azure-cli/requirements.py3.Linux.txt index 7de3e4adecc..f4f8b428b87 100644 --- a/src/azure-cli/requirements.py3.Linux.txt +++ b/src/azure-cli/requirements.py3.Linux.txt @@ -79,7 +79,7 @@ azure-mgmt-sqlvirtualmachine==0.5.0 azure-mgmt-storage==16.0.0 azure-mgmt-trafficmanager==0.51.0 azure-mgmt-web==0.48.0 -azure-mgmt-synapse==0.3.0 +azure-mgmt-synapse==0.5.0 azure-multiapi-storage==0.5.2 azure-nspkg==3.0.2 azure-loganalytics==0.1.0 diff --git a/src/azure-cli/requirements.py3.windows.txt b/src/azure-cli/requirements.py3.windows.txt index adcbe136a9f..d441b66907f 100644 --- a/src/azure-cli/requirements.py3.windows.txt +++ b/src/azure-cli/requirements.py3.windows.txt @@ -79,7 +79,7 @@ azure-mgmt-sqlvirtualmachine==0.5.0 azure-mgmt-storage==16.0.0 azure-mgmt-trafficmanager==0.51.0 azure-mgmt-web==0.48.0 -azure-mgmt-synapse==0.3.0 +azure-mgmt-synapse==0.5.0 azure-multiapi-storage==0.5.2 azure-nspkg==3.0.2 azure-loganalytics==0.1.0 diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 22074f4048b..c9c17c2b95e 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -123,7 +123,7 @@ 'azure-mgmt-storage~=16.0.0', 'azure-mgmt-trafficmanager~=0.51.0', 'azure-mgmt-web~=0.48.0', - 'azure-mgmt-synapse~=0.3.0', + 'azure-mgmt-synapse~=0.5.0', 'azure-multiapi-storage~=0.5.2', 'azure-loganalytics~=0.1.0', 'azure-storage-common~=1.4',