Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ __pycache__/
# Virtual environment
env/
env27/
ienv/
iienv/
iiienv/
vvenv/
venv/
.python-version

Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def default_api_version(self):
ResourceType.MGMT_EVENTHUB: '2022-01-01-preview',
ResourceType.MGMT_MONITOR: None,
ResourceType.MGMT_MSI: '2023-01-31',
ResourceType.MGMT_APPSERVICE: '2023-01-01',
ResourceType.MGMT_APPSERVICE: '2024-04-01',
ResourceType.MGMT_IOTHUB: '2023-06-30-preview',
ResourceType.MGMT_IOTDPS: '2021-10-15',
ResourceType.MGMT_IOTCENTRAL: '2021-11-01-preview',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ def load_arguments(self, _):
help='Enable zone redundancy for high availability. Applies to Flex Consumption SKU only.', is_preview=True)
c.argument('configure_networking_later', options_list=['--configure-networking-later', '--cnl'], arg_type=get_three_state_flag(),
help='Use this option if you want to configure networking later for an app using network-restricted storage.')
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'])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I ask if these valid values can be obtained from Python SDK?


with self.argument_context('functionapp deployment config set') as c:
c.argument('deployment_storage_name', options_list=['--deployment-storage-name', '--dsn'], help="The deployment storage account name.", is_preview=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5232,7 +5232,8 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non
always_ready_instances=None, maximum_instance_count=None, instance_memory=None,
flexconsumption_location=None, deployment_storage_name=None,
deployment_storage_container_name=None, deployment_storage_auth_type=None,
deployment_storage_auth_value=None, zone_redundant=False, configure_networking_later=None):
deployment_storage_auth_value=None, zone_redundant=False, configure_networking_later=None,
auto_generated_domain_name_label_scope=None):
# pylint: disable=too-many-statements, too-many-branches

if functions_version is None and flexconsumption_location is None:
Expand Down Expand Up @@ -5324,7 +5325,8 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non

disable_app_insights = disable_app_insights == "true"

site_config = SiteConfig(app_settings=[])
settings = []
site_config = SiteConfig(app_settings=settings)
Comment on lines 5327 to +5329
Copy link
Copy Markdown
Contributor

@zhoxing-ms zhoxing-ms May 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference in this code change? I don't see that settings being used in the later part

client = web_client_factory(cmd.cli_ctx)

if vnet or subnet:
Expand Down Expand Up @@ -5363,7 +5365,8 @@ def create_functionapp(cmd, resource_group_name, name, storage_account, plan=Non

functionapp_def = Site(location=None, site_config=site_config, tags=tags,
virtual_network_subnet_id=subnet_resource_id, https_only=https_only,
vnet_route_all_enabled=vnet_route_all_enabled)
vnet_route_all_enabled=vnet_route_all_enabled,
auto_generated_domain_name_label_scope=auto_generated_domain_name_label_scope)

