Skip to content

Commit 1f3aa3a

Browse files
[Maps] Onboard Maps to Private Link. Update SKU and Location parameters.
1 parent bc65de1 commit 1f3aa3a

File tree

8 files changed

+4183
-1207
lines changed

8 files changed

+4183
-1207
lines changed

src/azure-cli/azure/cli/command_modules/maps/_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def load_arguments(self, _):
4646
with self.argument_context('maps account create') as c:
4747
c.argument('kind', options_list=['--kind'], arg_type=get_enum_type(['Gen1', 'Gen2']),
4848
help='Get or Set Kind property.')
49+
c.argument('location', options_list=['--location', '-l'], arg_type=get_location_type(self.cli_ctx),
50+
required=False, validator=get_default_location_from_resource_group)
4951
c.argument('disable_local_auth', options_list=['--disable-local-auth'], arg_type=get_three_state_flag(),
5052
help='Allows toggle functionality on Azure '
5153
'Policy to disable Azure Maps local authentication support. This will disable Shared Keys '

src/azure-cli/azure/cli/command_modules/maps/custom.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from knack.prompting import prompt_y_n
88
from knack.util import CLIError
99

10-
ACCOUNT_LOCATION = 'global'
11-
1210
logger = get_logger(__name__)
1311

1412

@@ -18,6 +16,7 @@ def maps_account_create(client,
1816
name,
1917
tags=None,
2018
kind=None,
19+
location=None,
2120
disable_local_auth=None,
2221
linked_resources=None,
2322
type_=None,
@@ -44,15 +43,13 @@ def maps_account_create(client,
4443
option = prompt_y_n(hint)
4544
if not option:
4645
raise CLIError(client_denied_terms)
47-
if kind is None:
48-
kind = "Gen1"
4946
if disable_local_auth is None:
5047
disable_local_auth = False
5148
maps_account = {}
5249
if tags is not None:
5350
maps_account['tags'] = tags
54-
maps_account['location'] = ACCOUNT_LOCATION
55-
maps_account['kind'] = "Gen1" if kind is None else kind
51+
maps_account['kind'] = kind or 'Gen2'
52+
maps_account['location'] = location or 'eastus'
5653
maps_account['properties'] = {}
5754
maps_account['properties']['disable_local_auth'] = False if disable_local_auth is None else disable_local_auth
5855
if linked_resources is not None:

0 commit comments

Comments
 (0)