Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/azure-cli/azure/cli/command_modules/maps/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def load_arguments(self, _):
with self.argument_context('maps account create') as c:
c.argument('kind', options_list=['--kind'], arg_type=get_enum_type(['Gen1', 'Gen2']),
help='Get or Set Kind property.')
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('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 '
Expand Down
9 changes: 3 additions & 6 deletions src/azure-cli/azure/cli/command_modules/maps/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from knack.prompting import prompt_y_n
from knack.util import CLIError

ACCOUNT_LOCATION = 'global'

logger = get_logger(__name__)


Expand All @@ -18,6 +16,7 @@ def maps_account_create(client,
name,
tags=None,
kind=None,
location=None,
disable_local_auth=None,
linked_resources=None,
type_=None,
Expand All @@ -44,15 +43,13 @@ def maps_account_create(client,
option = prompt_y_n(hint)
if not option:
raise CLIError(client_denied_terms)
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['kind'] = kind or 'Gen2'
maps_account['location'] = location or 'eastus'
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:
Expand Down
Loading