plan_info = None
if runtime is not None:
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ interactions:
ParameterSetName:
- -g -n --sku
User-Agent:
- AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0)
- AZURECLI/2.74.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2024-11-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"francecentral","tags":{"product":"azurecli","cause":"automation","test":"test_functionapp_app_service_plan","date":"2025-05-16T03:19:38Z","module":"appservice","DateCreated":"2025-05-16T03:19:43Z","Creator":"test@example.com"},"properties":{"provisioningState":"Succeeded"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"francecentral","tags":{"product":"azurecli","cause":"automation","test":"test_functionapp_app_service_plan","date":"2025-06-11T06:47:58Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
content-length:
- '448'
- '382'
content-type:
- application/json; charset=utf-8
date:
- Fri, 16 May 2025 03:19:44 GMT
- Wed, 11 Jun 2025 06:48:01 GMT
expires:
- '-1'
pragma:
Expand All @@ -39,9 +39,9 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-global-reads:
- '3749'
- '16499'
x-msedge-ref:
- 'Ref A: A2A77CAC46214D31AC0DB4814F17F2C2 Ref B: TYO01EDGE2809 Ref C: 2025-05-16T03:19:43Z'
- 'Ref A: 314327BCA77049CD84E093F0A59A9A4C Ref B: MWH011020806042 Ref C: 2025-06-11T06:48:01Z'
status:
code: 200
message: OK
Expand All @@ -64,24 +64,24 @@ interactions:
ParameterSetName:
- -g -n --sku
User-Agent:
- AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0)
- AZURECLI/2.74.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcappplan000002?api-version=2023-01-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcappplan000002?api-version=2024-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcappplan000002","name":"funcappplan000002","type":"Microsoft.Web/serverfarms","kind":"app","location":"francecentral","properties":{"serverFarmId":107547,"name":"funcappplan000002","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Small","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Small","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-FranceCentralwebspace","subscription":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"France
Central","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"clitest.rg000001","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-par-015_107547","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-05-16T03:19:51.1066667","asyncScalingEnabled":null},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcappplan000002","name":"funcappplan000002","type":"Microsoft.Web/serverfarms","kind":"app","location":"francecentral","properties":{"serverFarmId":107824,"name":"funcappplan000002","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Small","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Small","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-FranceCentralwebspace","subscription":"2819c8c8-a774-4ac9-bf91-8bb8f1f47ece","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"France
Central","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"clitest.rg000001","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-par-015_107824","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"maximumNumberOfZones":1,"currentNumberOfZonesUtilized":1,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-06-11T06:48:08.2033333","asyncScalingEnabled":false},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}'
headers:
cache-control:
- no-cache
content-length:
- '1648'
- '1707'
content-type:
- application/json
date:
- Fri, 16 May 2025 03:19:56 GMT
- Wed, 11 Jun 2025 06:48:12 GMT
etag:
- '"1DBC6116364F7AB"'
- '"1DBDA9CCB2A5F2B"'
expires:
- '-1'
pragma:
Expand All @@ -95,13 +95,13 @@ interactions:
x-content-type-options:
- nosniff
x-ms-operation-identifier:
- tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japanwest/7e16e20f-9cab-47eb-a27a-5ca0bf469fe6
- tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=bd30bf6a-f200-4cfd-bcd6-a339b0d9dbe8/westus2/d161181e-c2fc-4231-b8d7-0ee4625db73a
x-ms-ratelimit-remaining-subscription-global-writes:
- '2999'
- '12000'
x-ms-ratelimit-remaining-subscription-writes:
- '199'
- '800'
x-msedge-ref:
- 'Ref A: 6E88E3FB42B149DB9B76B8E9443F089D Ref B: TYO01EDGE0816 Ref C: 2025-05-16T03:19:45Z'
- 'Ref A: 6F0B0C46B7E2435AB3ADF6C0EE2C2FAD Ref B: MWH011020808054 Ref C: 2025-06-11T06:48:01Z'
x-powered-by:
- ASP.NET
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ interactions:
ParameterSetName:
- -g -n --sku --is-linux
User-Agent:
- AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0)
- AZURECLI/2.74.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2024-11-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"ukwest","tags":{"product":"azurecli","cause":"automation","test":"test_functionapp_app_service_plan_linux","date":"2025-05-16T03:25:04Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"ukwest","tags":{"product":"azurecli","cause":"automation","test":"test_functionapp_app_service_plan_linux","date":"2025-06-11T06:48:59Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
Expand All @@ -27,7 +27,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 16 May 2025 03:25:10 GMT
- Wed, 11 Jun 2025 06:49:02 GMT
expires:
- '-1'
pragma:
Expand All @@ -39,9 +39,9 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-global-reads:
- '3749'
- '16499'
x-msedge-ref:
- 'Ref A: C309C0E11E7F4A23A1F88B14EB10FEB5 Ref B: TYO201100116053 Ref C: 2025-05-16T03:25:10Z'
- 'Ref A: 574C37FA48624FBF964A981535691497 Ref B: MWH011020807062 Ref C: 2025-06-11T06:49:03Z'
status:
code: 200
message: OK
Expand All @@ -65,24 +65,24 @@ interactions:
ParameterSetName:
- -g -n --sku --is-linux
User-Agent:
- AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0)
- AZURECLI/2.74.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcappplan000002?api-version=2023-01-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcappplan000002?api-version=2024-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcappplan000002","name":"funcappplan000002","type":"Microsoft.Web/serverfarms","kind":"linux","location":"ukwest","properties":{"serverFarmId":19038,"name":"funcappplan000002","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Small","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Small","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-UKWestwebspace-Linux","subscription":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"UK
West","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"clitest.rg000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-cw1-033_19038","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-05-16T03:25:16.29","asyncScalingEnabled":false},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/funcappplan000002","name":"funcappplan000002","type":"Microsoft.Web/serverfarms","kind":"linux","location":"ukwest","properties":{"serverFarmId":53078,"name":"funcappplan000002","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Small","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Small","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-UKWestwebspace-Linux","subscription":"2819c8c8-a774-4ac9-bf91-8bb8f1f47ece","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"UK
West","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"clitest.rg000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-cw1-017_53078","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"maximumNumberOfZones":1,"currentNumberOfZonesUtilized":1,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-06-11T06:49:07.64","asyncScalingEnabled":false},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}'
headers:
cache-control:
- no-cache
content-length:
- '1630'
- '1688'
content-type:
- application/json
date:
- Fri, 16 May 2025 03:25:19 GMT
- Wed, 11 Jun 2025 06:49:11 GMT
etag:
- '"1DBC61225306080"'
- '"1DBDA9CEE0C52E0"'
expires:
- '-1'
pragma:
Expand All @@ -96,13 +96,13 @@ interactions:
x-content-type-options:
- nosniff
x-ms-operation-identifier:
- tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=d44a2991-98c6-47c3-b59b-2b30d72cfcc2/japaneast/43963fd4-35b4-4381-84e8-b36845f46870
- tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47,objectId=bd30bf6a-f200-4cfd-bcd6-a339b0d9dbe8/southcentralus/98dd868e-c13b-410b-844b-241b96961159
x-ms-ratelimit-remaining-subscription-global-writes:
- '2999'
- '12000'
x-ms-ratelimit-remaining-subscription-writes:
- '199'
- '800'
x-msedge-ref:
- 'Ref A: 827931E022F840CE8119B04FB75137BF Ref B: TYO201100114033 Ref C: 2025-05-16T03:25:11Z'
- 'Ref A: C3AFEAA408AD4092A6EF39FAB8D6BBEE Ref B: MWH011020807023 Ref C: 2025-06-11T06:49:03Z'
x-powered-by:
- ASP.NET
status:
Expand Down
Loading
Loading