diff --git a/src/azure-cli/azure/cli/command_modules/maps/_client_factory.py b/src/azure-cli/azure/cli/command_modules/maps/_client_factory.py index 96c1a3ca3b7..4a7c44d357b 100644 --- a/src/azure-cli/azure/cli/command_modules/maps/_client_factory.py +++ b/src/azure-cli/azure/cli/command_modules/maps/_client_factory.py @@ -6,9 +6,17 @@ def cf_maps(cli_ctx, *_): from azure.cli.core.commands.client_factory import get_mgmt_service_client - from azure.mgmt.maps import MapsManagementClient - return get_mgmt_service_client(cli_ctx, MapsManagementClient) + from azure.mgmt.maps import AzureMapsManagementClient + return get_mgmt_service_client(cli_ctx, AzureMapsManagementClient) def cf_accounts(cli_ctx, *_): return cf_maps(cli_ctx).accounts + + +def cf_map(cli_ctx, *_): + return cf_maps(cli_ctx).maps + + +def cf_creator(cli_ctx, *_): + return cf_maps(cli_ctx).creators diff --git a/src/azure-cli/azure/cli/command_modules/maps/_help.py b/src/azure-cli/azure/cli/command_modules/maps/_help.py index 5761d2ceae5..60c997093cf 100644 --- a/src/azure-cli/azure/cli/command_modules/maps/_help.py +++ b/src/azure-cli/azure/cli/command_modules/maps/_help.py @@ -18,29 +18,48 @@ """ helps['maps account create'] = """ -type: command -short-summary: Create a maps account. -parameters: - - name: --accept-tos - short-summary: Accept the Terms of Service, and do not prompt for confirmation. - long-summary: | - By creating an Azure Maps account, you agree that you have read and agree to the - License (https://azure.microsoft.com/support/legal/) and - Privacy Statement (https://privacy.microsoft.com/privacystatement). + type: command + short-summary: "Create a Maps Account. A Maps Account holds the keys which allow access to the Maps REST APIs." + parameters: + - name: --linked-resources + short-summary: "Sets the resources to be used for Managed Identities based operations for the Map account \ +resource." + long-summary: | + Usage: --linked-resources unique-name=XX id=XX -examples: - - name: Create a maps account. (autogenerated) - text: az maps account create --name MyMapsAccount --resource-group MyResourceGroup --sku S0 --subscription MySubscription - crafted: true + unique-name: Required. A provided name which uniquely identifies the linked resource. + id: Required. ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupNa\ +me}/providers/Microsoft.Storage/accounts/{storageName}'. + + Multiple actions can be specified by using more than one --linked-resources argument. + examples: + - name: Create Account with Managed Identities + text: |- + az maps account create --type "SystemAssigned, UserAssigned" --user-identities \ +"{\\"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIden\ +tity/userAssignedIdentities/identityName\\":{}}" --kind "Gen2" --disable-local-auth false \ +--linked-resources id="/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Mic\ +rosoft.Storage/accounts/mystorageacc" unique-name="myBatchStorageAccount" --linked-resources \ +id="/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Storage/acco\ +unts/mystorageacc" unique-name="myBlobDataSource" --tags test="true" --account-name "myMapsAccount" \ +--resource-group "myResourceGroup" --sku "S0" + - name: Create Gen1 Account + text: |- + az maps account create --kind "Gen1" --disable-local-auth false --tags \ +test="true" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S0" + - name: Create Gen2 Account + text: |- + az maps account create --kind "Gen2" --disable-local-auth true --tags \ +test="true" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S0" """ helps['maps account delete'] = """ -type: command -short-summary: Delete a maps account. -examples: - - name: Delete a maps account. (autogenerated) - text: az maps account delete --name MyMapsAccount --resource-group MyResourceGroup - crafted: true + type: command + short-summary: "Delete a Maps Account." + examples: + - name: DeleteAccount + text: |- + az maps account delete --name "myMapsAccount" --resource-group "myResourceGroup" """ helps['maps account keys'] = """ @@ -81,6 +100,130 @@ """ helps['maps account update'] = """ -type: command -short-summary: Update the properties of a maps account. + type: command + short-summary: "Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as \ +Sku, Tags, Properties." + parameters: + - name: --linked-resources + short-summary: "Sets the resources to be used for Managed Identities based operations for the Map account \ +resource." + long-summary: | + Usage: --linked-resources unique-name=XX id=XX + + unique-name: Required. A provided name which uniquely identifies the linked resource. + id: Required. ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupNa\ +me}/providers/Microsoft.Storage/accounts/{storageName}'. + + Multiple actions can be specified by using more than one --linked-resources argument. + examples: + - name: Update Account Managed Identities + text: |- + az maps account update --type "SystemAssigned, UserAssigned" --user-identities \ +"{\\"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIden\ +tity/userAssignedIdentities/identityName\\":{}}" --kind "Gen2" --linked-resources id="/subscriptions/{subscriptionId}/r\ +esourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}" unique-name="myBatchStorageAccoun\ +t" --account-name "myMapsAccount" --resource-group "myResourceGroup" --sku "S1" + - name: Update Account Tags + text: |- + az maps account update --tags specialTag="true" --account-name "myMapsAccount" --resource-group \ +"myResourceGroup" --sku "S0" + - name: Update to Gen1 Account + text: |- + az maps account update --kind "Gen1" --account-name "myMapsAccount" --resource-group \ +"myResourceGroup" --sku "S0" + - name: Update to Gen2 Account + text: |- + az maps account update --kind "Gen2" --account-name "myMapsAccount" --resource-group \ +"myResourceGroup" --sku "S0" +""" + +helps['maps account keys list'] = """ + type: command + short-summary: "Get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the \ +Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration." + examples: + - name: List Keys + text: |- + az maps account keys list --name "myMapsAccount" --resource-group "myResourceGroup" +""" + +helps['maps account keys renew'] = """ + type: command + short-summary: "Regenerate either the primary or secondary key for use with the Maps APIs. The old key will stop \ +working immediately." + examples: + - name: Renew + text: |- + az maps account keys renew --name "myMapsAccount" --key "primary" --resource-group \ +"myResourceGroup" +""" + +helps['maps map'] = """ + type: group + short-summary: Manage map with maps +""" + +helps['maps map list-operation'] = """ + type: command + short-summary: "List operations available for the Maps Resource Provider." + examples: + - name: Get Operations + text: |- + az maps map list-operation +""" + +helps['maps creator'] = """ + type: group + short-summary: Manage creator with maps +""" + +helps['maps creator list'] = """ + type: command + short-summary: "Get all Creator instances for an Azure Maps Account." + examples: + - name: List Creator Resources By Account + text: |- + az maps creator list --account-name "myMapsAccount" --resource-group "myResourceGroup" +""" + +helps['maps creator show'] = """ + type: command + short-summary: "Get a Maps Creator resource." + examples: + - name: Get Creator Resource + text: |- + az maps creator show --account-name "myMapsAccount" --creator-name "myCreator" --resource-group \ +"myResourceGroup" +""" + +helps['maps creator create'] = """ + type: command + short-summary: "Create a Maps Creator resource. Creator resource will manage Azure resources required to populate \ +a custom set of mapping data. It requires an account to exist before it can be created." + examples: + - name: Create Creator Resource + text: |- + az maps creator create --location "eastus2" --storage-units 5 --tags test="true" --account-name \ +"myMapsAccount" --creator-name "myCreator" --resource-group "myResourceGroup" +""" + +helps['maps creator update'] = """ + type: command + short-summary: "Updates the Maps Creator resource. Only a subset of the parameters may be updated after creation, \ +such as Tags." + examples: + - name: Update Creator Resource + text: |- + az maps creator update --storage-units 10 --tags specialTag="true" --account-name "myMapsAccount" \ +--creator-name "myCreator" --resource-group "myResourceGroup" +""" + +helps['maps creator delete'] = """ + type: command + short-summary: "Delete a Maps Creator resource." + examples: + - name: Delete Creator Resource + text: |- + az maps creator delete --account-name "myMapsAccount" --creator-name "myCreator" --resource-group \ +"myResourceGroup" """ diff --git a/src/azure-cli/azure/cli/command_modules/maps/_params.py b/src/azure-cli/azure/cli/command_modules/maps/_params.py index 36e4702a2b7..d15a1c29790 100644 --- a/src/azure-cli/azure/cli/command_modules/maps/_params.py +++ b/src/azure-cli/azure/cli/command_modules/maps/_params.py @@ -9,14 +9,21 @@ get_enum_type, get_resource_name_completion_list, resource_group_name_type, - tags_type) + tags_type, + get_location_type, + get_three_state_flag) +from azure.cli.core.commands.validators import ( + get_default_location_from_resource_group, + validate_file_or_dict +) from azure.mgmt.maps.models import KeyType +from azure.cli.command_modules.maps.action import AddLinkedResources def load_arguments(self, _): # Argument Definition - maps_name_type = CLIArgumentType(options_list=['--name', '-n'], + maps_name_type = CLIArgumentType(options_list=['--name', '--account-name', '-n'], completer=get_resource_name_completion_list('Microsoft.Maps/accounts'), help='The name of the maps account') @@ -31,17 +38,52 @@ def load_arguments(self, _): arg_type=maps_name_type) with self.argument_context('maps account') as c: - c.argument('sku_name', - options_list=['--sku', '-s'], - help='The name of the SKU.', - arg_type=get_enum_type(['S0', 'S1'])) - c.argument('tags', - arg_type=tags_type) + c.argument('name', options_list=['--sku', '-s'], arg_type=get_enum_type(['S0', 'S1', 'G2']), + help='The name of the SKU, in standard format (such as S0).', arg_group='Sku', + required=True) + c.argument('tags', arg_type=tags_type) with self.argument_context('maps account create') as c: - c.argument('force', - options_list=['--accept-tos'], - action='store_true') + c.argument('kind', options_list=['--kind'], arg_type=get_enum_type(['Gen1', 'Gen2']), + help='Get or Set Kind property.') + c.argument('disable_local_auth', options_list=['--disable-local-auth'], arg_type=get_three_state_flag(), + help='Allows toggle functionality on Azure ' + 'Policy to disable Azure Maps local authentication support. This will disable Shared Keys ' + 'authentication from any usage.') + c.argument('linked_resources', options_list=['--linked-resources'], action=AddLinkedResources, nargs='+', + help='Sets the resources to be used for ' + 'Managed Identities based operations for the Map account resource.') + c.argument('type_', options_list=['--type'], arg_type=get_enum_type(['SystemAssigned', 'UserAssigned', + 'SystemAssigned, UserAssigned', 'None']), + help='The identity type.', arg_group='Identity') + c.argument('user_assigned_identities', options_list=['--user-identities'], type=validate_file_or_dict, + help='The list of user identities associated with the resource. ' + 'The user identity dictionary key references will be ARM resource ids ' + 'in the form: \'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microso' + 'ft.ManagedIdentity/userAssignedIdentities/{identityName}\'. Expected value: ' + 'json-string/@json-file.', arg_group='Identity') + c.argument('force', options_list=['--accept-tos'], action='store_true', + help='You must agree to the License and Privacy Statement to create an account.') + + with self.argument_context('maps account update') as c: + c.argument('kind', options_list=['--kind'], arg_type=get_enum_type(['Gen1', 'Gen2']), + help='Get or Set Kind property.') + c.argument('disable_local_auth', options_list=['--disable-local-auth'], arg_type=get_three_state_flag(), + help='Allows toggle functionality on Azure ' + 'Policy to disable Azure Maps local authentication support. This will disable Shared Keys ' + 'authentication from any usage.') + c.argument('linked_resources', options_list=['--linked-resources'], action=AddLinkedResources, nargs='+', + help='Sets the resources to be used for ' + 'Managed Identities based operations for the Map account resource.') + c.argument('type_', options_list=['--type'], arg_type=get_enum_type(['SystemAssigned', 'UserAssigned', + 'SystemAssigned, UserAssigned', 'None']), + help='The identity type.', arg_group='Identity') + c.argument('user_assigned_identities', options_list=['--user-identities'], type=validate_file_or_dict, + help='The list of user identities associated with the resource. ' + 'The user identity dictionary key references will be ARM resource ids ' + 'in the form: \'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microso' + 'ft.ManagedIdentity/userAssignedIdentities/{identityName}\'. Expected value: ' + 'json-string/@json-file.', arg_group='Identity') # Prevent --ids argument in keys with id_part=None with self.argument_context('maps account keys') as c: @@ -52,4 +94,39 @@ def load_arguments(self, _): with self.argument_context('maps account keys renew') as c: c.argument('key_type', options_list=['--key'], - arg_type=get_enum_type(KeyType)) + arg_type=get_enum_type(KeyType), + help='Whether the operation refers to the primary or secondary key') + + with self.argument_context('maps creator') as c: + c.argument('tags', arg_type=tags_type) + + with self.argument_context('maps creator create') as c: + c.argument('creator_name', options_list=['--creator-name'], type=str, help='The name of the ' + 'Maps Creator instance.') + c.argument('location', options_list=['--location', '-l'], arg_type=get_location_type(self.cli_ctx), + required=False, validator=get_default_location_from_resource_group) + c.argument('storage_units', options_list=['--storage-units'], type=int, + help='The storage units to be allocated. Integer values from 1 to 100, inclusive.') + + with self.argument_context('maps creator update') as c: + c.argument('creator_name', options_list=['--creator-name'], type=str, help='The name of the ' + 'Maps Creator instance.', id_part='child_name_1') + c.argument('storage_units', options_list=['--storage-units'], type=int, + help='The storage units to be allocated. Integer values from 1 to 100, inclusive.') + + with self.argument_context('maps creator delete') as c: + c.argument('creator_name', options_list=['--creator-name'], type=str, help='The name of the ' + 'Maps Creator instance.', id_part='child_name_1') + + with self.argument_context('maps creator show') as c: + c.argument('creator_name', options_list=['--creator-name'], type=str, help='The name of the ' + 'Maps Creator instance.', id_part='child_name_1') + + with self.argument_context('maps creator list') as c: + c.argument('resource_group_name', + arg_type=resource_group_name_type, + id_part=None, + help='Resource group name') + c.argument('account_name', + id_part=None, + arg_type=maps_name_type) diff --git a/src/azure-cli/azure/cli/command_modules/maps/action.py b/src/azure-cli/azure/cli/command_modules/maps/action.py new file mode 100644 index 00000000000..ba8518564a3 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/maps/action.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=protected-access + +import argparse +from collections import defaultdict +from knack.util import CLIError + + +class AddLinkedResources(argparse._AppendAction): + def __call__(self, parser, namespace, values, option_string=None): + action = self.get_action(values, option_string) + super(AddLinkedResources, self).__call__(parser, namespace, action, option_string) + + def get_action(self, values, option_string): # pylint: disable=no-self-use + try: + properties = defaultdict(list) + for (k, v) in (x.split('=', 1) for x in values): + properties[k].append(v) + properties = dict(properties) + except ValueError: + raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) + d = {} + for k in properties: + kl = k.lower() + v = properties[k] + if kl == 'unique-name': + d['unique_name'] = v[0] + elif kl == 'id': + d['id'] = v[0] + else: + raise CLIError('Unsupported Key {} is provided for parameter linked_resources. All possible keys are: ' + 'unique-name, id'.format(k)) + return d diff --git a/src/azure-cli/azure/cli/command_modules/maps/commands.py b/src/azure-cli/azure/cli/command_modules/maps/commands.py index bd7dfa71fbf..6a96ecb1241 100644 --- a/src/azure-cli/azure/cli/command_modules/maps/commands.py +++ b/src/azure-cli/azure/cli/command_modules/maps/commands.py @@ -4,24 +4,38 @@ # -------------------------------------------------------------------------------------------- from azure.cli.core.commands import CliCommandType -from azure.cli.command_modules.maps._client_factory import cf_accounts +from azure.cli.command_modules.maps._client_factory import cf_accounts, cf_map, cf_creator def load_command_table(self, _): mgmt_type = CliCommandType( - operations_tmpl='azure.mgmt.maps.operations#AccountsOperations.{}', + operations_tmpl='azure.mgmt.maps.operations._accounts_operations#AccountsOperations.{}', client_factory=cf_accounts) with self.command_group('maps account', mgmt_type) as g: g.show_command('show', 'get') g.custom_command('list', 'list_accounts') - g.custom_command('create', 'create_account') + g.custom_command('create', 'maps_account_create') g.command('delete', 'delete') - g.generic_update_command('update', - getter_name='get', - setter_arg_name='maps_account_create_parameters', - custom_func_name='generic_update_account') + g.custom_command('update', 'maps_account_update') with self.command_group('maps account keys', mgmt_type) as g: - g.command('renew', 'regenerate_keys') - g.command('list', 'list_keys') + g.custom_command('renew', 'maps_account_regenerate_key') + g.custom_command('list', 'maps_account_list_key') + + maps_map = CliCommandType( + operations_tmpl='azure.mgmt.maps.operations._maps_operations#MapsOperations.{}', + client_factory=cf_map) + + with self.command_group('maps map', maps_map, client_factory=cf_map) as g: + g.custom_command('list-operation', 'maps_map_list_operation') + + maps_creator = CliCommandType( + operations_tmpl='azure.mgmt.maps.operations._creators_operations#CreatorsOperations.{}', + client_factory=cf_creator) + with self.command_group('maps creator', maps_creator, client_factory=cf_creator) as g: + g.custom_command('list', 'maps_creator_list') + g.custom_show_command('show', 'maps_creator_show') + g.custom_command('create', 'maps_creator_create') + g.custom_command('update', 'maps_creator_update') + g.custom_command('delete', 'maps_creator_delete', confirmation=True) diff --git a/src/azure-cli/azure/cli/command_modules/maps/custom.py b/src/azure-cli/azure/cli/command_modules/maps/custom.py index 8d05a7a6343..2a7cb6ddb6a 100644 --- a/src/azure-cli/azure/cli/command_modules/maps/custom.py +++ b/src/azure-cli/azure/cli/command_modules/maps/custom.py @@ -7,16 +7,22 @@ from knack.prompting import prompt_y_n from knack.util import CLIError -from azure.mgmt.maps.models import ( - MapsAccountCreateParameters, - Sku) - ACCOUNT_LOCATION = 'global' logger = get_logger(__name__) -def create_account(client, resource_group_name, account_name, sku_name='S0', tags=None, force=None): +def maps_account_create(client, + resource_group_name, + account_name, + name, + tags=None, + kind=None, + disable_local_auth=None, + linked_resources=None, + type_=None, + user_assigned_identities=None, + force=None): terms = 'By creating an Azure Maps account, you agree that you have read and agree to the ' \ '\nLicense (https://azure.microsoft.com/support/legal/) and ' \ '\nPrivacy Statement (https://privacy.microsoft.com/privacystatement).' \ @@ -39,11 +45,29 @@ def create_account(client, resource_group_name, account_name, sku_name='S0', tag option = prompt_y_n(hint) if not option: raise CLIError(client_denied_terms) - - # Submit query - sku = Sku(name=sku_name) - maps_account_create_params = MapsAccountCreateParameters(location=ACCOUNT_LOCATION, sku=sku, tags=tags) - return client.create_or_update(resource_group_name, account_name, maps_account_create_params) + if kind is None: + kind = "Gen1" + if disable_local_auth is None: + disable_local_auth = False + maps_account = {} + if tags is not None: + maps_account['tags'] = tags + maps_account['location'] = ACCOUNT_LOCATION + maps_account['kind'] = "Gen1" if kind is None else kind + maps_account['properties'] = {} + maps_account['properties']['disable_local_auth'] = False if disable_local_auth is None else disable_local_auth + if linked_resources is not None: + maps_account['properties']['linked_resources'] = linked_resources + maps_account['identity'] = {} + if type_ is not None: + maps_account['identity']['type'] = type_ + if user_assigned_identities is not None: + maps_account['identity']['user_assigned_identities'] = user_assigned_identities + maps_account['sku'] = {} + maps_account['sku']['name'] = name + return client.create_or_update(resource_group_name=resource_group_name, + account_name=account_name, + maps_account=maps_account) def list_accounts(client, resource_group_name=None): @@ -54,13 +78,130 @@ def list_accounts(client, resource_group_name=None): return client.list_by_resource_group(resource_group_name) -def generic_update_account(instance, sku_name=None, tags=None): - # Pre-populate with old instance - maps_account_create_params = MapsAccountCreateParameters(location=ACCOUNT_LOCATION, sku=instance.sku, - tags=instance.tags) - # Update fields with new parameter values - if sku_name: - maps_account_create_params.sku.name = sku_name - if tags: - maps_account_create_params.tags = tags - return maps_account_create_params +def maps_account_show(client, + resource_group_name, + account_name): + return client.get(resource_group_name=resource_group_name, + account_name=account_name) + + +def maps_account_update(client, + resource_group_name, + account_name, + tags=None, + kind=None, + disable_local_auth=None, + linked_resources=None, + type_=None, + user_assigned_identities=None, + name=None): + maps_account_update_parameters = {} + if tags is not None: + maps_account_update_parameters['tags'] = tags + if kind is not None: + maps_account_update_parameters['kind'] = kind + if disable_local_auth is not None: + maps_account_update_parameters['disable_local_auth'] = disable_local_auth + if linked_resources is not None: + maps_account_update_parameters['linked_resources'] = linked_resources + if type_ is not None or user_assigned_identities is not None: + maps_account_update_parameters['identity'] = {} + if type_ is not None: + maps_account_update_parameters['identity']['type'] = type_ + if user_assigned_identities is not None: + maps_account_update_parameters['identity']['user_assigned_identities'] = user_assigned_identities + if name is not None: + maps_account_update_parameters['sku'] = {'name': name} + return client.update(resource_group_name=resource_group_name, + account_name=account_name, + maps_account_update_parameters=maps_account_update_parameters) + + +def maps_account_delete(client, + resource_group_name, + account_name): + return client.delete(resource_group_name=resource_group_name, + account_name=account_name) + + +def maps_account_list_key(client, + resource_group_name, + account_name): + return client.list_keys(resource_group_name=resource_group_name, + account_name=account_name) + + +def maps_account_regenerate_key(client, + resource_group_name, + account_name, + key_type): + key_specification = {} + key_specification['key_type'] = key_type + return client.regenerate_keys(resource_group_name=resource_group_name, + account_name=account_name, + key_specification=key_specification) + + +def maps_map_list_operation(client): + return client.list_operations() + + +def maps_creator_list(client, + resource_group_name, + account_name): + return client.list_by_account(resource_group_name=resource_group_name, + account_name=account_name) + + +def maps_creator_show(client, + resource_group_name, + account_name, + creator_name): + return client.get(resource_group_name=resource_group_name, + account_name=account_name, + creator_name=creator_name) + + +def maps_creator_create(client, + resource_group_name, + account_name, + creator_name, + location, + storage_units, + tags=None): + creator_resource = {} + if tags is not None: + creator_resource['tags'] = tags + creator_resource['location'] = location + creator_resource['properties'] = {} + creator_resource['properties']['storage_units'] = storage_units + return client.create_or_update(resource_group_name=resource_group_name, + account_name=account_name, + creator_name=creator_name, + creator_resource=creator_resource) + + +def maps_creator_update(client, + resource_group_name, + account_name, + creator_name, + tags=None, + storage_units=None): + creator_update_parameters = {} + if tags is not None: + creator_update_parameters['tags'] = tags + if storage_units is not None: + creator_update_parameters['storage_units'] = storage_units + return client.update(resource_group_name=resource_group_name, + account_name=account_name, + creator_name=creator_name, + creator_update_parameters=creator_update_parameters) + + +def maps_creator_delete(client, + resource_group_name, + account_name, + creator_name): + return client.delete(resource_group_name=resource_group_name, + account_name=account_name, + creator_name=creator_name) diff --git a/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_create_maps_account.yaml b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_create_maps_account.yaml index 9650ac154e4..d91c60ce536 100644 --- a/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_create_maps_account.yaml +++ b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_create_maps_account.yaml @@ -1,6 +1,7 @@ interactions: - request: - body: '{"location": "global", "sku": {"name": "S0"}}' + body: '{"location": "global", "sku": {"name": "S0"}, "kind": "Gen1", "properties": + {"disableLocalAuth": false}}' headers: Accept: - application/json @@ -11,35 +12,33 @@ interactions: Connection: - keep-alive Content-Length: - - '45' + - '104' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -n -g --sku --accept-tos User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2021-02-01 response: body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"f2bc9d5c-9aa5-4095-ad10-1afea0ca6e9b\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\"\ - : {}\r\n}" + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"864ba8f7-4cf6-42dd-86d0-416430bffd4f\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\",\r\n + \ \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n}" headers: cache-control: - no-cache content-length: - - '474' + - '558' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:11 GMT + - Fri, 18 Jun 2021 08:50:52 GMT expires: - '-1' pragma: @@ -51,12 +50,13 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created - request: - body: '{"location": "global", "sku": {"name": "S0"}}' + body: '{"location": "global", "sku": {"name": "S0"}, "kind": "Gen1", "properties": + {"disableLocalAuth": false}}' headers: Accept: - application/json @@ -67,35 +67,33 @@ interactions: Connection: - keep-alive Content-Length: - - '45' + - '104' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -n -g --sku --accept-tos User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2021-02-01 response: body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"f2bc9d5c-9aa5-4095-ad10-1afea0ca6e9b\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\"\ - : {}\r\n}" + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"864ba8f7-4cf6-42dd-86d0-416430bffd4f\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\",\r\n + \ \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n}" headers: cache-control: - no-cache content-length: - - '474' + - '558' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:15 GMT + - Fri, 18 Jun 2021 08:50:57 GMT expires: - '-1' pragma: @@ -116,7 +114,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "global", "sku": {"name": "S1"}}' + body: '{"location": "global", "sku": {"name": "S1"}, "kind": "Gen1", "properties": + {"disableLocalAuth": false}}' headers: Accept: - application/json @@ -127,35 +126,33 @@ interactions: Connection: - keep-alive Content-Length: - - '45' + - '104' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -n -g --sku --accept-tos User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/clis1-000008?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/clis1-000008?api-version=2021-02-01 response: body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"13c70d64-bcc3-4053-96eb-d913ad9f58a0\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/clis1-000008\"\ - ,\r\n \"name\": \"clis1-000008\",\r\n \"location\": \"global\",\r\n \"\ - tags\": {}\r\n}" + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"d75d22d6-4e8e-46ae-9ac8-93bc3ab805a9\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/clis1-000008\",\r\n + \ \"name\": \"clis1-000008\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n}" headers: cache-control: - no-cache content-length: - - '474' + - '558' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:24 GMT + - Fri, 18 Jun 2021 08:51:02 GMT expires: - '-1' pragma: @@ -167,69 +164,13 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 201 message: Created - request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - maps account update - Connection: - - keep-alive - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -n -g --sku --tags - User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2018-05-01 - response: - body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"f2bc9d5c-9aa5-4095-ad10-1afea0ca6e9b\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\"\ - : {}\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '474' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 27 Aug 2020 07:12:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Kestrel - 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": "global", "tags": {"key-000003": "val-000004"}, "sku": {"name": - "S1"}}' + body: '{"tags": {"key-000003": "val-000004"}, "kind": "Gen1", "sku": {"name": + "S1"}, "properties": {"disableLocalAuth": false}}' headers: Accept: - application/json @@ -240,35 +181,33 @@ interactions: Connection: - keep-alive Content-Length: - - '83' + - '120' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -n -g --sku --tags User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2018-05-01 + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2021-02-01 response: body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"f2bc9d5c-9aa5-4095-ad10-1afea0ca6e9b\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\"\ - : {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n}" + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"864ba8f7-4cf6-42dd-86d0-416430bffd4f\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\",\r\n + \ \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\": + {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '510' + - '594' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:29 GMT + - Fri, 18 Jun 2021 08:51:07 GMT expires: - '-1' pragma: @@ -299,34 +238,30 @@ interactions: - maps account show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -n -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2021-02-01 response: body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"f2bc9d5c-9aa5-4095-ad10-1afea0ca6e9b\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\"\ - : {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n}" + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"864ba8f7-4cf6-42dd-86d0-416430bffd4f\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\",\r\n + \ \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\": + {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '510' + - '594' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:31 GMT + - Fri, 18 Jun 2021 08:51:08 GMT expires: - '-1' pragma: @@ -355,34 +290,30 @@ interactions: - maps account show Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - --ids User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2021-02-01 response: body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"f2bc9d5c-9aa5-4095-ad10-1afea0ca6e9b\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\"\ - : {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n}" + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"864ba8f7-4cf6-42dd-86d0-416430bffd4f\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\",\r\n + \ \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\": + {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '510' + - '594' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:33 GMT + - Fri, 18 Jun 2021 08:51:09 GMT expires: - '-1' pragma: @@ -411,36 +342,31 @@ interactions: - maps account list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts?api-version=2021-02-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"type\": \"Microsoft.Maps/accounts\"\ - ,\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"properties\": {\r\n \"x-ms-client-id\"\ - : \"f2bc9d5c-9aa5-4095-ad10-1afea0ca6e9b\"\r\n },\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n\ - \ \"tags\": {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n\ - \ }\r\n ]\r\n}" + string: "{\r\n \"value\": [\r\n {\r\n \"kind\": \"Gen1\",\r\n \"type\": + \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n + \ \"tier\": \"Standard\"\r\n },\r\n \"properties\": {\r\n + \ \"uniqueId\": \"864ba8f7-4cf6-42dd-86d0-416430bffd4f\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\",\r\n + \ \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\": + {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '599' + - '695' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:35 GMT + - Fri, 18 Jun 2021 08:51:10 GMT expires: - '-1' pragma: @@ -459,7 +385,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "global", "sku": {"name": "S0"}}' + body: '{"location": "global", "sku": {"name": "S0"}, "kind": "Gen1", "properties": + {"disableLocalAuth": false}}' headers: Accept: - application/json @@ -470,35 +397,33 @@ interactions: Connection: - keep-alive Content-Length: - - '45' + - '104' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -n -g --sku --accept-tos User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/cli-000006?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/cli-000006?api-version=2021-02-01 response: body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"abe77ba5-fde8-4d32-b9df-9be7f783d0ad\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/cli-000006\"\ - ,\r\n \"name\": \"cli-000006\",\r\n \"location\": \"global\",\r\n \"tags\"\ - : {}\r\n}" + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"bb99b7b4-726a-4433-bfab-8c35a5410a61\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/cli-000006\",\r\n + \ \"name\": \"cli-000006\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n}" headers: cache-control: - no-cache content-length: - - '474' + - '558' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:38 GMT + - Fri, 18 Jun 2021 08:51:17 GMT expires: - '-1' pragma: @@ -510,12 +435,13 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' status: code: 201 message: Created - request: - body: '{"location": "global", "sku": {"name": "S0"}}' + body: '{"location": "global", "sku": {"name": "S0"}, "kind": "Gen1", "properties": + {"disableLocalAuth": false}}' headers: Accept: - application/json @@ -526,35 +452,33 @@ interactions: Connection: - keep-alive Content-Length: - - '45' + - '104' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -n -g --sku --accept-tos User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007?api-version=2021-02-01 response: body: - string: "{\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \ - \ \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"properties\"\ - : {\r\n \"x-ms-client-id\": \"a73d2e16-580a-4d79-8e6b-5c6c7ae59d33\"\r\n\ - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007\"\ - ,\r\n \"name\": \"cli-000007\",\r\n \"location\": \"global\",\r\n \"tags\"\ - : {}\r\n}" + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"13b4276e-6992-48e6-b0b9-96342aea23b0\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007\",\r\n + \ \"name\": \"cli-000007\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n}" headers: cache-control: - no-cache content-length: - - '474' + - '558' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:42 GMT + - Fri, 18 Jun 2021 08:51:23 GMT expires: - '-1' pragma: @@ -566,7 +490,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 201 message: Created @@ -581,41 +505,38 @@ interactions: - maps account list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts?api-version=2021-02-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"type\": \"Microsoft.Maps/accounts\"\ - ,\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"properties\": {\r\n \"x-ms-client-id\"\ - : \"f2bc9d5c-9aa5-4095-ad10-1afea0ca6e9b\"\r\n },\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n\ - \ \"tags\": {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n\ - \ },\r\n {\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n \ - \ \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"Standard\"\ - \r\n },\r\n \"properties\": {\r\n \"x-ms-client-id\": \"\ - a73d2e16-580a-4d79-8e6b-5c6c7ae59d33\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007\"\ - ,\r\n \"name\": \"cli-000007\",\r\n \"location\": \"global\",\r\n\ - \ \"tags\": {}\r\n }\r\n ]\r\n}" + string: "{\r\n \"value\": [\r\n {\r\n \"kind\": \"Gen1\",\r\n \"type\": + \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n + \ \"tier\": \"Standard\"\r\n },\r\n \"properties\": {\r\n + \ \"uniqueId\": \"864ba8f7-4cf6-42dd-86d0-416430bffd4f\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\",\r\n + \ \"name\": \"cli-000005\",\r\n \"location\": \"global\",\r\n \"tags\": + {\r\n \"key-000003\": \"val-000004\"\r\n }\r\n },\r\n {\r\n + \ \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"properties\": {\r\n \"uniqueId\": \"13b4276e-6992-48e6-b0b9-96342aea23b0\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": + false\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007\",\r\n + \ \"name\": \"cli-000007\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '1132' + - '1324' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:43 GMT + - Fri, 18 Jun 2021 08:51:25 GMT expires: - '-1' pragma: @@ -644,41 +565,37 @@ interactions: - maps account list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts?api-version=2021-02-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"type\": \"Microsoft.Maps/accounts\"\ - ,\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"properties\": {\r\n \"x-ms-client-id\"\ - : \"13c70d64-bcc3-4053-96eb-d913ad9f58a0\"\r\n },\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/clis1-000008\"\ - ,\r\n \"name\": \"clis1-000008\",\r\n \"location\": \"global\",\r\ - \n \"tags\": {}\r\n },\r\n {\r\n \"type\": \"Microsoft.Maps/accounts\"\ - ,\r\n \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"properties\": {\r\n \"x-ms-client-id\"\ - : \"abe77ba5-fde8-4d32-b9df-9be7f783d0ad\"\r\n },\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/cli-000006\"\ - ,\r\n \"name\": \"cli-000006\",\r\n \"location\": \"global\",\r\n\ - \ \"tags\": {}\r\n }\r\n ]\r\n}" + string: "{\r\n \"value\": [\r\n {\r\n \"kind\": \"Gen1\",\r\n \"type\": + \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n + \ \"tier\": \"Standard\"\r\n },\r\n \"properties\": {\r\n + \ \"uniqueId\": \"d75d22d6-4e8e-46ae-9ac8-93bc3ab805a9\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/clis1-000008\",\r\n + \ \"name\": \"clis1-000008\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n },\r\n {\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"properties\": {\r\n \"uniqueId\": \"bb99b7b4-726a-4433-bfab-8c35a5410a61\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": + false\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/cli-000006\",\r\n + \ \"name\": \"cli-000006\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '1088' + - '1280' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:44 GMT + - Fri, 18 Jun 2021 08:51:25 GMT expires: - '-1' pragma: @@ -709,33 +626,26 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -n -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005/listKeys?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005/listKeys?api-version=2021-02-01 response: body: - string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"primaryKey\": \"MQlixfEVyO3QPC0x8EGxwIC5ezqd3hQ3yXG0x8Li2Ys\",\r\n\ - \ \"secondaryKey\": \"d83hzDHGfTCvDlANIM6bc3c3Hbz0vVVUQoON2BMWgMo\",\r\n\ - \ \"primaryKeyLastUpdated\": \"2020-08-27T07:12:10.4520366Z\",\r\n \"secondaryKeyLastUpdated\"\ - : \"2020-08-27T07:12:10.4520366Z\"\r\n}" + string: "{\r\n \"primaryKey\": \"5fGwdHtQQrCy6PsamtRlk8E3wEW3f9_cUVmRVdXG4-w\",\r\n + \ \"secondaryKey\": \"7DKg0q2oVYvzzouZbU2InTg8YwaX_juuDSmVidjVVV8\",\r\n \"primaryKeyLastUpdated\": + \"2021-06-18T08:50:51.5110656Z\",\r\n \"secondaryKeyLastUpdated\": \"2021-06-18T08:50:51.5110656Z\"\r\n}" headers: cache-control: - no-cache content-length: - - '465' + - '255' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:44 GMT + - Fri, 18 Jun 2021 08:51:27 GMT expires: - '-1' pragma: @@ -769,32 +679,27 @@ interactions: Content-Length: - '22' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -n -g --key User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005/regenerateKey?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005/regenerateKey?api-version=2021-02-01 response: body: - string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"primaryKey\": \"TYpawLnU4XNyvRP3Bkwy6n9HrMUz-8rBGJQ9oNSP3d4\",\r\n\ - \ \"secondaryKey\": \"d83hzDHGfTCvDlANIM6bc3c3Hbz0vVVUQoON2BMWgMo\",\r\n\ - \ \"primaryKeyLastUpdated\": \"2020-08-27T07:12:46.931624Z\",\r\n \"secondaryKeyLastUpdated\"\ - : \"2020-08-27T07:12:10.4520366Z\"\r\n}" + string: "{\r\n \"primaryKey\": \"lZIHpt5vbGlPumeLVHy_cUl3V1sIiKoMJ2PWAS3KBj8\",\r\n + \ \"secondaryKey\": \"7DKg0q2oVYvzzouZbU2InTg8YwaX_juuDSmVidjVVV8\",\r\n \"primaryKeyLastUpdated\": + \"2021-06-18T08:51:28.5243488Z\",\r\n \"secondaryKeyLastUpdated\": \"2021-06-18T08:50:51.5110656Z\"\r\n}" headers: cache-control: - no-cache content-length: - - '464' + - '255' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:46 GMT + - Fri, 18 Jun 2021 08:51:28 GMT expires: - '-1' pragma: @@ -828,32 +733,27 @@ interactions: Content-Length: - '24' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -n -g --key User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005/regenerateKey?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005/regenerateKey?api-version=2021-02-01 response: body: - string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005\"\ - ,\r\n \"primaryKey\": \"TYpawLnU4XNyvRP3Bkwy6n9HrMUz-8rBGJQ9oNSP3d4\",\r\n\ - \ \"secondaryKey\": \"PAynfSL4AB6TEnkDemhBNx5AsBWc-jxS6Pv2nOYnnQ4\",\r\n\ - \ \"primaryKeyLastUpdated\": \"2020-08-27T07:12:46.931624Z\",\r\n \"secondaryKeyLastUpdated\"\ - : \"2020-08-27T07:12:48.3708189Z\"\r\n}" + string: "{\r\n \"primaryKey\": \"lZIHpt5vbGlPumeLVHy_cUl3V1sIiKoMJ2PWAS3KBj8\",\r\n + \ \"secondaryKey\": \"iHoGDak-ok-y2qQtlGTSRu0D_84CaCjURKkFo_t8TjY\",\r\n \"primaryKeyLastUpdated\": + \"2021-06-18T08:51:28.5243488Z\",\r\n \"secondaryKeyLastUpdated\": \"2021-06-18T08:51:29.3376722Z\"\r\n}" headers: cache-control: - no-cache content-length: - - '464' + - '255' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:48 GMT + - Fri, 18 Jun 2021 08:51:28 GMT expires: - '-1' pragma: @@ -869,7 +769,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -886,17 +786,12 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -n -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000005?api-version=2021-02-01 response: body: string: '' @@ -906,7 +801,7 @@ interactions: content-length: - '0' date: - - Thu, 27 Aug 2020 07:12:56 GMT + - Fri, 18 Jun 2021 08:51:37 GMT expires: - '-1' pragma: @@ -918,7 +813,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' status: code: 200 message: OK @@ -933,35 +828,31 @@ interactions: - maps account list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts?api-version=2021-02-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"type\": \"Microsoft.Maps/accounts\"\ - ,\r\n \"sku\": {\r\n \"name\": \"S0\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"properties\": {\r\n \"x-ms-client-id\"\ - : \"a73d2e16-580a-4d79-8e6b-5c6c7ae59d33\"\r\n },\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007\"\ - ,\r\n \"name\": \"cli-000007\",\r\n \"location\": \"global\",\r\n\ - \ \"tags\": {}\r\n }\r\n ]\r\n}" + string: "{\r\n \"value\": [\r\n {\r\n \"kind\": \"Gen1\",\r\n \"type\": + \"Microsoft.Maps/accounts\",\r\n \"sku\": {\r\n \"name\": \"S0\",\r\n + \ \"tier\": \"Standard\"\r\n },\r\n \"properties\": {\r\n + \ \"uniqueId\": \"13b4276e-6992-48e6-b0b9-96342aea23b0\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007\",\r\n + \ \"name\": \"cli-000007\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '555' + - '651' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:12:56 GMT + - Fri, 18 Jun 2021 08:51:37 GMT expires: - '-1' pragma: @@ -992,17 +883,12 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -n -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/cli-000006?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/cli-000006?api-version=2021-02-01 response: body: string: '' @@ -1012,7 +898,7 @@ interactions: content-length: - '0' date: - - Thu, 27 Aug 2020 07:13:04 GMT + - Fri, 18 Jun 2021 08:51:45 GMT expires: - '-1' pragma: @@ -1024,7 +910,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14999' status: code: 200 message: OK @@ -1041,17 +927,12 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -n -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000007?api-version=2021-02-01 response: body: string: '' @@ -1061,7 +942,7 @@ interactions: content-length: - '0' date: - - Thu, 27 Aug 2020 07:13:09 GMT + - Fri, 18 Jun 2021 08:51:53 GMT expires: - '-1' pragma: @@ -1073,7 +954,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14996' + - '14999' status: code: 200 message: OK @@ -1090,17 +971,12 @@ interactions: - keep-alive Content-Length: - '0' - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -n -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/clis1-000008?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts/clis1-000008?api-version=2021-02-01 response: body: string: '' @@ -1110,7 +986,7 @@ interactions: content-length: - '0' date: - - Thu, 27 Aug 2020 07:13:15 GMT + - Fri, 18 Jun 2021 08:51:58 GMT expires: - '-1' pragma: @@ -1137,39 +1013,30 @@ interactions: - maps account list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts?api-version=2021-02-01 response: body: - string: "{\r\n \"value\": []\r\n}" + string: '{"value":[]}' headers: cache-control: - no-cache content-length: - - '19' + - '12' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:13:16 GMT + - Fri, 18 Jun 2021 08:51:59 GMT expires: - '-1' pragma: - no-cache - server: - - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - Accept-Encoding x-content-type-options: @@ -1188,39 +1055,30 @@ interactions: - maps account list Connection: - keep-alive - Content-Type: - - application/json; charset=utf-8 ParameterSetName: - -g User-Agent: - - python/3.8.0 (macOS-10.15-x86_64-i386-64bit) msrest/0.6.18 msrest_azure/0.6.3 - azure-mgmt-maps/0.1.0 Azure-SDK-For-Python AZURECLI/2.11.0 - accept-language: - - en-US + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts?api-version=2018-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.Maps/accounts?api-version=2021-02-01 response: body: - string: "{\r\n \"value\": []\r\n}" + string: '{"value":[]}' headers: cache-control: - no-cache content-length: - - '19' + - '12' content-type: - application/json; charset=utf-8 date: - - Thu, 27 Aug 2020 07:13:18 GMT + - Fri, 18 Jun 2021 08:51:59 GMT expires: - '-1' pragma: - no-cache - server: - - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - Accept-Encoding x-content-type-options: diff --git a/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_maps_creator.yaml b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_maps_creator.yaml new file mode 100644 index 00000000000..0960fbca8bd --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_maps_creator.yaml @@ -0,0 +1,406 @@ +interactions: +- request: + body: '{"location": "global", "sku": {"name": "S1"}, "kind": "Gen1", "properties": + {"disableLocalAuth": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps account create + Connection: + - keep-alive + Content-Length: + - '104' + Content-Type: + - application/json + ParameterSetName: + - -n -g --sku --accept-tos + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004?api-version=2021-02-01 + response: + body: + string: "{\r\n \"kind\": \"Gen1\",\r\n \"type\": \"Microsoft.Maps/accounts\",\r\n + \ \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"properties\": {\r\n \"uniqueId\": \"6b7b00cb-8e1b-4539-97c8-249252a59e5b\",\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"disableLocalAuth\": false\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004\",\r\n + \ \"name\": \"cli-000004\",\r\n \"location\": \"global\",\r\n \"tags\": + {}\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '558' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 05:02:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: '{"location": "westus2", "properties": {"storageUnits": 5}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps creator create + Connection: + - keep-alive + Content-Length: + - '58' + Content-Type: + - application/json + ParameterSetName: + - -n --creator-name -g --storage-units -l + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005?api-version=2021-02-01 + response: + body: + string: '{"type":"Microsoft.Maps/accounts/creators","properties":{"provisioningState":"Created","storageUnits":5},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005","name":"cli-000005","location":"westus2","tags":{}}' + headers: + cache-control: + - no-cache + content-length: + - '401' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 05:02:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-correlation-id: + - d23fb157-023d-44e9-8fab-e7629e27f802 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: '{"tags": {"key-000002": "val-000003"}, "properties": {"storageUnits": 10}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps creator update + Connection: + - keep-alive + Content-Length: + - '74' + Content-Type: + - application/json + ParameterSetName: + - -n --creator-name -g --storage-units --tags + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005?api-version=2021-02-01 + response: + body: + string: '{"error":{"code":"500 InternalServerError","message":"Unknown error + - Unable to update consumption tracking item at this time."}}' + headers: + cache-control: + - no-cache + connection: + - close + content-length: + - '129' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 05:02:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-correlation-id: + - 27fe8f0e-1dbe-4db1-8c6a-6dd8291e5b0c + x-ms-failure-cause: + - service + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 500 + message: Internal Server Error +- request: + body: '{"tags": {"key-000002": "val-000003"}, "properties": {"storageUnits": 10}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps creator update + Connection: + - keep-alive + Content-Length: + - '74' + Content-Type: + - application/json + ParameterSetName: + - -n --creator-name -g --storage-units --tags + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005?api-version=2021-02-01 + response: + body: + string: '{"type":"Microsoft.Maps/accounts/creators","properties":{"provisioningState":"Succeeded","storageUnits":10},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005","name":"cli-000005","location":"westus2","tags":{"key-000002":"val-000003"}}' + headers: + cache-control: + - no-cache + content-length: + - '429' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 05:02: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 + x-correlation-id: + - 2e7e81a8-5a1e-4ba0-87c7-a9588564a61b + x-ms-ratelimit-remaining-subscription-writes: + - '1195' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps creator show + Connection: + - keep-alive + ParameterSetName: + - -n -g --creator-name + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005?api-version=2021-02-01 + response: + body: + string: '{"type":"Microsoft.Maps/accounts/creators","properties":{"provisioningState":"Succeeded","storageUnits":10},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005","name":"cli-000005","location":"westus2","tags":{"key-000002":"val-000003"}}' + headers: + cache-control: + - no-cache + content-length: + - '429' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 05:02:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-correlation-id: + - 5a267714-9936-449f-9b15-b358c5ab6846 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps creator list + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators?api-version=2021-02-01 + response: + body: + string: '{"value":[{"type":"Microsoft.Maps/accounts/creators","properties":{"provisioningState":"Succeeded","storageUnits":10},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005","name":"cli-000005","location":"westus2","tags":{"key-000002":"val-000003"}}],"nextLink":null}' + headers: + cache-control: + - no-cache + content-length: + - '457' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 05:02: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 + x-correlation-id: + - 194f3e49-974e-4921-92a0-b580c6439694 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps creator delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -n --creator-name -g -y + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators/cli-000005?api-version=2021-02-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 22 Jun 2021 05:02:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-correlation-id: + - b610e8c0-d47d-4a68-bcd2-234909342672 + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps creator list + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Maps/accounts/cli-000004/creators?api-version=2021-02-01 + response: + body: + string: '{"value":[],"nextLink":null}' + headers: + cache-control: + - no-cache + content-length: + - '28' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 05:03: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 + x-correlation-id: + - 650ce908-89c8-467f-8ef7-c66bed0a1666 + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_maps_map.yaml b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_maps_map.yaml new file mode 100644 index 00000000000..b2ffb16b19d --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/recordings/test_maps_map.yaml @@ -0,0 +1,254 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - maps map list-operation + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.24.0 azsdk-python-mgmt-maps/2.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.Maps/operations?api-version=2021-02-01 + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"Microsoft.Maps/resourceTypes/read\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"resourceTypes\",\r\n \"operation\": \"Read the provider resourceTypes\",\r\n + \ \"description\": \"Read the provider resourceTypes\"\r\n }\r\n + \ },\r\n {\r\n \"name\": \"Microsoft.Maps/unregister/action\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"unregister\",\r\n \"operation\": \"Unregister provider\",\r\n \"description\": + \"Unregister the Maps provider\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/operations/read\",\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"operations\",\r\n \"operation\": + \"Read the provider operations\",\r\n \"description\": \"Read the provider + operations\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/register/action\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Maps Account\",\r\n \"operation\": \"Register the provider\",\r\n + \ \"description\": \"Register the provider\"\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Microsoft.Maps/accounts/write\",\r\n \"display\": + {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": \"Maps + Account\",\r\n \"operation\": \"Create or update a Maps Account.\",\r\n + \ \"description\": \"Create or update a Maps Account.\"\r\n }\r\n + \ },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/read\",\r\n \"display\": + {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": \"Maps + Account\",\r\n \"operation\": \"Get a Maps Account.\",\r\n \"description\": + \"Get a Maps Account.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/delete\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Maps Account\",\r\n \"operation\": \"Delete a Maps Account.\",\r\n + \ \"description\": \"Delete a Maps Account.\"\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Microsoft.Maps/accounts/listKeys/action\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Maps Account\",\r\n \"operation\": \"List keys\",\r\n \"description\": + \"List Maps Account keys.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/regenerateKey/action\",\r\n \"display\": {\r\n + \ \"provider\": \"Microsoft.Maps\",\r\n \"resource\": \"Maps + Account\",\r\n \"operation\": \"Generate new primary or secondary key\",\r\n + \ \"description\": \"Generate new Maps Account primary or secondary + key.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/eventGridFilters/delete\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Maps Account\",\r\n \"operation\": \"Delete an Event Grid filter\",\r\n + \ \"description\": \"Delete an Event Grid filter.\"\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Microsoft.Maps/accounts/eventGridFilters/read\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Maps Account\",\r\n \"operation\": \"Get an Event Grid filter\",\r\n + \ \"description\": \"Get an Event Grid filter\"\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Microsoft.Maps/accounts/eventGridFilters/write\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Maps Account\",\r\n \"operation\": \"Create or update an Event Grid + filter\",\r\n \"description\": \"Create or update an Event Grid filter.\"\r\n + \ }\r\n },\r\n {\r\n \"origin\": \"system\",\r\n \"properties\": + {\r\n \"serviceSpecification\": {\r\n \"metricSpecifications\": + [\r\n {\r\n \"name\": \"Usage\",\r\n \"displayName\": + \"Usage\",\r\n \"displayDescription\": \"Count of API calls\",\r\n + \ \"internalMetricName\": \"Latency\",\r\n \"unit\": + \"Count\",\r\n \"aggregationType\": \"Count\",\r\n \"supportedAggregationTypes\": + [\r\n \"Count\"\r\n ],\r\n \"sourceMdmAccount\": + \"MicrosoftLocationBasedServicesShoebox\",\r\n \"sourceMdmNamespace\": + \"ServiceOperations\",\r\n \"fillGapWithZero\": false,\r\n \"dimensions\": + [\r\n {\r\n \"name\": \"ApiCategory\",\r\n + \ \"displayName\": \"API Category\",\r\n \"internalName\": + \"Service Category\",\r\n \"toBeExportedToShoebox\": true\r\n + \ },\r\n {\r\n \"name\": \"ApiName\",\r\n + \ \"displayName\": \"API Name\",\r\n \"internalName\": + \"OperationName\",\r\n \"toBeExportedToShoebox\": true\r\n + \ },\r\n {\r\n \"name\": \"ResultType\",\r\n + \ \"displayName\": \"Result Type\",\r\n \"internalName\": + \"OperationResult\",\r\n \"toBeExportedToShoebox\": true\r\n + \ },\r\n {\r\n \"name\": \"ResponseCode\",\r\n + \ \"displayName\": \"Response Code\",\r\n \"internalName\": + \"OperationResultCode\",\r\n \"toBeExportedToShoebox\": true\r\n + \ }\r\n ]\r\n },\r\n {\r\n + \ \"name\": \"Availability\",\r\n \"displayName\": + \"Availability\",\r\n \"displayDescription\": \"Availability + of the APIs\",\r\n \"internalMetricName\": \"Availability\",\r\n + \ \"unit\": \"Percent\",\r\n \"aggregationType\": + \"Average\",\r\n \"supportedAggregationTypes\": [\r\n \"Average\"\r\n + \ ],\r\n \"sourceMdmAccount\": \"MicrosoftLocationBasedServicesShoebox\",\r\n + \ \"sourceMdmNamespace\": \"ServiceOperations\",\r\n \"fillGapWithZero\": + false,\r\n \"dimensions\": [\r\n {\r\n \"name\": + \"ApiCategory\",\r\n \"displayName\": \"API Category\",\r\n + \ \"internalName\": \"Service Category\",\r\n \"toBeExportedToShoebox\": + true\r\n },\r\n {\r\n \"name\": + \"ApiName\",\r\n \"displayName\": \"API Name\",\r\n \"internalName\": + \"OperationName\",\r\n \"toBeExportedToShoebox\": true\r\n + \ }\r\n ]\r\n },\r\n {\r\n + \ \"name\": \"CreatorUsage\",\r\n \"displayName\": + \"Creator Usage\",\r\n \"displayDescription\": \"Azure Maps Creator + usage statistics\",\r\n \"internalMetricName\": \"BytesConsumed\",\r\n + \ \"unit\": \"Bytes\",\r\n \"aggregationType\": \"Average\",\r\n + \ \"lockAggregationType\": \"Total\",\r\n \"supportedAggregationTypes\": + [\r\n \"Average\"\r\n ],\r\n \"sourceMdmAccount\": + \"MicrosoftLocationBasedServicesShoebox\",\r\n \"sourceMdmNamespace\": + \"ServiceOperations\",\r\n \"fillGapWithZero\": false,\r\n \"dimensions\": + [\r\n {\r\n \"name\": \"ServiceName\",\r\n + \ \"displayName\": \"Service Name\",\r\n \"internalName\": + \"CreatorServiceName\",\r\n \"toBeExportedToShoebox\": true\r\n + \ }\r\n ]\r\n }\r\n ]\r\n }\r\n + \ },\r\n \"name\": \"Microsoft.Maps/accounts/providers/Microsoft.Insights/metricDefinitions/read\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"The metric definition of Maps Account\",\r\n \"operation\": \"Read + Maps Account metric definitions\",\r\n \"description\": \"Gets the + available metrics for Maps Accounts\"\r\n }\r\n },\r\n {\r\n \"origin\": + \"system\",\r\n \"name\": \"Microsoft.Maps/accounts/providers/Microsoft.Insights/diagnosticSettings/read\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Maps Account\",\r\n \"operation\": \"Read diagnostic setting\",\r\n + \ \"description\": \"Gets the diagnostic setting for the resource\"\r\n + \ }\r\n },\r\n {\r\n \"origin\": \"system\",\r\n \"name\": + \"Microsoft.Maps/accounts/providers/Microsoft.Insights/diagnosticSettings/write\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Maps Account\",\r\n \"operation\": \"Write diagnostic setting\",\r\n + \ \"description\": \"Creates or updates the diagnostic setting for the + resource\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/render/read\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Render\",\r\n \"operation\": + \"Render Service Read\",\r\n \"description\": \"Allows reading of data + for Render services.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/geolocation/read\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Geolocation\",\r\n \"operation\": + \"Geolocation Service Read\",\r\n \"description\": \"Allows reading + of data for Geolocation services.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/services/mobility/read\",\r\n \"isDataAction\": + true,\r\n \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n + \ \"resource\": \"Mobility\",\r\n \"operation\": \"Mobility Service + Read\",\r\n \"description\": \"Allows reading of data for Mobility + services.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/route/read\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Route\",\r\n \"operation\": + \"Route Service Read\",\r\n \"description\": \"Allows reading of data + for Route services.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/search/read\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Search\",\r\n \"operation\": + \"Search Service Read\",\r\n \"description\": \"Allows reading of data + for Search services.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/timezone/read\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Timezone\",\r\n \"operation\": + \"Timezone Service Read\",\r\n \"description\": \"Allows reading of + data for Timezone services.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/services/traffic/read\",\r\n \"isDataAction\": + true,\r\n \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n + \ \"resource\": \"Traffic\",\r\n \"operation\": \"Traffic Service + Read\",\r\n \"description\": \"Allows reading of data for Traffic services.\"\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/weather/read\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Weather\",\r\n \"operation\": + \"Weather Service Read\",\r\n \"description\": \"Allows reading of + data for Weather services.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/services/data/read\",\r\n \"isDataAction\": + true,\r\n \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n + \ \"resource\": \"Data\",\r\n \"operation\": \"Data Service Read\",\r\n + \ \"description\": \"Allows reading of data for data upload services + and Private Atlas.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/data/delete\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Data\",\r\n \"operation\": + \"Data Service Delete\",\r\n \"description\": \"Allows deleting of + data for data upload services and Private Atlas\"\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Microsoft.Maps/accounts/services/data/write\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Data\",\r\n \"operation\": + \"Data Service Write\",\r\n \"description\": \"Allows writing or updating + of data for data upload services and Private Atlas.\"\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Microsoft.Maps/accounts/services/spatial/read\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Spatial\",\r\n \"operation\": + \"Spatial Service Read\",\r\n \"description\": \"Allows reading of + data for Spatial services.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/services/spatial/write\",\r\n \"isDataAction\": + true,\r\n \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n + \ \"resource\": \"Spatial\",\r\n \"operation\": \"Spatial Service + Write\",\r\n \"description\": \"Allows writing of data for Spatial + services, such as event publishing.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/services/turnbyturn/read\",\r\n \"isDataAction\": + true,\r\n \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n + \ \"resource\": \"TurnByTurn\",\r\n \"operation\": \"TurnByTurn + Service Read\",\r\n \"description\": \"Allows reading of data for TurnByTurn + services.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/elevation/read\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Elevation\",\r\n \"operation\": + \"Elevation Service Read\",\r\n \"description\": \"Allows reading of + data for Elevation services.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/services/dataordering/read\",\r\n \"isDataAction\": + true,\r\n \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n + \ \"resource\": \"DataOrdering\",\r\n \"operation\": \"DataOrdering + Service Read\",\r\n \"description\": \"Allows reading of data for DataOrdering + services.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/dataordering/write\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"DataOrdering\",\r\n \"operation\": + \"DataOrdering Service Write\",\r\n \"description\": \"Allows writing + of data for Data Ordering services.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/services/analytics/read\",\r\n \"isDataAction\": + true,\r\n \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n + \ \"resource\": \"Analytics\",\r\n \"operation\": \"Analytics + Service Read\",\r\n \"description\": \"Allows reading of data for Analytics + services.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/services/analytics/delete\",\r\n + \ \"isDataAction\": true,\r\n \"display\": {\r\n \"provider\": + \"Microsoft.Maps\",\r\n \"resource\": \"Analytics\",\r\n \"operation\": + \"Analytics Service Delete\",\r\n \"description\": \"Allows deleting + of data for Analytic services.\"\r\n }\r\n },\r\n {\r\n \"name\": + \"Microsoft.Maps/accounts/services/analytics/write\",\r\n \"isDataAction\": + true,\r\n \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n + \ \"resource\": \"Analytics\",\r\n \"operation\": \"Analytics + Service Write\",\r\n \"description\": \"Allows writing of data for + Analytic services.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/creators/write\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Creator\",\r\n \"operation\": \"Create or update a Creator.\",\r\n + \ \"description\": \"Create or update a Creator.\"\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Microsoft.Maps/accounts/creators/read\",\r\n \"display\": + {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": \"Creator\",\r\n + \ \"operation\": \"Get a Creator.\",\r\n \"description\": \"Get + a Creator.\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.Maps/accounts/creators/delete\",\r\n + \ \"display\": {\r\n \"provider\": \"Microsoft.Maps\",\r\n \"resource\": + \"Creator\",\r\n \"operation\": \"Delete a Creator.\",\r\n \"description\": + \"Delete a Creator.\"\r\n }\r\n }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '15682' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 22 Jun 2021 04:43:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_commands.py b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_commands.py index 402cae5bb7a..1edeb869577 100644 --- a/src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_commands.py +++ b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_commands.py @@ -6,7 +6,6 @@ import re from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer -from azure.mgmt.maps.models import KeyType class MapsScenarioTests(ScenarioTest): @@ -25,8 +24,8 @@ def test_create_maps_account(self, resource_group): 'sku': 's0', 'skus1': 's1', 'tags': tag_key + '=' + tag_value, - 'key_type_primary': KeyType.primary.value, - 'key_type_secondary': KeyType.secondary.value + 'key_type_primary': 'primary', + 'key_type_secondary': 'secondary' }) # Test 'az maps account create'. @@ -121,10 +120,7 @@ def test_create_maps_account(self, resource_group): # Test 'az maps account key list'. # Test to list keys for a Maps account. - account_key_list = self.cmd('az maps account keys list -n {name} -g {rg}', checks=[ - self.check('id', account['id']), - self.check('resourceGroup', '{rg}') - ]).get_output_in_json() + account_key_list = self.cmd('az maps account keys list -n {name} -g {rg}').get_output_in_json() # Retrieve primary and secondary keys. primary_key_old = account_key_list['primaryKey'] @@ -135,10 +131,7 @@ def test_create_maps_account(self, resource_group): # Test 'az maps account key regenerate'. # Test to change primary and secondary keys for a Maps account. key_regenerated = self.cmd( - 'az maps account keys renew -n {name} -g {rg} --key {key_type_primary}', checks=[ - self.check('id', account['id']), - self.check('resourceGroup', '{rg}') - ]).get_output_in_json() + 'az maps account keys renew -n {name} -g {rg} --key {key_type_primary}').get_output_in_json() # Only primary key was regenerated. Secondary key should remain same. self.assertNotEqual(primary_key_old, key_regenerated['primaryKey']) diff --git a/src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_creator.py b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_creator.py new file mode 100644 index 00000000000..b617114b8e8 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_creator.py @@ -0,0 +1,74 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer +import time + + +class MapsCreatorTest(ScenarioTest): + + @ResourceGroupPreparer(key='rg') + def test_maps_creator(self, resource_group): + tag_key = self.create_random_name(prefix='key-', length=10) + tag_value = self.create_random_name(prefix='val-', length=10) + + self.kwargs.update({ + 'name': self.create_random_name(prefix='cli-', length=20), + 'creator_name': self.create_random_name(prefix='cli-', length=20), + 'sku': 's0', + 'skus1': 's1', + 'storage_units': 5, + 'tags': tag_key + '=' + tag_value, + }) + + self.cmd('az maps account create -n {name} -g {rg} --sku {skus1} --accept-tos') + + creator = self.cmd('az maps creator create -n {name} --creator-name {creator_name}' + ' -g {rg} --storage-units {storage_units} -l westus2', + checks=[ + self.check('name', '{creator_name}'), + self.check('resourceGroup', '{rg}'), + self.check('properties.provisioningState', 'Created'), + self.check('properties.storageUnits', '{storage_units}'), + self.not_exists('tags') + ]).get_output_in_json() + + self.cmd('az maps creator update -n {name} --creator-name {creator_name} -g {rg} --storage-units 10 --tags {tags}', + checks=[ + self.check('properties.provisioningState', 'Succeeded'), + self.check('properties.storageUnits', 10), + self.check('tags', {tag_key: tag_value}) + ]) + + af = self.cmd('az maps creator show -n {name} -g {rg} --creator-name {creator_name}', checks=[ + self.check('id', creator['id']), + self.check('name', '{creator_name}'), + self.check('properties.provisioningState', 'Succeeded'), + self.check('properties.storageUnits', 10), + self.check('resourceGroup', '{rg}'), + self.check('tags', {tag_key: tag_value}) + ]).get_output_in_json() + + self.cmd('az maps creator list -g {rg} -n {name}', checks=[ + self.check('length(@)', 1), + self.check('type(@)', 'array'), + self.check('[0].id', creator['id']), + self.check('[0].name', '{creator_name}'), + self.check('[0].properties.provisioningState', 'Succeeded'), + self.check('[0].properties.storageUnits', 10), + self.check('[0].resourceGroup', '{rg}'), + self.check('[0].tags', {tag_key: tag_value}) + ]).get_output_in_json() + + self.cmd('az maps creator delete -n {name} --creator-name {creator_name} -g {rg} -y') + time.sleep(20) + self.cmd('az maps creator list -n {name} -g {rg}', checks=self.is_empty()) + + @ResourceGroupPreparer(key='rg') + def test_maps_map(self, resource_group): + self.cmd('maps map list-operation', checks=[ + self.check('length(@)!="0"', True) + ]) diff --git a/src/azure-cli/requirements.py3.Darwin.txt b/src/azure-cli/requirements.py3.Darwin.txt index b9a0c850046..d1d4fa86874 100644 --- a/src/azure-cli/requirements.py3.Darwin.txt +++ b/src/azure-cli/requirements.py3.Darwin.txt @@ -56,7 +56,7 @@ azure-mgmt-keyvault==9.0.0 azure-mgmt-kusto==0.3.0 azure-mgmt-loganalytics==8.0.0 azure-mgmt-managementgroups==0.2.0 -azure-mgmt-maps==0.1.0 +azure-mgmt-maps==2.0.0 azure-mgmt-marketplaceordering==1.1.0 azure-mgmt-media==3.0.0 azure-mgmt-monitor==2.0.0 diff --git a/src/azure-cli/requirements.py3.Linux.txt b/src/azure-cli/requirements.py3.Linux.txt index 332bbdc5257..64b63471fe0 100644 --- a/src/azure-cli/requirements.py3.Linux.txt +++ b/src/azure-cli/requirements.py3.Linux.txt @@ -56,7 +56,7 @@ azure-mgmt-keyvault==9.0.0 azure-mgmt-kusto==0.3.0 azure-mgmt-loganalytics==8.0.0 azure-mgmt-managementgroups==0.2.0 -azure-mgmt-maps==0.1.0 +azure-mgmt-maps==2.0.0 azure-mgmt-marketplaceordering==1.1.0 azure-mgmt-media==3.0.0 azure-mgmt-monitor==2.0.0 diff --git a/src/azure-cli/requirements.py3.windows.txt b/src/azure-cli/requirements.py3.windows.txt index ae55d56da7b..e5ea9b8ec19 100644 --- a/src/azure-cli/requirements.py3.windows.txt +++ b/src/azure-cli/requirements.py3.windows.txt @@ -56,7 +56,7 @@ azure-mgmt-keyvault==9.0.0 azure-mgmt-kusto==0.3.0 azure-mgmt-loganalytics==8.0.0 azure-mgmt-managementgroups==0.2.0 -azure-mgmt-maps==0.1.0 +azure-mgmt-maps==2.0.0 azure-mgmt-marketplaceordering==1.1.0 azure-mgmt-media==3.0.0 azure-mgmt-monitor==2.0.0 diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 9ea27078fd0..cf048f020b6 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -99,7 +99,7 @@ 'azure-mgmt-loganalytics~=8.0.0', 'azure-mgmt-managedservices~=1.0', 'azure-mgmt-managementgroups~=0.1', - 'azure-mgmt-maps~=0.1.0', + 'azure-mgmt-maps~=2.0.0', 'azure-mgmt-marketplaceordering==1.1.0', 'azure-mgmt-media~=3.0', 'azure-mgmt-monitor~=2.0.0',