diff --git a/src/command_modules/azure-cli-sql/HISTORY.rst b/src/command_modules/azure-cli-sql/HISTORY.rst index 0f28b7389eb..b2c9812a3b8 100644 --- a/src/command_modules/azure-cli-sql/HISTORY.rst +++ b/src/command_modules/azure-cli-sql/HISTORY.rst @@ -3,6 +3,23 @@ Release History =============== +2.0.27 +++++++ +* Added new Managed instance and Managed database CRUD commands. + * Managed instance commands: + * az sql mi create + * az sql mi show + * az sql mi list + * az sql mi update + * az sql mi delete + + * Managed database commands: + * az sql midb create + * az sql midb show + * az sql midb list + * az sql midb restore + * az sql midb delete + 2.0.26 ++++++ * BREAKING CHANGES: Updated database, data warehouse, and elastic pool commands to use Azure-standard SKU properties for configuring performance level. This has resulted in some changes to the respose objects returned from db, dw, and elastic-pool commands. diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_help.py b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_help.py index f1cef20514c..3ef6bf13cf9 100644 --- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_help.py +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_help.py @@ -426,3 +426,85 @@ - name: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the SQL server. text: az sql server vnet-rule create --subnet subnetName --vnet-name vnetName """ +helps['sql mi'] = """ + type: group + short-summary: Manage SQL managed instances. + """ +helps['sql mi create'] = """ + type: command + short-summary: Create a managed instance. + examples: + - name: Create a managed instance with specified parameters and with identity + text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --license-type LicenseIncluded --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --capacity 8 --storage 32GB --edition GeneralPurpose --family Gen4 + - name: Create a managed instance with minimal set of parameters + text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} + """ +helps['sql mi list'] = """ + type: command + short-summary: List available managed instances. + examples: + - name: List all managed instances in the current subscription. + text: az sql mi list + - name: List all managed instances in a resource group. + text: az sql mi list -g mygroup + """ +helps['sql mi show'] = """ + type: command + short-summary: Get the details for a managed instance. + examples: + - name: Get the details for a managed instance + text: az sql mi show -g mygroup -n myinstance + """ +helps['sql mi update'] = """ + type: command + short-summary: Update a managed instance. + examples: + - name: Updates a mi with specified parameters and with identity + text: az sql mi update -g mygroup -n myinstance -i -p mypassword --license-type mylicensetype --capacity vcorecapacity --storage storagesize + """ +helps['sql mi delete'] = """ + type: command + short-summary: Delete a managed instance. + examples: + - name: Delete a managed instance + text: az sql mi delete -g mygroup -n myinstance --yes + """ +helps['sql midb'] = """ + type: group + short-summary: Manage SQL managed instance databases. + """ +helps['sql midb create'] = """ + type: command + short-summary: Create a managed database. + examples: + - name: Create a managed database with specified collation + text: az sql midb create -g mygroup --mi myinstance -n mymanageddb --collation Latin1_General_100_CS_AS_SC + """ +helps['sql midb list'] = """ + type: command + short-summary: List maanged databases on a managed instance. + examples: + - name: List managed databases on a managed instance + text: az sql midb list -g mygroup --mi myinstance + """ +helps['sql midb show'] = """ + type: command + short-summary: Get the details for a managed database. + examples: + - name: Get the details for a managed database + text: az sql midb show -g mygroup --mi myinstance -n mymanageddb + """ +helps['sql midb restore'] = """ + type: command + short-summary: Restore a managed database. + examples: + - name: Restore a managed database using Point in time restore + text: az sql midb restore -g mygroup --mi myinstance -n mymanageddb --dest-name targetmidb --time "2018-05-20T05:34:22" + """ +helps['sql midb delete'] = """ + type: command + short-summary: Delete a managed database. + examples: + - name: Delete a managed database + text: az sql midb delete -g mygroup --mi myinstance -n mymanageddb --yes + """ diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_params.py b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_params.py index b8dedb6e532..39baefb0922 100644 --- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_params.py +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_params.py @@ -16,6 +16,8 @@ ElasticPoolPerDatabaseSettings, ImportExtensionRequest, ExportRequest, + ManagedDatabase, + ManagedInstance, Server, ServerAzureADAdministrator, Sku @@ -54,7 +56,9 @@ from ._validators import ( create_args_for_complex_type, - validate_elastic_pool_id + validate_elastic_pool_id, + validate_managed_instance_storage_size, + validate_subnet ) @@ -82,7 +86,7 @@ def __call__(self, value): try: uvals = (self.unit_map[unit_part] if unit_part else 1) / \ (self.unit_map[self.unit] if self.unit else 1) - return self.result_type(uvals) * self.result_type(numeric_part) + return self.result_type(uvals * self.result_type(numeric_part)) except KeyError: raise ValueError() @@ -140,6 +144,19 @@ def __repr__(self): help='Specifies whether to enable zone redundancy', arg_type=get_three_state_flag()) +managed_instance_param_type = CLIArgumentType( + options_list=['--managed-instance', '--mi'], + help='Name of the Azure SQL managed instance.') + +storage_param_type = CLIArgumentType( + options_list=['--storage'], + type=SizeWithUnitConverter('GB', result_type=int, unit_map=dict(B=1.0 / (1024 * 1024 * 1024), + kB=1.0 / (1024 * 1024), + MB=1.0 / 1024, + GB=1, + TB=1024)), + help='The storage size. If no unit is specified, defaults to gigabytes (GB).', + validator=validate_managed_instance_storage_size) db_service_objective_examples = 'Basic, S0, P1, GP_Gen4_1, BC_Gen5_2.' dw_service_objective_examples = 'DW100, DW1000c' @@ -1005,3 +1022,161 @@ def _configure_security_policy_storage_params(arg_ctx): c.extra('vnet_name', options_list=['--vnet-name'], help='The virtual network name') + + ############################################### + # sql managed instance # + ############################################### + with self.argument_context('sql mi') as c: + c.argument('managed_instance_name', + help='The managed instance name', + options_list=['--name', '-n'], + # Allow --ids command line argument. id_part=name is 1st name in uri + id_part='name') + + c.argument('tier', + arg_type=tier_param_type, + help='The edition component of the sku. Allowed value is GeneralPurpose.') + + c.argument('family', + arg_type=family_param_type, + help='The compute generation component of the sku. ' + 'Allowed values include: Gen4, Gen5.') + + c.argument('storage_size_in_gb', + options_list=['--storage'], + arg_type=storage_param_type, + help='The storage size of the managed instance. ' + 'Storage size must be specified in increments of 32 GB') + + c.argument('license_type', + arg_type=get_enum_type(DatabaseLicenseType), + help='The license type to apply for this managed instance.') + + c.argument('vcores', + options_list=['--capacity', '-c'], + help='The capacity of the managed instance in vcores.') + + with self.argument_context('sql mi create') as c: + # Create args that will be used to build up the ManagedInstance object + create_args_for_complex_type( + c, 'parameters', ManagedInstance, [ + 'administrator_login', + 'administrator_login_password', + 'license_type', + 'virtual_network_subnet_id', + 'vcores', + 'storage_size_in_gb' + ]) + + # Create args that will be used to build up the Managed Instance's Sku object + create_args_for_complex_type( + c, 'sku', Sku, [ + 'family', + 'name', + 'tier', + ]) + + c.ignore('name') # Hide sku name + + c.argument('administrator_login', + options_list=['--admin-user', '-u'], + required=True) + + c.argument('administrator_login_password', + options_list=['--admin-password', '-p'], + required=True) + + c.extra('vnet_name', + options_list=['--vnet-name'], + help='The virtual network name', + validator=validate_subnet) + + c.argument('virtual_network_subnet_id', + options_list=['--subnet'], + required=True, + help='Name or ID of the subnet that allows access to an Azure Sql Managed Instance. ' + 'If subnet name is provided, --vnet-name must be provided.') + + c.argument('assign_identity', + options_list=['--assign-identity', '-i'], + help='Generate and assign an Azure Active Directory Identity for this managed instance ' + 'for use with key management services like Azure KeyVault.') + + with self.argument_context('sql mi update') as c: + # Create args that will be used to build up the ManagedInstance object + create_args_for_complex_type( + c, 'parameters', ManagedInstance, [ + 'administrator_login_password', + ]) + + c.argument('administrator_login_password', + options_list=['--admin-password', '-p']) + + c.argument('assign_identity', + options_list=['--assign-identity', '-i'], + help='Generate and assign an Azure Active Directory Identity for this managed instance ' + 'for use with key management services like Azure KeyVault. ' + 'If identity is already assigned - do nothing.') + + ############################################### + # sql managed db # + ############################################### + with self.argument_context('sql midb') as c: + c.argument('managed_instance_name', + arg_type=managed_instance_param_type, + # Allow --ids command line argument. id_part=name is 1st name in uri + id_part='name') + + c.argument('database_name', + options_list=['--name', '-n'], + help='The name of the Azure SQL Managed Database.', + # Allow --ids command line argument. id_part=child_name_1 is 2nd name in uri + id_part='child_name_1') + + with self.argument_context('sql midb create') as c: + create_args_for_complex_type( + c, 'parameters', ManagedDatabase, [ + 'collation', + ]) + + c.argument('collation', + required=False, + help='The collation of the Azure SQL Managed Database collation to use, ' + 'e.g.: SQL_Latin1_General_CP1_CI_AS or Latin1_General_100_CS_AS_SC') + + with self.argument_context('sql midb restore') as c: + create_args_for_complex_type( + c, 'parameters', ManagedDatabase, [ + 'target_managed_database_name', + 'target_managed_instance_name', + 'restore_point_in_time' + ]) + + c.argument('target_managed_database_name', + options_list=['--dest-name'], + required=True, + help='Name of the managed database that will be created as the restore destination.') + + c.argument('target_managed_instance_name', + options_list=['--dest-mi'], + help='Name of the managed instance to restore managed database to. ' + 'This can be same managed instance, or another managed instance on same subscription. ' + 'When not specified it defaults to source managed instance.') + + c.argument('target_resource_group_name', + options_list=['--dest-resource-group'], + help='Name of the resource group of the managed instance to restore managed database to. ' + 'When not specified it defaults to source resource group.') + + restore_point_arg_group = 'Restore Point' + + c.argument('restore_point_in_time', + options_list=['--time', '-t'], + arg_group=restore_point_arg_group, + required=True, + 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. Time should be in following format: "YYYY-MM-DDTHH:MM:SS"') + + with self.argument_context('sql midb list') as c: + c.argument('managed_instance_name', id_part=None) diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_util.py b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_util.py index b9925c7ee90..3f85fd93b99 100644 --- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_util.py +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_util.py @@ -114,3 +114,11 @@ def get_sql_subscription_usages_operations(cli_ctx, _): def get_sql_virtual_network_rules_operations(cli_ctx, _): return get_sql_management_client(cli_ctx).virtual_network_rules + + +def get_sql_managed_instances_operations(cli_ctx, _): + return get_sql_management_client(cli_ctx).managed_instances + + +def get_sql_managed_databases_operations(cli_ctx, _): + return get_sql_management_client(cli_ctx).managed_databases diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_validators.py b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_validators.py index 2c1d937b10a..49ba7deb380 100644 --- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_validators.py +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_validators.py @@ -123,3 +123,16 @@ def validate_subnet(cmd, namespace): else: raise CLIError('incorrect usage: [--subnet ID | --subnet NAME --vnet-name NAME]') delattr(namespace, 'vnet_name') + + +############################################### +# sql managed instance # +############################################### + + +def validate_managed_instance_storage_size(namespace): + # Validate if entered storage size value is an increment of 32 if provided + if (not namespace.storage_size_in_gb) or (namespace.storage_size_in_gb and namespace.storage_size_in_gb % 32 == 0): + pass + else: + raise CLIError('incorrect usage: --storage must be specified in increments of 32 GB') diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/commands.py b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/commands.py index cb90d1d85f0..d010adc17b0 100644 --- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/commands.py +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/commands.py @@ -33,6 +33,8 @@ get_sql_elastic_pool_operations_operations, get_sql_encryption_protectors_operations, get_sql_firewall_rules_operations, + get_sql_managed_databases_operations, + get_sql_managed_instances_operations, get_sql_replication_links_operations, get_sql_restorable_dropped_databases_operations, get_sql_server_connection_policies_operations, @@ -406,3 +408,39 @@ def load_command_table(self, _): c.command('create', 'create_or_update') c.command('delete', 'delete') c.custom_command('set', 'server_dns_alias_set') + + ############################################### + # sql managed instance # + ############################################### + + managed_instances_operations = CliCommandType( + operations_tmpl='azure.mgmt.sql.operations.managed_instances_operations#ManagedInstancesOperations.{}', + client_factory=get_sql_managed_instances_operations) + + with self.command_group('sql mi', + managed_instances_operations, + client_factory=get_sql_managed_instances_operations) as g: + + g.custom_command('create', 'managed_instance_create', supports_no_wait=True) + g.command('delete', 'delete', confirmation=True, supports_no_wait=True) + g.command('show', 'get') + g.custom_command('list', 'managed_instance_list') + g.generic_update_command('update', custom_func_name='managed_instance_update', supports_no_wait=True) + + ############################################### + # sql managed db # + ############################################### + + managed_databases_operations = CliCommandType( + operations_tmpl='azure.mgmt.sql.operations.managed_databases_operations#ManagedDatabasesOperations.{}', + client_factory=get_sql_managed_databases_operations) + + with self.command_group('sql midb', + managed_databases_operations, + client_factory=get_sql_managed_databases_operations) as g: + + g.custom_command('create', 'managed_db_create', supports_no_wait=True) + g.custom_command('restore', 'managed_db_restore', supports_no_wait=True) + g.command('show', 'get') + g.command('list', 'list_by_instance') + g.command('delete', 'delete', confirmation=True, supports_no_wait=True) diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/custom.py b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/custom.py index 73db98690d7..722a1777608 100644 --- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/custom.py +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/custom.py @@ -34,7 +34,8 @@ from ._util import ( get_sql_capabilities_operations, - get_sql_servers_operations + get_sql_servers_operations, + get_sql_managed_instances_operations ) @@ -58,6 +59,19 @@ def _get_server_location(cli_ctx, server_name, resource_group_name): resource_group_name=resource_group_name).location +# Determines managed instance location +def _get_managed_instance_location(cli_ctx, managed_instance_name, resource_group_name): + ''' + Returns the location (i.e. Azure region) that the specified managed instance is in. + ''' + + managed_instance_client = get_sql_managed_instances_operations(cli_ctx, None) + # pylint: disable=no-member + return managed_instance_client.get( + managed_instance_name=managed_instance_name, + resource_group_name=resource_group_name).location + + def _any_sku_values_specified(sku): ''' Returns True if the sku object has any properties that are specified @@ -117,6 +131,28 @@ def _find_edition_capability(sku, supported_editions): return _get_default_capability(supported_editions) +def _find_family_capability(sku, supported_families): + ''' + Finds the family capability in the collection of supported families + that matches the requested sku. + + If the edition has no family specified, returns the default family. + ''' + + if sku.family: + # Find requested edition capability + try: + return next(e for e in supported_families if e.name == sku.family) + except StopIteration: + candidate_families = [e.name for e in supported_families] + raise CLIError('Could not find family ''{}''. Supported families are: {}'.format( + sku.family, candidate_families + )) + else: + # Find default family capability + return _get_default_capability(supported_families) + + def _find_performance_level_capability(sku, supported_service_level_objectives, allow_reset_family): ''' Finds the DB or elastic pool performance level (i.e. service objective) in the @@ -261,6 +297,22 @@ def _get_server_dns_suffx(cli_ctx): return getenv('_AZURE_CLI_SQL_DNS_SUFFIX', default=cli_ctx.cloud.suffixes.sql_server_hostname) +def _get_managed_db_resource_id(cli_ctx, resource_group_name, managed_instance_name, database_name): + ''' + Gets the Managed db resource id in this Azure environment. + ''' + + # 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/managedInstances/{}/databases/{}'.format( + quote(get_subscription_id(cli_ctx)), + quote(resource_group_name), + quote(managed_instance_name), + quote(database_name)) + + def db_show_conn_str( cmd, client_provider, @@ -1815,3 +1867,184 @@ def encryption_protector_update( server_key_name=key_name ) ) + +############################################### +# sql managed instance # +############################################### + + +def _find_managed_instance_sku_from_capabilities(cli_ctx, location, sku): + ''' + Given a requested sku which may have some properties filled in + (e.g. tier and capacity), finds the canonical matching sku + from the given location's capabilities. + ''' + + logger.debug('_find_managed_instance_sku_from_capabilities input: %s', sku) + + if sku.name: + # User specified sku.name, so nothing else needs to be resolved. + logger.debug('_find_managed_instance_sku_from_capabilities return sku as is') + return sku + + if not _any_sku_values_specified(sku): + # User did not request any properties of sku, so just wipe it out. + # Server side will pick a default. + logger.debug('_find_managed_instance_sku_from_capabilities return None') + return None + + # Some properties of sku are specified, but not name. Use the requested properties + # to find a matching capability and copy the sku from there. + + # Get default server version capability + capabilities_client = get_sql_capabilities_operations(cli_ctx, None) + capabilities = capabilities_client.list_by_location(location, CapabilityGroup.supported_managed_instance_versions) + managed_instance_version_capability = _get_default_capability(capabilities.supported_managed_instance_versions) + + # Find edition capability, based on requested sku properties + edition_capability = _find_edition_capability(sku, managed_instance_version_capability.supported_editions) + + # Find family level capability, based on requested sku properties + family_capability = _find_family_capability(sku, edition_capability.supported_families) + + result = Sku(name=family_capability.sku) + logger.debug('_find_managed_instance_sku_from_capabilities return: %s', result) + return result + + +def managed_instance_create( + cmd, + client, + managed_instance_name, + resource_group_name, + location, + virtual_network_subnet_id, + assign_identity=False, + sku=None, + **kwargs): + ''' + Creates a managed instance. + ''' + + if assign_identity: + kwargs['identity'] = ResourceIdentity(type=IdentityType.system_assigned.value) + + kwargs['location'] = location + kwargs['sku'] = _find_managed_instance_sku_from_capabilities(cmd.cli_ctx, kwargs['location'], sku) + kwargs['subnet_id'] = virtual_network_subnet_id + + # Create + return client.create_or_update( + managed_instance_name=managed_instance_name, + resource_group_name=resource_group_name, + parameters=kwargs) + + +def managed_instance_list( + client, + resource_group_name=None): + ''' + Lists managed instances in a resource group or subscription + ''' + + if resource_group_name: + # List all managed instances in the resource group + return client.list_by_resource_group(resource_group_name=resource_group_name) + + # List all managed instances in the subscription + return client.list() + + +def managed_instance_update( + instance, + administrator_login_password=None, + license_type=None, + vcores=None, + storage_size_in_gb=None, + assign_identity=False): + ''' + Updates a managed instance. Custom update function to apply parameters to instance. + ''' + + # Once assigned, the identity cannot be removed + if instance.identity is None and assign_identity: + instance.identity = ResourceIdentity(type=IdentityType.system_assigned.value) + + # Apply params to instance + instance.administrator_login_password = ( + administrator_login_password or instance.administrator_login_password) + instance.license_type = ( + license_type or instance.license_type) + instance.v_cores = ( + vcores or instance.v_cores) + instance.storage_size_in_gb = ( + storage_size_in_gb or instance.storage_size_in_gb) + + return instance + +############################################### +# sql managed db # +############################################### + + +def managed_db_create( + cmd, + client, + database_name, + managed_instance_name, + resource_group_name, + **kwargs): + + # Determine managed instance location + kwargs['location'] = _get_managed_instance_location( + cmd.cli_ctx, + managed_instance_name=managed_instance_name, + resource_group_name=resource_group_name) + + # Create + return client.create_or_update( + database_name=database_name, + managed_instance_name=managed_instance_name, + resource_group_name=resource_group_name, + parameters=kwargs) + + +def managed_db_restore( + cmd, + client, + database_name, + managed_instance_name, + resource_group_name, + target_managed_database_name, + target_managed_instance_name=None, + target_resource_group_name=None, + **kwargs): + ''' + Restores an existing managed DB (i.e. create with 'PointInTimeRestore' create mode.) + + Custom function makes create mode more convenient. + ''' + + if not target_managed_instance_name: + target_managed_instance_name = managed_instance_name + + if not target_resource_group_name: + target_resource_group_name = resource_group_name + + kwargs['location'] = _get_managed_instance_location( + cmd.cli_ctx, + managed_instance_name=managed_instance_name, + resource_group_name=resource_group_name) + + kwargs['create_mode'] = CreateMode.point_in_time_restore.value + kwargs['source_database_id'] = _get_managed_db_resource_id( + cmd.cli_ctx, + resource_group_name, + managed_instance_name, + database_name) + + return client.create_or_update( + database_name=target_managed_database_name, + managed_instance_name=target_managed_instance_name, + resource_group_name=target_resource_group_name, + parameters=kwargs) diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_managed_db_mgmt.yaml b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_managed_db_mgmt.yaml new file mode 100644 index 00000000000..b390b5ca5f3 --- /dev/null +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_managed_db_mgmt.yaml @@ -0,0 +1,1578 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/capabilities?include=supportedManagedInstanceVersions&api-version=2017-10-01-preview + response: + body: {string: '{"name":"West Central US","supportedManagedInstanceVersions":[{"name":"12.0","supportedEditions":[{"name":"GeneralPurpose","supportedFamilies":[{"name":"Gen4","sku":"GP_Gen4","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":8,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Default"}],"status":"Default"},{"name":"Gen5","sku":"GP_Gen5","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":8,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Available"}],"status":"Available"}],"status":"Default"},{"name":"BusinessCritical","supportedFamilies":[{"name":"Gen4","sku":"BC_Gen4","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":1,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Default"}],"status":"Default"},{"name":"Gen5","sku":"BC_Gen5","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":4,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Available"}],"status":"Available"}],"status":"Available"}],"status":"Default"}],"status":"Available"}'} + headers: + cache-control: [no-cache] + content-length: ['2351'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:57:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"location": "westcentralus", "sku": {"name": "GP_Gen4"}, "properties": + {"administratorLogin": "admin123", "administratorLoginPassword": "SecretPassword123", + "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL", + "licenseType": "LicenseIncluded", "vCores": 8, "storageSizeInGB": 64}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + Content-Length: ['385'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"operation":"UpsertManagedServer","startTime":"2018-05-31T17:57:35.033Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/d4273be0-e0ec-416c-bc55-4f9aa5f122da?api-version=2015-05-01-preview'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:57:34 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceOperationResults/d4273be0-e0ec-416c-bc55-4f9aa5f122da?api-version=2015-05-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/d4273be0-e0ec-416c-bc55-4f9aa5f122da?api-version=2015-05-01-preview + response: + body: {string: '{"name":"d4273be0-e0ec-416c-bc55-4f9aa5f122da","status":"InProgress","startTime":"2018-05-31T17:57:35.033Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:58:35 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/d4273be0-e0ec-416c-bc55-4f9aa5f122da?api-version=2015-05-01-preview + response: + body: {string: '{"name":"d4273be0-e0ec-416c-bc55-4f9aa5f122da","status":"Succeeded","startTime":"2018-05-31T17:57:35.033Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:59:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['819'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:59:37 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['819'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:59:39 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"location": "westcentralus", "properties": {"collation": "Latin1_General_100_CS_AS_SC"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb create] + Connection: [keep-alive] + Content-Length: ['89'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01?api-version=2017-03-01-preview + response: + body: {string: '{"operation":"CreateManagedDatabase","startTime":"2018-05-31T17:59:41.44Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/05d72f7f-f418-4a21-a7de-a667e2fa0d5e?api-version=2017-03-01-preview'] + cache-control: [no-cache] + content-length: ['75'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:59:40 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseOperationResults/05d72f7f-f418-4a21-a7de-a667e2fa0d5e?api-version=2017-03-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/05d72f7f-f418-4a21-a7de-a667e2fa0d5e?api-version=2017-03-01-preview + response: + body: {string: '{"name":"05d72f7f-f418-4a21-a7de-a667e2fa0d5e","status":"Succeeded","startTime":"2018-05-31T17:59:41.44Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:59:57 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01?api-version=2017-03-01-preview + response: + body: {string: '{"properties":{"collation":"Latin1_General_100_CS_AS_SC","status":"Online","creationDate":"2018-05-31T17:59:41.627Z","defaultSecondaryLocation":"westus2"},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01","name":"cliautomationdb01","type":"Microsoft.Sql/managedInstances/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['473'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:59:58 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['819'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:04: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} +- request: + body: 'b''{"location": "westcentralus", "properties": {"restorePointInTime": "2018-05-31T18:04:58.522535Z", + "createMode": "PointInTimeRestore", "sourceDatabaseId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + Content-Length: ['364'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/restoredcliautomationdb01?api-version=2017-03-01-preview + response: + body: {string: '{"operation":"CreateManagedRestoreRequest","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview'] + cache-control: [no-cache] + content-length: ['82'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:05:01 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseOperationResults/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-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: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:05: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:05:33 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:05:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:06: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:06:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:06:37 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:06:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:07: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:07:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:07:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:07:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:08: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:08:28 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:08: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:08: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} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:09: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:09:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:09:47 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:10:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:10: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:10:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:10:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:11:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:11: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:11:38 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"InProgress","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:11:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/e4768614-3012-4727-996e-bda09bd2ae7a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"e4768614-3012-4727-996e-bda09bd2ae7a","status":"Succeeded","startTime":"2018-05-31T18:05:02.607Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:12: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: [sql midb restore] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/restoredcliautomationdb01?api-version=2017-03-01-preview + response: + body: {string: '{"properties":{"collation":"Latin1_General_100_CS_AS_SC","status":"Online","creationDate":"2018-05-31T18:05:02.893Z","defaultSecondaryLocation":"westus2"},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/restoredcliautomationdb01","name":"restoredcliautomationdb01","type":"Microsoft.Sql/managedInstances/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['489'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:12: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: [sql midb list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases?api-version=2017-03-01-preview + response: + body: {string: '{"value":[{"properties":{"collation":"Latin1_General_100_CS_AS_SC","status":"Online","creationDate":"2018-05-31T17:59:41.627Z","earliestRestorePoint":"2018-05-31T18:00:11.88Z","defaultSecondaryLocation":"westus2"},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01","name":"cliautomationdb01","type":"Microsoft.Sql/managedInstances/databases"},{"properties":{"collation":"Latin1_General_100_CS_AS_SC","status":"Online","creationDate":"2018-05-31T18:05:02.893Z","defaultSecondaryLocation":"westus2"},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/restoredcliautomationdb01","name":"restoredcliautomationdb01","type":"Microsoft.Sql/managedInstances/databases"}]}'} + headers: + cache-control: [no-cache] + content-length: ['1024'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:12: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: [sql midb show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01?api-version=2017-03-01-preview + response: + body: {string: '{"properties":{"collation":"Latin1_General_100_CS_AS_SC","status":"Online","creationDate":"2018-05-31T17:59:41.627Z","earliestRestorePoint":"2018-05-31T18:00:11.88Z","defaultSecondaryLocation":"westus2"},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01","name":"cliautomationdb01","type":"Microsoft.Sql/managedInstances/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['522'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:12: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: [sql midb show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/restoredcliautomationdb01?api-version=2017-03-01-preview + response: + body: {string: '{"properties":{"collation":"Latin1_General_100_CS_AS_SC","status":"Online","creationDate":"2018-05-31T18:05:02.893Z","defaultSecondaryLocation":"westus2"},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/restoredcliautomationdb01","name":"restoredcliautomationdb01","type":"Microsoft.Sql/managedInstances/databases"}'} + headers: + cache-control: [no-cache] + content-length: ['489'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:12:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01?api-version=2017-03-01-preview + response: + body: {string: '{"operation":"DropManagedDatabase","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:12:16 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseOperationResults/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-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: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:12:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:12:47 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:13:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:13: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: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:13:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:13: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: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:14: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: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:14:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:14:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"InProgress","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['108'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:14: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: [sql midb delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedDatabaseAzureAsyncOperation/46e92d52-ee49-4c4b-a03a-88388a26414a?api-version=2017-03-01-preview + response: + body: {string: '{"name":"46e92d52-ee49-4c4b-a03a-88388a26414a","status":"Succeeded","startTime":"2018-05-31T18:12:16.513Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:15: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: [sql midb show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01?api-version=2017-03-01-preview + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Sql/managedInstances/clitestmi000001/databases/cliautomationdb01'' + under resource group ''cl_one'' was not found."}}'} + headers: + cache-control: [no-cache] + content-length: ['232'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:15:10 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"operation":"DropManagedServer","startTime":"2018-05-31T18:15:12.373Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/ef298791-5c96-4c70-8177-707089616eb8?api-version=2015-05-01-preview'] + cache-control: [no-cache] + content-length: ['72'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:15:11 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceOperationResults/ef298791-5c96-4c70-8177-707089616eb8?api-version=2015-05-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/ef298791-5c96-4c70-8177-707089616eb8?api-version=2015-05-01-preview + response: + body: {string: '{"name":"ef298791-5c96-4c70-8177-707089616eb8","status":"Succeeded","startTime":"2018-05-31T18:15:12.373Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 18:15:27 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/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_managed_instance_mgmt.yaml b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_managed_instance_mgmt.yaml new file mode 100644 index 00000000000..48e686820b4 --- /dev/null +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/recordings/test_sql_managed_instance_mgmt.yaml @@ -0,0 +1,815 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/capabilities?include=supportedManagedInstanceVersions&api-version=2017-10-01-preview + response: + body: {string: '{"name":"West Central US","supportedManagedInstanceVersions":[{"name":"12.0","supportedEditions":[{"name":"GeneralPurpose","supportedFamilies":[{"name":"Gen4","sku":"GP_Gen4","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":8,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Default"}],"status":"Default"},{"name":"Gen5","sku":"GP_Gen5","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":8,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Available"}],"status":"Available"}],"status":"Default"},{"name":"BusinessCritical","supportedFamilies":[{"name":"Gen4","sku":"BC_Gen4","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":1,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Default"}],"status":"Default"},{"name":"Gen5","sku":"BC_Gen5","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":4,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Available"}],"status":"Available"}],"status":"Available"}],"status":"Default"}],"status":"Available"}'} + headers: + cache-control: [no-cache] + content-length: ['2351'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:10:03 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": "westcentralus", "sku": {"name": "GP_Gen4"}, "properties": + {"administratorLogin": "admin123", "administratorLoginPassword": "SecretPassword123", + "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL", + "licenseType": "LicenseIncluded", "vCores": 8, "storageSizeInGB": 64}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + Content-Length: ['385'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"operation":"UpsertManagedServer","startTime":"2018-05-31T17:10:06.77Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/0d3635fa-864e-4c07-9619-8b1156246b26?api-version=2015-05-01-preview'] + cache-control: [no-cache] + content-length: ['73'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:10:05 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceOperationResults/0d3635fa-864e-4c07-9619-8b1156246b26?api-version=2015-05-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/0d3635fa-864e-4c07-9619-8b1156246b26?api-version=2015-05-01-preview + response: + body: {string: '{"name":"0d3635fa-864e-4c07-9619-8b1156246b26","status":"InProgress","startTime":"2018-05-31T17:10:06.77Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:11:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/0d3635fa-864e-4c07-9619-8b1156246b26?api-version=2015-05-01-preview + response: + body: {string: '{"name":"0d3635fa-864e-4c07-9619-8b1156246b26","status":"Succeeded","startTime":"2018-05-31T17:10:06.77Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:12: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: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['819'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:12:09 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['819'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:12: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: [sql mi show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['819'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:12: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: [sql mi update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['819'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:12: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: '{"location": "westcentralus", "identity": {"type": "SystemAssigned"}, "sku": + {"name": "GP_Gen4", "tier": "GeneralPurpose", "family": "Gen4", "capacity": + 8}, "properties": {"administratorLogin": "admin123", "administratorLoginPassword": + "SecretPassword456", "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL", + "licenseType": "LicenseIncluded", "vCores": 8, "storageSizeInGB": 64}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi update] + Connection: [keep-alive] + Content-Length: ['484'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"operation":"UpsertManagedServer","startTime":"2018-05-31T17:12:17.43Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/e7bf9b6b-acd0-4c41-aba4-121dc57752bf?api-version=2015-05-01-preview'] + cache-control: [no-cache] + content-length: ['73'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:12:17 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceOperationResults/e7bf9b6b-acd0-4c41-aba4-121dc57752bf?api-version=2015-05-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/e7bf9b6b-acd0-4c41-aba4-121dc57752bf?api-version=2015-05-01-preview + response: + body: {string: '{"name":"e7bf9b6b-acd0-4c41-aba4-121dc57752bf","status":"Succeeded","startTime":"2018-05-31T17:12:17.43Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:13:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"identity":{"principalId":"26baa134-f265-4195-970a-2e6c3a1f6d13","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['959'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:13: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: [sql mi update] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"identity":{"principalId":"26baa134-f265-4195-970a-2e6c3a1f6d13","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['959'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:13: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: '{"location": "westcentralus", "identity": {"type": "SystemAssigned"}, "sku": + {"name": "GP_Gen4", "tier": "GeneralPurpose", "family": "Gen4", "capacity": + 8}, "properties": {"administratorLogin": "admin123", "administratorLoginPassword": + "SecretPassword123", "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL", + "licenseType": "LicenseIncluded", "vCores": 8, "storageSizeInGB": 64}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi update] + Connection: [keep-alive] + Content-Length: ['484'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"operation":"UpsertManagedServer","startTime":"2018-05-31T17:13:23.093Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/37f47bf3-87bc-46d4-a7ac-8bf9a27a5f34?api-version=2015-05-01-preview'] + cache-control: [no-cache] + content-length: ['74'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:13:22 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceOperationResults/37f47bf3-87bc-46d4-a7ac-8bf9a27a5f34?api-version=2015-05-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/37f47bf3-87bc-46d4-a7ac-8bf9a27a5f34?api-version=2015-05-01-preview + response: + body: {string: '{"name":"37f47bf3-87bc-46d4-a7ac-8bf9a27a5f34","status":"Succeeded","startTime":"2018-05-31T17:13:23.093Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:14: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: [sql mi update] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"identity":{"principalId":"26baa134-f265-4195-970a-2e6c3a1f6d13","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['959'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:14:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/capabilities?include=supportedManagedInstanceVersions&api-version=2017-10-01-preview + response: + body: {string: '{"name":"West Central US","supportedManagedInstanceVersions":[{"name":"12.0","supportedEditions":[{"name":"GeneralPurpose","supportedFamilies":[{"name":"Gen4","sku":"GP_Gen4","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":8,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Default"}],"status":"Default"},{"name":"Gen5","sku":"GP_Gen5","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":8,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Available"}],"status":"Available"}],"status":"Default"},{"name":"BusinessCritical","supportedFamilies":[{"name":"Gen4","sku":"BC_Gen4","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":1,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Default"}],"status":"Default"},{"name":"Gen5","sku":"BC_Gen5","supportedLicenseTypes":[{"name":"LicenseIncluded","status":"Default"},{"name":"BasePrice","status":"Available"}],"supportedVcoresValues":[{"value":8,"status":"Available"},{"value":16,"status":"Default"},{"value":24,"status":"Available"}],"includedMaxSize":{"limit":32,"unit":"Gigabytes"},"supportedStorageSizes":[{"minValue":{"limit":32,"unit":"Gigabytes"},"maxValue":{"limit":4,"unit":"Terabytes"},"scaleSize":{"limit":32,"unit":"Gigabytes"},"status":"Available"}],"status":"Available"}],"status":"Available"}],"status":"Default"}],"status":"Available"}'} + headers: + cache-control: [no-cache] + content-length: ['2351'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:14:26 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": "westcentralus", "identity": {"type": "SystemAssigned"}, "sku": + {"name": "GP_Gen4"}, "properties": {"administratorLogin": "admin123", "administratorLoginPassword": + "SecretPassword123", "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL", + "licenseType": "LicenseIncluded", "vCores": 8, "storageSizeInGB": 64}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + Content-Length: ['425'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000002?api-version=2015-05-01-preview + response: + body: {string: '{"operation":"UpsertManagedServer","startTime":"2018-05-31T17:14:32.36Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/b2c341bd-e8b8-4425-8a7f-e3ba2bfd98c5?api-version=2015-05-01-preview'] + cache-control: [no-cache] + content-length: ['73'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:14:31 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceOperationResults/b2c341bd-e8b8-4425-8a7f-e3ba2bfd98c5?api-version=2015-05-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/b2c341bd-e8b8-4425-8a7f-e3ba2bfd98c5?api-version=2015-05-01-preview + response: + body: {string: '{"name":"b2c341bd-e8b8-4425-8a7f-e3ba2bfd98c5","status":"InProgress","startTime":"2018-05-31T17:14:32.36Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:15:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/b2c341bd-e8b8-4425-8a7f-e3ba2bfd98c5?api-version=2015-05-01-preview + response: + body: {string: '{"name":"b2c341bd-e8b8-4425-8a7f-e3ba2bfd98c5","status":"Succeeded","startTime":"2018-05-31T17:14:32.36Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:16:33 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi create] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000002?api-version=2015-05-01-preview + response: + body: {string: '{"identity":{"principalId":"1685dd9e-9c8d-4885-bf0a-56e514ad4020","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000002.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000002","name":"clitestmi000002","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['959'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:16:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000002?api-version=2015-05-01-preview + response: + body: {string: '{"identity":{"principalId":"1685dd9e-9c8d-4885-bf0a-56e514ad4020","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000002.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000002","name":"clitestmi000002","type":"Microsoft.Sql/managedInstances"}'} + headers: + cache-control: [no-cache] + content-length: ['959'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:16:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi list] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/managedInstances?api-version=2015-05-01-preview + response: + body: {string: '{"value":[{"identity":{"principalId":"6a061a52-1745-4c10-8964-b59632ba0850","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"sqlmi-chegar-hill.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudsa","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":8192},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Managed-Instances/providers/Microsoft.Sql/managedInstances/sqlmi-chegar-hill","name":"sqlmi-chegar-hill","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"1685dd9e-9c8d-4885-bf0a-56e514ad4020","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000002.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000002","name":"clitestmi000002","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"dd00f110-39ba-404d-9d9c-4b1ab588d897","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"BC_Gen4","tier":"BusinessCritical","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"sqlmi-msfeb18-sindjelic-bc-00.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudSA","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"BasePrice","vCores":8,"storageSizeInGB":512},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Sql/managedInstances/sqlmi-msfeb18-sindjelic-bc-00","name":"sqlmi-msfeb18-sindjelic-bc-00","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"cabe4357-67fa-4d9d-8037-3de1d3944832","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":16},"properties":{"fullyQualifiedDomainName":"savicportaltest.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudSA","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"LicenseIncluded","vCores":16,"storageSizeInGB":32},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_test/providers/Microsoft.Sql/managedInstances/savicportaltest","name":"savicportaltest","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"e7a55ca1-cb71-4ef3-899e-30ad364766a0","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":16},"properties":{"fullyQualifiedDomainName":"azureclitest1.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudSA","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"LicenseIncluded","vCores":16,"storageSizeInGB":96},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Sql/managedInstances/azureclitest1","name":"azureclitest1","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"60489f87-afb0-4b34-9041-1b792e306096","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":16},"properties":{"fullyQualifiedDomainName":"haimb-td-bugbash-do-not-delete-1.wcus1620a4a77b113.database.windows.net","administratorLogin":"cloudsa","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":16,"storageSizeInGB":32},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/haimb-td-bugbash-do-not-delete-1","name":"haimb-td-bugbash-do-not-delete-1","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"0392c250-1916-4161-9423-0ee68fab50eb","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":16},"properties":{"fullyQualifiedDomainName":"ms-march7-take2-gp-00.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudSA","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"LicenseIncluded","vCores":16,"storageSizeInGB":128},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Sql/managedInstances/ms-march7-take2-gp-00","name":"ms-march7-take2-gp-00","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"1643d336-be41-4a8d-8b63-23f8785e30fb","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":24},"properties":{"fullyQualifiedDomainName":"testmipublicpreview.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudSA","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"LicenseIncluded","vCores":24,"storageSizeInGB":1056},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/testmipublicpreview","name":"testmipublicpreview","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"26baa134-f265-4195-970a-2e6c3a1f6d13","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":8},"properties":{"fullyQualifiedDomainName":"clitestmi000001.wcus1620a4a77b113.database.windows.net","administratorLogin":"admin123","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL","state":"Ready","licenseType":"LicenseIncluded","vCores":8,"storageSizeInGB":64},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001","name":"clitestmi000001","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"91ab7cf7-d1b1-48b0-94a3-a7e43483b0b0","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":16},"properties":{"fullyQualifiedDomainName":"sqlmi-msfeb18-sindjelic-gp-00.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudSA","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"BasePrice","vCores":16,"storageSizeInGB":2528},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Sql/managedInstances/sqlmi-msfeb18-sindjelic-gp-00","name":"sqlmi-msfeb18-sindjelic-gp-00","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"530fda37-9c65-4083-907d-d741815a656a","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":16},"properties":{"fullyQualifiedDomainName":"ms-march7-portal-gp-01.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudSA","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"LicenseIncluded","vCores":16,"storageSizeInGB":96},"location":"westcentralus","tags":{"NickName":"March","Owner":"JovanPop"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Sql/managedInstances/ms-march7-portal-gp-01","name":"ms-march7-portal-gp-01","type":"Microsoft.Sql/managedInstances"},{"identity":{"principalId":"65caf984-87b7-46b4-8349-27a7280b85c6","type":"SystemAssigned","tenantId":"0c1edf5d-e5c5-4aca-ab69-ef194134f44b"},"sku":{"name":"GP_Gen4","tier":"GeneralPurpose","family":"Gen4","capacity":16},"properties":{"fullyQualifiedDomainName":"pinningtest2.wcus17662feb9ce98.database.windows.net","administratorLogin":"cloudSA","subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_pilot/providers/Microsoft.Network/virtualNetworks/cl_pilot/subnets/CLean","state":"Ready","licenseType":"LicenseIncluded","vCores":16,"storageSizeInGB":32},"location":"westcentralus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_test/providers/Microsoft.Sql/managedInstances/pinningtest2","name":"pinningtest2","type":"Microsoft.Sql/managedInstances"}]}'} + headers: + cache-control: [no-cache] + content-length: ['10351'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17: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: [sql mi delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"operation":"DropManagedServer","startTime":"2018-05-31T17:16:44.25Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/e71ad45a-cbc1-4a56-b60e-aa196d8bd616?api-version=2015-05-01-preview'] + cache-control: [no-cache] + content-length: ['71'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:16:44 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceOperationResults/e71ad45a-cbc1-4a56-b60e-aa196d8bd616?api-version=2015-05-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/e71ad45a-cbc1-4a56-b60e-aa196d8bd616?api-version=2015-05-01-preview + response: + body: {string: '{"name":"e71ad45a-cbc1-4a56-b60e-aa196d8bd616","status":"Succeeded","startTime":"2018-05-31T17:16:44.25Z"}'} + headers: + cache-control: [no-cache] + content-length: ['106'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:16: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} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000002?api-version=2015-05-01-preview + response: + body: {string: '{"operation":"DropManagedServer","startTime":"2018-05-31T17:17:01.733Z"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/fb77cd08-a42f-41a9-b5e0-9f7ec5c1bdec?api-version=2015-05-01-preview'] + cache-control: [no-cache] + content-length: ['72'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:17:01 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceOperationResults/fb77cd08-a42f-41a9-b5e0-9f7ec5c1bdec?api-version=2015-05-01-preview'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi delete] + Connection: [keep-alive] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Sql/locations/westcentralus/managedInstanceAzureAsyncOperation/fb77cd08-a42f-41a9-b5e0-9f7ec5c1bdec?api-version=2015-05-01-preview + response: + body: {string: '{"name":"fb77cd08-a42f-41a9-b5e0-9f7ec5c1bdec","status":"Succeeded","startTime":"2018-05-31T17:17:01.733Z"}'} + headers: + cache-control: [no-cache] + content-length: ['107'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:17: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: [sql mi show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000001?api-version=2015-05-01-preview + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Sql/managedInstances/clitestmi000001'' + under resource group ''cl_one'' was not found."}}'} + headers: + cache-control: [no-cache] + content-length: ['204'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:17:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-failure-cause: [gateway] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [sql mi show] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.3 (Windows-2012ServerR2-6.3.9600-SP0) requests/2.18.4 + msrest/0.4.29 msrest_azure/0.4.31 azure-mgmt-sql/0.9.0 Azure-SDK-For-Python + AZURECLI/2.0.34] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Sql/managedInstances/clitestmi000002?api-version=2015-05-01-preview + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The requested resource + of type ''Microsoft.Sql/managedInstances'' with name ''clitestmi000002'' was + not found."}}'} + headers: + cache-control: [no-cache] + content-length: ['204'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 31 May 2018 17:17:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + status: {code: 404, message: Not Found} +version: 1 diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py index 4151cef871e..a4b3623664f 100644 --- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py @@ -4,6 +4,7 @@ # -------------------------------------------------------------------------------------------- import time +import os from azure_devtools.scenario_tests import AllowLargeResponse @@ -32,6 +33,8 @@ # Constants server_name_prefix = 'clitestserver' server_name_max_length = 63 +managed_instance_name_prefix = 'clitestmi' +managed_instance_name_max_length = 63 class SqlServerPreparer(AbstractPreparer, SingleValueReplacer): @@ -2505,3 +2508,221 @@ def test_sql_zone_resilient_pool(self, resource_group, resource_group_location, JMESPathCheck('name', pool_name_4), JMESPathCheck('dtu', 250), JMESPathCheck('zoneRedundant', True)]) + + +class SqlManagedInstanceMgmtScenarioTest(ScenarioTest): + def test_sql_managed_instance_mgmt(self): + managed_instance_name_1 = self.create_random_name(managed_instance_name_prefix, managed_instance_name_max_length) + managed_instance_name_2 = self.create_random_name(managed_instance_name_prefix, managed_instance_name_max_length) + admin_login = 'admin123' + admin_passwords = ['SecretPassword123', 'SecretPassword456'] + + is_playback = os.path.exists(self.recording_file) + if is_playback: + subnet = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CLean' + else: + subnet = '/subscriptions/ee5ea899-0791-418f-9270-77cd8273794b/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL' + + license_type = 'LicenseIncluded' + loc = 'westcentralus' + v_cores = 8 + storage_size_in_gb = '64' + edition = 'GeneralPurpose' + family = 'Gen4' + resource_group_1 = "cl_one" + + user = admin_login + + # test create sql managed_instance with minimal required parameters + managed_instance_1 = self.cmd('sql mi create -g {} -n {} -l {} ' + '-u {} -p {} --subnet {} --license-type {} --capacity {} --storage {} --edition {} --family {}' + .format(resource_group_1, managed_instance_name_1, loc, user, admin_passwords[0], subnet, license_type, v_cores, storage_size_in_gb, edition, family), + checks=[ + JMESPathCheck('name', managed_instance_name_1), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', user), + JMESPathCheck('vCores', v_cores), + JMESPathCheck('storageSizeInGb', storage_size_in_gb), + JMESPathCheck('licenseType', license_type), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('sku.family', family), + JMESPathCheck('sku.capacity', v_cores), + JMESPathCheck('identity', None)]).get_output_in_json() + + # test show sql managed instance 1 + self.cmd('sql mi show -g {} -n {}' + .format(resource_group_1, managed_instance_name_1), + checks=[ + JMESPathCheck('name', managed_instance_name_1), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', user)]) + + # test show sql managed instance 1 using id + self.cmd('sql mi show --id {}' + .format(managed_instance_1['id']), + checks=[ + JMESPathCheck('name', managed_instance_name_1), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', user)]) + + # test update sql managed_instance + self.cmd('sql mi update -g {} -n {} --admin-password {} -i' + .format(resource_group_1, managed_instance_name_1, admin_passwords[1]), + checks=[ + JMESPathCheck('name', managed_instance_name_1), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', user), + JMESPathCheck('identity.type', 'SystemAssigned')]) + + # test update without identity parameter, validate identity still exists + # also use --id instead of -g/-n + self.cmd('sql mi update --id {} --admin-password {}' + .format(managed_instance_1['id'], admin_passwords[0]), + checks=[ + JMESPathCheck('name', managed_instance_name_1), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', user), + JMESPathCheck('identity.type', 'SystemAssigned')]) + + # test create another sql managed instance, with identity this time + self.cmd('sql mi create -g {} -n {} -l {} -i ' + '--admin-user {} --admin-password {} --subnet {} --license-type {} --capacity {} --storage {} --edition {} --family {}' + .format(resource_group_1, managed_instance_name_2, loc, user, admin_passwords[0], subnet, license_type, v_cores, storage_size_in_gb, edition, family), + checks=[ + JMESPathCheck('name', managed_instance_name_2), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', user), + JMESPathCheck('vCores', v_cores), + JMESPathCheck('storageSizeInGb', storage_size_in_gb), + JMESPathCheck('licenseType', license_type), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('sku.family', family), + JMESPathCheck('sku.capacity', v_cores), + JMESPathCheck('identity.type', 'SystemAssigned')]) + + # test show sql managed instance 2 + self.cmd('sql mi show -g {} -n {}' + .format(resource_group_1, managed_instance_name_2), + checks=[ + JMESPathCheck('name', managed_instance_name_2), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', user)]) + + # test list sql managed_instance in the subscription should be at least 2 + self.cmd('sql mi list', checks=[JMESPathCheckGreaterThan('length(@)', 1)]) + + # test delete sql managed instance + self.cmd('sql mi delete --id {} --yes' + .format(managed_instance_1['id']), checks=NoneCheck()) + self.cmd('sql mi delete -g {} -n {} --yes' + .format(resource_group_1, managed_instance_name_2), checks=NoneCheck()) + + # test show sql managed instance doesn't return anything + self.cmd('sql mi show -g {} -n {}' + .format(resource_group_1, managed_instance_name_1), + expect_failure=True) + + # test show sql managed instance doesn't return anything + self.cmd('sql mi show -g {} -n {}' + .format(resource_group_1, managed_instance_name_2), + expect_failure=True) + + +class SqlManagedInstanceDbMgmtScenarioTest(ScenarioTest): + def test_sql_managed_db_mgmt(self): + database_name = "cliautomationdb01" + database_name_restored = "restoredcliautomationdb01" + + managed_instance_name_1 = self.create_random_name(managed_instance_name_prefix, managed_instance_name_max_length) + admin_login = 'admin123' + admin_passwords = ['SecretPassword123', 'SecretPassword456'] + + is_playback = os.path.exists(self.recording_file) + if is_playback: + subnet = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CLean' + else: + subnet = '/subscriptions/ee5ea899-0791-418f-9270-77cd8273794b/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL' + + license_type = 'LicenseIncluded' + loc = 'westcentralus' + v_cores = 8 + storage_size_in_gb = '64' + edition = 'GeneralPurpose' + family = 'Gen4' + resource_group_1 = "cl_one" + collation = "Latin1_General_100_CS_AS_SC" + user = admin_login + + # Prepare managed instance for test + managed_instance_1 = self.cmd('sql mi create -g {} -n {} -l {} ' + '-u {} -p {} --subnet {} --license-type {} --capacity {} --storage {} --edition {} --family {}' + .format(resource_group_1, managed_instance_name_1, loc, user, admin_passwords[0], subnet, license_type, v_cores, storage_size_in_gb, edition, family), + checks=[ + JMESPathCheck('name', managed_instance_name_1), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('administratorLogin', user), + JMESPathCheck('vCores', v_cores), + JMESPathCheck('storageSizeInGb', storage_size_in_gb), + JMESPathCheck('licenseType', license_type), + JMESPathCheck('sku.tier', edition), + JMESPathCheck('sku.family', family), + JMESPathCheck('sku.capacity', v_cores), + JMESPathCheck('identity', None)]).get_output_in_json() + + # test sql db commands + db1 = self.cmd('sql midb create -g {} --mi {} -n {} --collation {}' + .format(resource_group_1, managed_instance_name_1, database_name, collation), + checks=[ + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('name', database_name), + JMESPathCheck('location', loc), + JMESPathCheck('collation', collation), + JMESPathCheck('status', 'Online')]).get_output_in_json() + + time.sleep(300) # Sleeping 5 minutes should be enough for the restore to be possible (Skipped under playback mode) + + # test sql db restore command + db1 = self.cmd('sql midb restore -g {} --mi {} -n {} --dest-name {} --time {}' + .format(resource_group_1, managed_instance_name_1, database_name, database_name_restored, datetime.utcnow().isoformat()), + checks=[ + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('name', database_name_restored), + JMESPathCheck('location', loc), + JMESPathCheck('status', 'Online')]).get_output_in_json() + + self.cmd('sql midb list -g {} --managed-instance {}' + .format(resource_group_1, managed_instance_name_1), + checks=[JMESPathCheck('length(@)', 2)]) + + # Show by group/managed_instance/database-name + self.cmd('sql midb show -g {} --managed-instance {} -n {}' + .format(resource_group_1, managed_instance_name_1, database_name), + checks=[ + JMESPathCheck('name', database_name), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('location', loc), + JMESPathCheck('collation', collation), + JMESPathCheck('status', 'Online')]) + + # Show by id + self.cmd('sql midb show --id {}' + .format(db1['id']), + checks=[ + JMESPathCheck('name', database_name_restored), + JMESPathCheck('resourceGroup', resource_group_1), + JMESPathCheck('location', loc), + JMESPathCheck('collation', collation), + JMESPathCheck('status', 'Online')]) + + # Delete by group/server/name + self.cmd('sql midb delete -g {} --managed-instance {} -n {} --yes' + .format(resource_group_1, managed_instance_name_1, database_name), + checks=[NoneCheck()]) + + # test show sql managed db doesn't return anything + self.cmd('sql midb show -g {} --managed-instance {} -n {}' + .format(resource_group_1, managed_instance_name_1, database_name), + expect_failure=True) + + self.cmd('sql mi delete --id {} --yes' + .format(managed_instance_1['id']), checks=NoneCheck()) diff --git a/src/command_modules/azure-cli-sql/setup.py b/src/command_modules/azure-cli-sql/setup.py index d02c4721717..d87f414caea 100644 --- a/src/command_modules/azure-cli-sql/setup.py +++ b/src/command_modules/azure-cli-sql/setup.py @@ -12,7 +12,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "2.0.26" +VERSION = "2.0.27" CLASSIFIERS = [ 'Development Status :: 4 - Beta', @@ -30,7 +30,7 @@ DEPENDENCIES = [ 'azure-cli-core', - 'azure-mgmt-sql==0.9.0', + 'azure-mgmt-sql==0.9.1', 'azure-mgmt-storage==1.5.0', 'six' ]