Skip to content

Commit 11e145f

Browse files
committed
Add AutogeneratedDomainNameLabelScope param to create site with DNL endpoints
1 parent f691bc7 commit 11e145f

File tree

4 files changed

+855
-2
lines changed

4 files changed

+855
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def load_arguments(self, _):
166166
c.argument('acr_identity', help='Accept system or user assigned identity which will be set for acr image pull. '
167167
'Use \'[system]\' to refer system assigned identity, or a resource id to refer user assigned identity.')
168168
c.argument('basic_auth', help='Enable or disable basic auth for both SCM and FTP Basic Auth Publishing Credentials. Defaults to Enabled if not specified. See https://aka.ms/app-service-basic-auth to learn more.', arg_type=get_enum_type(BASIC_AUTH_TYPES))
169+
c.argument('auto_generated_domain_name_label_scope', options_list=['--domain-name-scope'], help="Specify the scope of uniqueness for the default hostname during resource creation. ", choices=['TenantReuse', 'SubscriptionReuse', 'ResourceGroupReuse', 'NoReuse'])
169170
c.ignore('language')
170171
c.ignore('using_webapp_up')
171172

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi
115115
multicontainer_config_type=None, multicontainer_config_file=None, tags=None,
116116
using_webapp_up=False, language=None, assign_identities=None,
117117
role='Contributor', scope=None, vnet=None, subnet=None, https_only=False,
118-
public_network_access=None, acr_use_identity=False, acr_identity=None, basic_auth=""):
118+
public_network_access=None, acr_use_identity=False, acr_identity=None, basic_auth="",
119+
auto_generated_domain_name_label_scope=None):
119120
from azure.mgmt.web.models import Site
120121
from azure.core.exceptions import ResourceNotFoundError as _ResourceNotFoundError
121122
SiteConfig, SkuDescription, NameValuePair = cmd.get_models(
@@ -221,7 +222,8 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi
221222

222223
webapp_def = Site(location=location, site_config=site_config, server_farm_id=plan_info.id, tags=tags,
223224
https_only=https_only, virtual_network_subnet_id=subnet_resource_id,
224-
public_network_access=public_network_access, vnet_route_all_enabled=vnet_route_all_enabled)
225+
public_network_access=public_network_access, vnet_route_all_enabled=vnet_route_all_enabled,
226+
auto_generated_domain_name_label_scope=auto_generated_domain_name_label_scope)
225227
if runtime:
226228
runtime = _StackRuntimeHelper.remove_delimiters(runtime)
227229

0 commit comments

Comments
 (0)