From e34d5f4d84dfa87ee1b1d18f640886d5fb9da9d7 Mon Sep 17 00:00:00 2001 From: OGFTestPipeline Date: Wed, 22 Jan 2025 14:30:41 +0530 Subject: [PATCH 1/8] init --- .../azure/cli/command_modules/appservice/_params.py | 3 +++ .../azure/cli/command_modules/appservice/commands.py | 4 ++++ src/azure-cli/azure/cli/command_modules/appservice/custom.py | 5 +++++ src/azure-cli/requirements.py3.Darwin.txt | 2 +- src/azure-cli/requirements.py3.Linux.txt | 2 +- src/azure-cli/requirements.py3.windows.txt | 2 +- src/azure-cli/setup.py | 2 +- 7 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index a5b964efeed..1028320f40a 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -172,6 +172,9 @@ def load_arguments(self, _): c.ignore('language') c.ignore('using_webapp_up') + with self.argument.context("webapp sitecontainers") as c: + c.argument("update", help='Update sitecontainers for a linux webapp') + with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/commands.py b/src/azure-cli/azure/cli/command_modules/appservice/commands.py index 73646fcca04..577844fe6bf 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/commands.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/commands.py @@ -141,6 +141,10 @@ def load_command_table(self, _): g.custom_command('deploy', 'perform_onedeploy_webapp', validator=validate_onedeploy_params) g.generic_update_command('update', getter_name='get_webapp', setter_name='set_webapp', custom_func_name='update_webapp', command_type=appservice_custom) + + with self.command_group('webapp sitecontainers') as g: + g.custom_command('create', 'create_webapp_sitecontainers') + g.custom_command('update', 'update_webapp_sitecontainers') with self.command_group('webapp traffic-routing') as g: g.custom_command('set', 'set_traffic_routing') diff --git a/src/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index ae35288abc3..72533c7d5f7 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -991,6 +991,11 @@ def progress_callback(current, total): raise ex +def update_webapp_sitecontainers(cmd, name, resource_group_name, container_name, image, target_port, startup_cmd=None, env_vars =None , is_main=False, system_assigned_identity=None, user_assigned_identity=None, registry_username=None, registry_password=None, + sitecontainer_spec_file=None): + + + # for generic updater def get_webapp(cmd, resource_group_name, name, slot=None): return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) diff --git a/src/azure-cli/requirements.py3.Darwin.txt b/src/azure-cli/requirements.py3.Darwin.txt index 5a593fc4324..aeda3ab8d44 100644 --- a/src/azure-cli/requirements.py3.Darwin.txt +++ b/src/azure-cli/requirements.py3.Darwin.txt @@ -79,7 +79,7 @@ azure-mgmt-sqlvirtualmachine==1.0.0b5 azure-mgmt-storage==21.2.0 azure-mgmt-synapse==2.1.0b5 azure-mgmt-trafficmanager==1.0.0 -azure-mgmt-web==7.2.0 +azure-mgmt-web==7.3.1 azure-monitor-query==1.2.0 azure-multiapi-storage==1.3.0 azure-nspkg==3.0.2 diff --git a/src/azure-cli/requirements.py3.Linux.txt b/src/azure-cli/requirements.py3.Linux.txt index afd364769e4..15acabec09d 100644 --- a/src/azure-cli/requirements.py3.Linux.txt +++ b/src/azure-cli/requirements.py3.Linux.txt @@ -79,7 +79,7 @@ azure-mgmt-sqlvirtualmachine==1.0.0b5 azure-mgmt-storage==21.2.0 azure-mgmt-synapse==2.1.0b5 azure-mgmt-trafficmanager==1.0.0 -azure-mgmt-web==7.2.0 +azure-mgmt-web==7.3.1 azure-monitor-query==1.2.0 azure-multiapi-storage==1.3.0 azure-nspkg==3.0.2 diff --git a/src/azure-cli/requirements.py3.windows.txt b/src/azure-cli/requirements.py3.windows.txt index 6ade9e11482..49779c101e5 100644 --- a/src/azure-cli/requirements.py3.windows.txt +++ b/src/azure-cli/requirements.py3.windows.txt @@ -79,7 +79,7 @@ azure-mgmt-sqlvirtualmachine==1.0.0b5 azure-mgmt-storage==21.2.0 azure-mgmt-synapse==2.1.0b5 azure-mgmt-trafficmanager==1.0.0 -azure-mgmt-web==7.2.0 +azure-mgmt-web==7.3.1 azure-monitor-query==1.2.0 azure-multiapi-storage==1.3.0 azure-nspkg==3.0.2 diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 13d34b97228..c81320d05c0 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -122,7 +122,7 @@ 'azure-mgmt-storage==21.2.0', 'azure-mgmt-synapse==2.1.0b5', 'azure-mgmt-trafficmanager~=1.0.0', - 'azure-mgmt-web==7.2.0', + 'azure-mgmt-web==7.3.1', 'azure-monitor-query==1.2.0', 'azure-multiapi-storage~=1.3.0', 'azure-storage-common~=1.4', From d60bd218ddb316636f230bc7a9541d51f7ef3ac4 Mon Sep 17 00:00:00 2001 From: OGFTestPipeline Date: Sun, 2 Feb 2025 23:51:44 +0530 Subject: [PATCH 2/8] add other commands --- .../cli/command_modules/appservice/_help.py | 10 ++ .../cli/command_modules/appservice/_params.py | 4 +- .../command_modules/appservice/commands.py | 5 +- .../cli/command_modules/appservice/custom.py | 120 +++++++++++++++++- 4 files changed, 134 insertions(+), 5 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_help.py b/src/azure-cli/azure/cli/command_modules/appservice/_help.py index f9bd20bd9a8..2369eb73748 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_help.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_help.py @@ -2207,6 +2207,16 @@ crafted: true """ +helps['webapp sitecontainers create'] = """ +type: command +short-summary: Create sitecontainers for a linux webapp +examples: + - name: Create sitecontainers for a linux webapp (autogenerated) + text: az webapp sitecontaienrs create --name MyWebApp --resource-group MyResourceGroup + crafted: true +""" + + helps['webapp up'] = """ type: command short-summary: > diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index 1028320f40a..962fe4ae057 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -172,8 +172,8 @@ def load_arguments(self, _): c.ignore('language') c.ignore('using_webapp_up') - with self.argument.context("webapp sitecontainers") as c: - c.argument("update", help='Update sitecontainers for a linux webapp') + with self.argument_context("webapp sitecontainers") as c: + c.argument("create", help='Create sitecontainers for a linux webapp') with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/commands.py b/src/azure-cli/azure/cli/command_modules/appservice/commands.py index 577844fe6bf..e9c16ce73d6 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/commands.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/commands.py @@ -144,7 +144,10 @@ def load_command_table(self, _): with self.command_group('webapp sitecontainers') as g: g.custom_command('create', 'create_webapp_sitecontainers') - g.custom_command('update', 'update_webapp_sitecontainers') + g.custom_command('update', 'update_webapp_sitecontainer') + g.custom_command('delete', 'delete_webapp_sitecontainer') + g.custom_command('show', 'get_webapp_sitecontainer') + g.custom_command('list', 'list_webapp_sitecontainers') with self.command_group('webapp traffic-routing') as g: g.custom_command('set', 'set_traffic_routing') diff --git a/src/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index 72533c7d5f7..be6d3ad7899 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -4,6 +4,7 @@ # -------------------------------------------------------------------------------------------- import ast +import os import threading import time import re @@ -37,6 +38,9 @@ from azure.mgmt.storage import StorageManagementClient from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient from azure.mgmt.web.models import KeyInfo +from azure.mgmt.web.models import SiteContainer +from azure.mgmt.web.models import AuthType +from azure.mgmt.web import WebSiteManagementClient from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.commands import LongRunningOperation @@ -991,10 +995,122 @@ def progress_callback(current, total): raise ex -def update_webapp_sitecontainers(cmd, name, resource_group_name, container_name, image, target_port, startup_cmd=None, env_vars =None , is_main=False, system_assigned_identity=None, user_assigned_identity=None, registry_username=None, registry_password=None, - sitecontainer_spec_file=None): +def create_webapp_sitecontainers(cmd, name, resource_group, container_name, image, target_port, slot=None, startup_cmd=None , is_main=False, system_assigned_identity=False, user_assigned_identity=None, registry_username=None, registry_password=None, + sitecontainers_spec_file=None): + # verify if site is a linux site + client = web_client_factory(cmd.cli_ctx) + app = client.web_apps.get(resource_group, name) + if not is_linux_webapp(app): + raise ValidationError("Site is not a linux webapp. Sitecontainers are only supported for linux webapps.") + response = None + + # check if sitecontainers_spec_file is provided + if sitecontainers_spec_file is not None: + sitecontainers = None + response = [] + logger.warning("Using sitecontainer spec file to create sitecontainer(s)") + if not os.path.exists(sitecontainers_spec_file): + raise ValidationError("The sitecontainer spec file does not exist at the path '{}'".format(sitecontainers_spec_file)) + with open(sitecontainers_spec_file, 'r') as file: + sitecontainers_spec = json.load(file) + if not isinstance(sitecontainers_spec, list): + raise ValidationError("The sitecontainer spec file should contain a list of sitecontainers.") + try: + sitecontainers = [SiteContainer(**container) for container in sitecontainers_spec] + except Exception as ex: + raise ValidationError("Failed to parse the sitecontainer spec file. Error: {}".format(str(ex))) + if sitecontainers is None or len(sitecontainers) == 0: + raise ValidationError("No sitecontainers found in the sitecontainers spec file.") + for sitecontainer in sitecontainers: + # Todo : SiteContainer model does not have container_name + response.append(_create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, sitecontainer, slot)) + else: + auth_type = AuthType.ANONYMOUS + if system_assigned_identity is True: + auth_type = AuthType.SYSTEM_IDENTITY + elif user_assigned_identity: + auth_type = AuthType.USER_ASSIGNED + elif registry_username and registry_password: + auth_type = AuthType.USER_CREDENTIALS + + sitecontainer = SiteContainer(image=image, target_port=target_port, start_up_command=startup_cmd, is_main=is_main, auth_type=auth_type, user_name = registry_username, password_secret = registry_password, user_managed_identity_client_id=user_assigned_identity) + response = _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, sitecontainer, slot) + return response + +def _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, sitecontainer, slot=None): + web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps + response = None + if slot: + response = web_client.create_or_update_site_container_slot(resource_group, name, slot, container_name, sitecontainer) + else: + response = web_client.create_or_update_site_container(resource_group, name, container_name, sitecontainer) + return response + +def update_webapp_sitecontainer(cmd, name, resource_group, container_name, image=None, target_port=None, slot=None, startup_cmd=None, is_main=None, system_assigned_identity=None, user_assigned_identity=None, registry_username=None, registry_password=None): + # get the sitecontainer + site_container = None + try: + site_container = get_webapp_sitecontainer(cmd, name, resource_group, container_name, slot) + except: + raise ValidationError("Sitecontainer '{}' does not exist, failed to update the sitecontainer.".format(container_name)) + # update only the provided parameters + if image is not None: + site_container.image = image + if target_port is not None: + site_container.target_port = target_port + if startup_cmd is not None: + site_container.start_up_command = startup_cmd + if is_main is not None: + site_container.is_main = is_main + if system_assigned_identity is not None: + site_container.auth_type = AuthType.SYSTEM_IDENTITY + if user_assigned_identity is not None: + site_container.auth_type = AuthType.USER_ASSIGNED + site_container.user_managed_identity_client_id = user_assigned_identity + if registry_username is not None and registry_password is not None: + site_container.auth_type = AuthType.USER_CREDENTIALS + site_container.user_name = registry_username + site_container.password_secret = registry_password + response = _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, site_container, slot) + return response + +def get_webapp_sitecontainer(cmd, name, resource_group, container_name, slot=None): + web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps + site_container = None + if slot: + site_container = web_client.get_site_container_slot(resource_group, name, container_name, slot) + else: + site_container = web_client.get_site_container(resource_group, name, container_name) + return site_container + + +def delete_webapp_sitecontainer(cmd, name, resource_group, container_name, slot=None): + web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps + response = None + if slot: + response = web_client.delete_site_container_slot(resource_group, name, container_name, slot, cls=lambda x, y, z: x) + else: + response = web_client.delete_site_container(resource_group, name, container_name, cls=lambda x, y, z: x) + if response is not None and response.http_response.status_code in (200, 204): + # TODO: Validate deleteion via response status code once api bug is fixed, + # Status 200 -> container existed and was deleted successfully + # Status 204 -> container does not exist + logger.warning("Sitecontainer '{}' was deleted successfully.".format(container_name)) + else: + logger.error("Failed to delete sitecontainer '{}'.".format(container_name)) + return response + + +def list_webapp_sitecontainers(cmd, name, resource_group, slot=None): + web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps + site_containers = None + if slot: + site_containers = web_client.list_site_containers_slot(resource_group, name, slot) + else: + site_containers = web_client.list_site_containers(resource_group, name) + return site_containers # for generic updater def get_webapp(cmd, resource_group_name, name, slot=None): From 1b26e036a1c94022811247f01cebeba5c0e3f150 Mon Sep 17 00:00:00 2001 From: OGFTestPipeline Date: Tue, 4 Feb 2025 23:32:59 +0530 Subject: [PATCH 3/8] add other commands --- .../cli/command_modules/appservice/_params.py | 2 + .../command_modules/appservice/commands.py | 2 + .../cli/command_modules/appservice/custom.py | 64 +++++++++++++++---- 3 files changed, 57 insertions(+), 11 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index 962fe4ae057..60cc5d7ea74 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -174,6 +174,8 @@ def load_arguments(self, _): with self.argument_context("webapp sitecontainers") as c: c.argument("create", help='Create sitecontainers for a linux webapp') + c.argument("is_main", help="If true, this sitecontainer becomes the primary sitecontainer receiving frontend traffic.", + arg_type=get_three_state_flag() ) with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/commands.py b/src/azure-cli/azure/cli/command_modules/appservice/commands.py index e9c16ce73d6..0c42d7ccba7 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/commands.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/commands.py @@ -148,6 +148,8 @@ def load_command_table(self, _): g.custom_command('delete', 'delete_webapp_sitecontainer') g.custom_command('show', 'get_webapp_sitecontainer') g.custom_command('list', 'list_webapp_sitecontainers') + g.custom_command('status', 'get_webapp_sitecontainers_status') + g.custom_command('logs', 'get_webapp_sitecontainer_logs') with self.command_group('webapp traffic-routing') as g: g.custom_command('set', 'set_traffic_routing') diff --git a/src/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index be6d3ad7899..424c57971c8 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -994,8 +994,22 @@ def progress_callback(current, total): if ex.response.status_code != 200: raise ex - -def create_webapp_sitecontainers(cmd, name, resource_group, container_name, image, target_port, slot=None, startup_cmd=None , is_main=False, system_assigned_identity=False, user_assigned_identity=None, registry_username=None, registry_password=None, +class SiteContainerSpec: + # Todo add summary and types + def __init__(self, name, image, target_port, is_main, start_up_command=None, auth_type=None, user_name=None, password_secret=None, user_managed_identity_client_id=None, volume_mounts=None, environment_variables=None): + self.name = name + self.image = image + self.target_port = target_port + self.is_main = is_main + self.start_up_command = start_up_command + self.auth_type = auth_type + self.user_name = user_name + self.password_secret = password_secret + self.user_managed_identity_client_id = user_managed_identity_client_id + self.volume_mounts = volume_mounts + self.environment_variables = environment_variables + +def create_webapp_sitecontainers(cmd, name, resource_group, container_name=None, image=None, target_port=None, slot=None, startup_cmd=None , is_main=None, system_assigned_identity=None, user_assigned_identity=None, registry_username=None, registry_password=None, sitecontainers_spec_file=None): # verify if site is a linux site client = web_client_factory(cmd.cli_ctx) @@ -1006,26 +1020,28 @@ def create_webapp_sitecontainers(cmd, name, resource_group, container_name, imag # check if sitecontainers_spec_file is provided if sitecontainers_spec_file is not None: - sitecontainers = None + sitecontainers_spec = None response = [] logger.warning("Using sitecontainer spec file to create sitecontainer(s)") if not os.path.exists(sitecontainers_spec_file): raise ValidationError("The sitecontainer spec file does not exist at the path '{}'".format(sitecontainers_spec_file)) with open(sitecontainers_spec_file, 'r') as file: - sitecontainers_spec = json.load(file) - if not isinstance(sitecontainers_spec, list): + sitecontainers_spec_json = json.load(file) + if not isinstance(sitecontainers_spec_json, list): raise ValidationError("The sitecontainer spec file should contain a list of sitecontainers.") try: - sitecontainers = [SiteContainer(**container) for container in sitecontainers_spec] + sitecontainers_spec = [SiteContainerSpec(**container) for container in sitecontainers_spec_json] except Exception as ex: raise ValidationError("Failed to parse the sitecontainer spec file. Error: {}".format(str(ex))) - if sitecontainers is None or len(sitecontainers) == 0: + if sitecontainers_spec is None or len(sitecontainers_spec) == 0: raise ValidationError("No sitecontainers found in the sitecontainers spec file.") - for sitecontainer in sitecontainers: - # Todo : SiteContainer model does not have container_name - response.append(_create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, sitecontainer, slot)) + for spec in sitecontainers_spec: + sitecontainer = SiteContainer(image=spec.image, target_port=spec.target_port, start_up_command=spec.start_up_command, is_main=spec.is_main, auth_type=spec.auth_type, user_name=spec.user_name, password_secret=spec.password_secret, user_managed_identity_client_id=spec.user_managed_identity_client_id, volume_mounts=spec.volume_mounts, environment_variables=spec.environment_variables) + response.append(_create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, spec.name, sitecontainer, slot)) else: + if container_name is None or image is None or target_port is None: + raise ValidationError("The following arguments are required if argument --sitecontainers-spec-file is not provided: --container-name, --image, --target-port") auth_type = AuthType.ANONYMOUS if system_assigned_identity is True: auth_type = AuthType.SYSTEM_IDENTITY @@ -1094,7 +1110,7 @@ def delete_webapp_sitecontainer(cmd, name, resource_group, container_name, slot= else: response = web_client.delete_site_container(resource_group, name, container_name, cls=lambda x, y, z: x) if response is not None and response.http_response.status_code in (200, 204): - # TODO: Validate deleteion via response status code once api bug is fixed, + # TODO: Validate deletion via response status code once api bug is fixed, # Status 200 -> container existed and was deleted successfully # Status 204 -> container does not exist logger.warning("Sitecontainer '{}' was deleted successfully.".format(container_name)) @@ -1112,6 +1128,32 @@ def list_webapp_sitecontainers(cmd, name, resource_group, slot=None): site_containers = web_client.list_site_containers(resource_group, name) return site_containers + +def get_webapp_sitecontainers_status(cmd, name, resource_group, container_name=None, slot=None): + import requests + scm_url = _get_scm_url(cmd, resource_group, name, slot) + site_container_status_url = scm_url + '/api/sitecontainers/' + (container_name if container_name is not None else "") + headers = get_scm_site_headers(cmd.cli_ctx, name, resource_group, slot) + try: + response = requests.get(site_container_status_url, headers=headers) + return response.json() + except Exception as ex: + raise CLIError("Failed to fetch sitecontainer status. Error: {}".format(str(ex))) + +def get_webapp_sitecontainer_logs(cmd, name, resource_group, container_name, slot=None): + import requests + scm_url = _get_scm_url(cmd, resource_group, name, slot) + site_container_logs_url = scm_url + '/api/sitecontainers/' + container_name + '/logs' + headers = get_scm_site_headers(cmd.cli_ctx, name, resource_group, slot) + try: + t = threading.Thread(target=_get_log, args=(site_container_logs_url, headers)) + t.daemon = True + t.start() + while True: + time.sleep(100) # so that ctrl+c can stop the command + except Exception as ex: + raise CLIError("Failed to fetch sitecontainer logs. Error: {}".format(str(ex))) + # for generic updater def get_webapp(cmd, resource_group_name, name, slot=None): return _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot) From a0edbb594a32d3db1427a6af74da481822d0d0b5 Mon Sep 17 00:00:00 2001 From: OGFTestPipeline Date: Wed, 5 Feb 2025 23:48:54 +0530 Subject: [PATCH 4/8] linting and exceptions --- .../cli/command_modules/appservice/_help.py | 2 +- .../cli/command_modules/appservice/_params.py | 2 +- .../command_modules/appservice/commands.py | 2 +- .../cli/command_modules/appservice/custom.py | 141 ++++++++++++------ 4 files changed, 96 insertions(+), 51 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_help.py b/src/azure-cli/azure/cli/command_modules/appservice/_help.py index 2369eb73748..058866021e9 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_help.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_help.py @@ -2212,7 +2212,7 @@ short-summary: Create sitecontainers for a linux webapp examples: - name: Create sitecontainers for a linux webapp (autogenerated) - text: az webapp sitecontaienrs create --name MyWebApp --resource-group MyResourceGroup + text: az webapp sitecontaienrs create --name MyWebApp --resource-group MyResourceGroup crafted: true """ diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index 60cc5d7ea74..e572e9df207 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -175,7 +175,7 @@ def load_arguments(self, _): with self.argument_context("webapp sitecontainers") as c: c.argument("create", help='Create sitecontainers for a linux webapp') c.argument("is_main", help="If true, this sitecontainer becomes the primary sitecontainer receiving frontend traffic.", - arg_type=get_three_state_flag() ) + arg_type=get_three_state_flag()) with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/commands.py b/src/azure-cli/azure/cli/command_modules/appservice/commands.py index 0c42d7ccba7..d9adf92daa9 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/commands.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/commands.py @@ -141,7 +141,7 @@ def load_command_table(self, _): g.custom_command('deploy', 'perform_onedeploy_webapp', validator=validate_onedeploy_params) g.generic_update_command('update', getter_name='get_webapp', setter_name='set_webapp', custom_func_name='update_webapp', command_type=appservice_custom) - + with self.command_group('webapp sitecontainers') as g: g.custom_command('create', 'create_webapp_sitecontainers') g.custom_command('update', 'update_webapp_sitecontainer') diff --git a/src/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index 424c57971c8..7b8178f6d13 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -4,7 +4,6 @@ # -------------------------------------------------------------------------------------------- import ast -import os import threading import time import re @@ -994,9 +993,15 @@ def progress_callback(current, total): if ex.response.status_code != 200: raise ex + class SiteContainerSpec: - # Todo add summary and types - def __init__(self, name, image, target_port, is_main, start_up_command=None, auth_type=None, user_name=None, password_secret=None, user_managed_identity_client_id=None, volume_mounts=None, environment_variables=None): + # pylint: disable=too-many-instance-attributes,too-few-public-methods + from azure.mgmt.web.models import VolumeMount, EnvironmentVariable + + def __init__(self, name: str, image: str, target_port: str, is_main: bool, start_up_command: str = None, + auth_type: str = None, user_name: str = None, password_secret: str = None, + user_managed_identity_client_id: str = None, volume_mounts: list[VolumeMount] = None, + environment_variables: list[EnvironmentVariable] = None): self.name = name self.image = image self.target_port = target_port @@ -1009,8 +1014,12 @@ def __init__(self, name, image, target_port, is_main, start_up_command=None, aut self.volume_mounts = volume_mounts self.environment_variables = environment_variables -def create_webapp_sitecontainers(cmd, name, resource_group, container_name=None, image=None, target_port=None, slot=None, startup_cmd=None , is_main=None, system_assigned_identity=None, user_assigned_identity=None, registry_username=None, registry_password=None, - sitecontainers_spec_file=None): + +def create_webapp_sitecontainers(cmd, name, resource_group, container_name=None, image=None, target_port=None, + slot=None, startup_cmd=None, is_main=None, system_assigned_identity=None, + user_assigned_identity=None, registry_username=None, + registry_password=None, sitecontainers_spec_file=None): + import os # verify if site is a linux site client = web_client_factory(cmd.cli_ctx) app = client.web_apps.get(resource_group, name) @@ -1019,12 +1028,12 @@ def create_webapp_sitecontainers(cmd, name, resource_group, container_name=None, response = None # check if sitecontainers_spec_file is provided - if sitecontainers_spec_file is not None: - sitecontainers_spec = None + if sitecontainers_spec_file: response = [] logger.warning("Using sitecontainer spec file to create sitecontainer(s)") if not os.path.exists(sitecontainers_spec_file): - raise ValidationError("The sitecontainer spec file does not exist at the path '{}'".format(sitecontainers_spec_file)) + raise ValidationError("The sitecontainer spec file does not exist at the path '{}'" + .format(sitecontainers_spec_file)) with open(sitecontainers_spec_file, 'r') as file: sitecontainers_spec_json = json.load(file) if not isinstance(sitecontainers_spec_json, list): @@ -1036,12 +1045,19 @@ def create_webapp_sitecontainers(cmd, name, resource_group, container_name=None, if sitecontainers_spec is None or len(sitecontainers_spec) == 0: raise ValidationError("No sitecontainers found in the sitecontainers spec file.") for spec in sitecontainers_spec: - sitecontainer = SiteContainer(image=spec.image, target_port=spec.target_port, start_up_command=spec.start_up_command, is_main=spec.is_main, auth_type=spec.auth_type, user_name=spec.user_name, password_secret=spec.password_secret, user_managed_identity_client_id=spec.user_managed_identity_client_id, volume_mounts=spec.volume_mounts, environment_variables=spec.environment_variables) - response.append(_create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, spec.name, sitecontainer, slot)) - + sitecontainer = SiteContainer(image=spec.image, target_port=spec.target_port, + start_up_command=spec.start_up_command, + is_main=spec.is_main, auth_type=spec.auth_type, user_name=spec.user_name, + password_secret=spec.password_secret, + user_managed_identity_client_id=spec.user_managed_identity_client_id, + volume_mounts=spec.volume_mounts, + environment_variables=spec.environment_variables) + response.append(_create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, + spec.name, sitecontainer, slot)) else: if container_name is None or image is None or target_port is None: - raise ValidationError("The following arguments are required if argument --sitecontainers-spec-file is not provided: --container-name, --image, --target-port") + raise RequiredArgumentMissingError("The following arguments are required if argument \ + --sitecontainers-spec-file is not provided: --container-name, --image, --target-port") auth_type = AuthType.ANONYMOUS if system_assigned_identity is True: auth_type = AuthType.SYSTEM_IDENTITY @@ -1050,27 +1066,42 @@ def create_webapp_sitecontainers(cmd, name, resource_group, container_name=None, elif registry_username and registry_password: auth_type = AuthType.USER_CREDENTIALS - sitecontainer = SiteContainer(image=image, target_port=target_port, start_up_command=startup_cmd, is_main=is_main, auth_type=auth_type, user_name = registry_username, password_secret = registry_password, user_managed_identity_client_id=user_assigned_identity) - response = _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, sitecontainer, slot) - - return response + sitecontainer = SiteContainer(image=image, target_port=target_port, start_up_command=startup_cmd, + is_main=is_main, auth_type=auth_type, user_name=registry_username, + password_secret=registry_password, + user_managed_identity_client_id=user_assigned_identity) + response = _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, + container_name, sitecontainer, slot) -def _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, sitecontainer, slot=None): + return response + + +def _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, + sitecontainer, slot=None): web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps response = None - if slot: - response = web_client.create_or_update_site_container_slot(resource_group, name, slot, container_name, sitecontainer) - else: - response = web_client.create_or_update_site_container(resource_group, name, container_name, sitecontainer) - return response + try: + if slot: + response = web_client.create_or_update_site_container_slot(resource_group, name, + slot, container_name, sitecontainer) + else: + response = web_client.create_or_update_site_container(resource_group, name, container_name, sitecontainer) + return response + except Exception as ex: + raise AzureInternalError("Failed to create or update sitecontainer {}. Error: {}" + .format(container_name, str(ex))) -def update_webapp_sitecontainer(cmd, name, resource_group, container_name, image=None, target_port=None, slot=None, startup_cmd=None, is_main=None, system_assigned_identity=None, user_assigned_identity=None, registry_username=None, registry_password=None): + +def update_webapp_sitecontainer(cmd, name, resource_group, container_name, image=None, target_port=None, + slot=None, startup_cmd=None, is_main=None, system_assigned_identity=None, + user_assigned_identity=None, registry_username=None, registry_password=None): # get the sitecontainer site_container = None try: site_container = get_webapp_sitecontainer(cmd, name, resource_group, container_name, slot) except: - raise ValidationError("Sitecontainer '{}' does not exist, failed to update the sitecontainer.".format(container_name)) + raise ResourceNotFoundError("Sitecontainer '{}' does not exist, failed to update the sitecontainer." + .format(container_name)) # update only the provided parameters if image is not None: site_container.image = image @@ -1089,59 +1120,72 @@ def update_webapp_sitecontainer(cmd, name, resource_group, container_name, image site_container.auth_type = AuthType.USER_CREDENTIALS site_container.user_name = registry_username site_container.password_secret = registry_password - response = _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, container_name, site_container, slot) + response = _create_or_update_webapp_sitecontainer_internal(cmd, name, resource_group, + container_name, site_container, slot) return response + def get_webapp_sitecontainer(cmd, name, resource_group, container_name, slot=None): web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps site_container = None - if slot: - site_container = web_client.get_site_container_slot(resource_group, name, container_name, slot) - else: - site_container = web_client.get_site_container(resource_group, name, container_name) + try: + if slot: + site_container = web_client.get_site_container_slot(resource_group, name, container_name, slot) + else: + site_container = web_client.get_site_container(resource_group, name, container_name) + except Exception as ex: + raise ResourceNotFoundError("Failed to fetch sitecontainer '{}'. Error: {}".format(container_name, str(ex))) return site_container def delete_webapp_sitecontainer(cmd, name, resource_group, container_name, slot=None): web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps response = None - if slot: - response = web_client.delete_site_container_slot(resource_group, name, container_name, slot, cls=lambda x, y, z: x) - else: - response = web_client.delete_site_container(resource_group, name, container_name, cls=lambda x, y, z: x) - if response is not None and response.http_response.status_code in (200, 204): - # TODO: Validate deletion via response status code once api bug is fixed, - # Status 200 -> container existed and was deleted successfully - # Status 204 -> container does not exist - logger.warning("Sitecontainer '{}' was deleted successfully.".format(container_name)) - else: - logger.error("Failed to delete sitecontainer '{}'.".format(container_name)) + try: + if slot: + response = web_client.delete_site_container_slot(resource_group, name, + container_name, slot, cls=lambda x, y, z: x) + else: + response = web_client.delete_site_container(resource_group, name, container_name, cls=lambda x, y, z: x) + if response is not None and response.http_response.status_code in (200, 204): + # TODO: Validate deletion via response status code once api bug is fixed, + # Status 200 -> container existed and was deleted successfully + # Status 204 -> container does not exist + logger.warning("Sitecontainer %s was deleted successfully.", container_name) + else: + logger.error("Failed to delete sitecontainer %s.", container_name) + except Exception as ex: + raise AzureInternalError("Failed to delete sitecontainer '{}'. Error: {}".format(container_name, str(ex))) return response def list_webapp_sitecontainers(cmd, name, resource_group, slot=None): web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps site_containers = None - if slot: - site_containers = web_client.list_site_containers_slot(resource_group, name, slot) - else: - site_containers = web_client.list_site_containers(resource_group, name) + try: + if slot: + site_containers = web_client.list_site_containers_slot(resource_group, name, slot) + else: + site_containers = web_client.list_site_containers(resource_group, name) + except Exception as ex: + raise ResourceNotFoundError("Failed to fetch sitecontainers. Error: {}".format(str(ex))) return site_containers def get_webapp_sitecontainers_status(cmd, name, resource_group, container_name=None, slot=None): import requests scm_url = _get_scm_url(cmd, resource_group, name, slot) - site_container_status_url = scm_url + '/api/sitecontainers/' + (container_name if container_name is not None else "") + site_container_status_url = scm_url + '/api/sitecontainers/' + (container_name + if container_name is not None else "") headers = get_scm_site_headers(cmd.cli_ctx, name, resource_group, slot) try: response = requests.get(site_container_status_url, headers=headers) return response.json() except Exception as ex: - raise CLIError("Failed to fetch sitecontainer status. Error: {}".format(str(ex))) + raise AzureInternalError("Failed to fetch sitecontainer status. Error: {}".format(str(ex))) + def get_webapp_sitecontainer_logs(cmd, name, resource_group, container_name, slot=None): - import requests scm_url = _get_scm_url(cmd, resource_group, name, slot) site_container_logs_url = scm_url + '/api/sitecontainers/' + container_name + '/logs' headers = get_scm_site_headers(cmd.cli_ctx, name, resource_group, slot) @@ -1152,7 +1196,8 @@ def get_webapp_sitecontainer_logs(cmd, name, resource_group, container_name, slo while True: time.sleep(100) # so that ctrl+c can stop the command except Exception as ex: - raise CLIError("Failed to fetch sitecontainer logs. Error: {}".format(str(ex))) + raise AzureInternalError("Failed to fetch sitecontainer logs. Error: {}".format(str(ex))) + # for generic updater def get_webapp(cmd, resource_group_name, name, slot=None): From 110dceadad2467c4255ca038dc4287f5672f0fa7 Mon Sep 17 00:00:00 2001 From: OGFTestPipeline Date: Thu, 6 Feb 2025 21:28:52 +0530 Subject: [PATCH 5/8] add help docs --- .../cli/command_modules/appservice/_help.py | 108 +++++++++++++++++- .../cli/command_modules/appservice/_params.py | 29 ++++- .../command_modules/appservice/commands.py | 2 +- .../cli/command_modules/appservice/custom.py | 2 +- 4 files changed, 134 insertions(+), 7 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_help.py b/src/azure-cli/azure/cli/command_modules/appservice/_help.py index 058866021e9..886bff840df 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_help.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_help.py @@ -2210,10 +2210,112 @@ helps['webapp sitecontainers create'] = """ type: command short-summary: Create sitecontainers for a linux webapp +long-summary: | + Multiple sitecontainers can be added at once by passing arg --sitecontainer-spec-file, which is the path to a json file containing an array of sitecontainer specs. + Example json file: + [{ + "name" : "firstcontainer", + "image": "myregistry.io/firstimage:latest", + "target_port": "80", + "is_main": true, + "environment_variables" : [ + { + "name" : "hello", + "value": "world" + } + ], + "volume_mounts": [ + { + "container_mount_path" : "mountPath", + "data": "configData", + "read_only": true, + "volume_sub_path": "subPath" + } + ] + }, + { + "name" : "secondcontainer", + "image": "myregistry.io/secondimage:latest", + "target_port": "3000", + "is_main": false, + "auth_type": "SystemIdentity", + "start_up_command": "MyStartupCmd" + }, + { + "name" : "thirdcontainer", + "image": "myregistry.io/thirdimage:latest", + "target_port": "3001", + "is_main": false, + "auth_type": "UserAssigned", + "user_managed_identity_client_id": "ClientID" + }, + { + "name" : "thirdcontainer", + "image": "myregistry.io/thirdimage:latest", + "target_port": "3002", + "is_main": false, + "auth_type": "UserCredentials", + "user_name": "Username", + "password_secret": "Password" + }] examples: - - name: Create sitecontainers for a linux webapp (autogenerated) - text: az webapp sitecontaienrs create --name MyWebApp --resource-group MyResourceGroup - crafted: true + - name: Create a sitecontainer for a linux webapp + text: az webapp sitecontainers create --name MyWebApp --resource-group MyResourceGroup --container-name MyContainer --image MyImageRegistry.io/MyImage:latest --target-port 80 --is-main + - name : Create multiple sitecontainers for a linux webapp using a json sitecontainer-spec file + text: az webapp sitecontainers create --name MyWebApp --resource-group MyResourceGroup --sitecontainer-spec-file ./sitecontainersspec.json +""" + + +helps['webapp sitecontainers update'] = """ +type: command +short-summary: Update a sitecontainer for a linux webapp +examples: + - name: Update a sitecontainer for a linux webapp + text: az webapp sitecontainers update --name MyWebApp --resource-group MyResourceGroup --container-name MyContainer --image MyImageRegistry.io/MyImage:latest --target-port 3000 --is-main false +""" + + +helps['webapp sitecontainers delete'] = """ +type: command +short-summary: Delete a sitecontainer for a linux webapp +examples: + - name: Delete a sitecontainer for a linux webapp + text: az webapp sitecontainers delete --name MyWebApp --resource-group MyResourceGroup --container-name MyContainer +""" + + +helps['webapp sitecontainers show'] = """ +type: command +short-summary: List the details of a sitecontainer for a linux webapp +examples: + - name: List the details of a sitecontainer for a linux webapp + text: az webapp sitecontainers show --name MyWebApp --resource-group MyResourceGroup --container-name MyContainer +""" + + +helps['webapp sitecontainers list'] = """ +type: command +short-summary: List all the sitecontainers for a linux webapp +examples: + - name: List all the sitecontainers for a linux webapp + text: az webapp sitecontainers list --name MyWebApp --resource-group MyResourceGroup --container-name MyContainer +""" + + +helps['webapp sitecontainers status'] = """ +type: command +short-summary: Get the status of a sitecontainer for a linux webapp +examples: + - name: Get the status of a sitecontainer for a linux webapp + text: az webapp sitecontainers status --name MyWebApp --resource-group MyResourceGroup --container-name MyContainer +""" + +helps['webapp sitecontainers log'] = """ +type: command +short-summary: Get the logs of a sitecontainer for a linux webapp +examples: + - name: Get the logs of a sitecontainer for a linux webapp + text: az webapp sitecontainers log --name MyWebApp --resource-group MyResourceGroup --container-name MyContainer """ diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index e572e9df207..2f687ae0717 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -173,9 +173,34 @@ def load_arguments(self, _): c.ignore('using_webapp_up') with self.argument_context("webapp sitecontainers") as c: - c.argument("create", help='Create sitecontainers for a linux webapp') - c.argument("is_main", help="If true, this sitecontainer becomes the primary sitecontainer receiving frontend traffic.", + c.argument('name', arg_type=webapp_name_arg_type, help='Name of the linux webapp') + c.argument("container_name", help='Name of the SiteContainer') + c.argument('slot', options_list=['--slot', '-s'], help='Name of the web app slot. Default to the productions slot if not specified.') + + with self.argument_context("webapp sitecontainers create") as c: + c.argument("image", help='Image Name') + c.argument("target_port", help='Target port for SiteContainer') + c.argument("startup_cmd", help='Startup Command for the SiteContainer') + c.argument("is_main", help="true if the container is the main site container; false otherwise", + arg_type=get_three_state_flag()) + c.argument("system_assigned_identity", help="If true, the system-assigned identity will be used for auth while pulling image", + arg_type=get_three_state_flag()) + c.argument("user_assigned_identity", help='ClientID for the user-maganed identity which will be used for auth while pulling image') + c.argument("registry_username", help='username used for image registry auth') + c.argument("registry_password", help='password used for image registry auth') + c.argument("sitecontainers_spec_file", help="path to a json sitecontainer spec file containing a list of sitecontainers, other sitecontainer input args will be ignored if this arg is provided") + + with self.argument_context("webapp sitecontainers update") as c: + c.argument("image", help='Image Name') + c.argument("target_port", help='Target port for SiteContainer') + c.argument("startup_cmd", help='Startup Command for the SiteContainer') + c.argument("is_main", help="true if the container is the main site container; false otherwise", + arg_type=get_three_state_flag()) + c.argument("system_assigned_identity", help="If true, the system-assigned identity will be used for auth while pulling image", arg_type=get_three_state_flag()) + c.argument("user_assigned_identity", help='ClientID for the user-maganed identity which will be used for auth while pulling image') + c.argument("registry_username", help='username used for image registry auth') + c.argument("registry_password", help='password used for image registry auth') with self.argument_context('webapp show') as c: c.argument('name', arg_type=webapp_name_arg_type) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/commands.py b/src/azure-cli/azure/cli/command_modules/appservice/commands.py index d9adf92daa9..6cf38b50f5b 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/commands.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/commands.py @@ -149,7 +149,7 @@ def load_command_table(self, _): g.custom_command('show', 'get_webapp_sitecontainer') g.custom_command('list', 'list_webapp_sitecontainers') g.custom_command('status', 'get_webapp_sitecontainers_status') - g.custom_command('logs', 'get_webapp_sitecontainer_logs') + g.custom_command('log', 'get_webapp_sitecontainer_log') with self.command_group('webapp traffic-routing') as g: g.custom_command('set', 'set_traffic_routing') diff --git a/src/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index 7b8178f6d13..c1831ada95e 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -1185,7 +1185,7 @@ def get_webapp_sitecontainers_status(cmd, name, resource_group, container_name=N raise AzureInternalError("Failed to fetch sitecontainer status. Error: {}".format(str(ex))) -def get_webapp_sitecontainer_logs(cmd, name, resource_group, container_name, slot=None): +def get_webapp_sitecontainer_log(cmd, name, resource_group, container_name, slot=None): scm_url = _get_scm_url(cmd, resource_group, name, slot) site_container_logs_url = scm_url + '/api/sitecontainers/' + container_name + '/logs' headers = get_scm_site_headers(cmd.cli_ctx, name, resource_group, slot) From 31844e29fb3d877d21bad459be2165465a7210ca Mon Sep 17 00:00:00 2001 From: OGFTestPipeline Date: Fri, 7 Feb 2025 01:37:29 +0530 Subject: [PATCH 6/8] add tests and update create cmd --- .../cli/command_modules/appservice/_help.py | 3 + .../cli/command_modules/appservice/_params.py | 1 + .../cli/command_modules/appservice/custom.py | 28 +- .../latest/data/sitecontainers_spec.json | 44 ++ ...econtainers_create_update_show_delete.yaml | 734 ++++++++++++++++++ ...s_createfromspecs_and_list_containers.yaml | 639 +++++++++++++++ .../tests/latest/test_webapp_commands.py | 76 ++ 7 files changed, 1512 insertions(+), 13 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json create mode 100644 src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_create_update_show_delete.yaml create mode 100644 src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_createfromspecs_and_list_containers.yaml diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_help.py b/src/azure-cli/azure/cli/command_modules/appservice/_help.py index 886bff840df..ff89f14aa35 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_help.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_help.py @@ -1658,6 +1658,9 @@ - name: Create a web app with a NodeJS 10.14 runtime and deployed from a local git repository. text: > az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime "node:12LTS" --deployment-local-git + - name: Create a web app which supports sitecontainers. + text: > + az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --sitecontainers-app - name: Create a web app with an image from DockerHub. text: > az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -i nginx diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index 2f687ae0717..67791a6dbc0 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -148,6 +148,7 @@ def load_arguments(self, _): local_context_attribute=LocalContextAttribute(name='web_name', actions=[LocalContextAction.SET], scopes=['webapp', 'cupertino'])) c.argument('startup_file', help="Linux only. The web's startup file") + c.argument('sitecontainers_app', help="If true, a webapp which supports sitecontainers will be created", arg_type=get_three_state_flag()) c.argument('deployment_container_image_name', options_list=['--deployment-container-image-name', '-i'], help='Container image name from container registry, e.g. publisher/image-name:tag', deprecate_info=c.deprecate(target='--deployment-container-image-name')) c.argument('container_registry_url', options_list=['--container-registry-url'], help='The container registry server url') c.argument('container_image_name', options_list=['--container-image-name', '-c'], diff --git a/src/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index c1831ada95e..b63f9143898 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -36,9 +36,7 @@ from azure.mgmt.storage import StorageManagementClient from azure.mgmt.applicationinsights import ApplicationInsightsManagementClient -from azure.mgmt.web.models import KeyInfo -from azure.mgmt.web.models import SiteContainer -from azure.mgmt.web.models import AuthType +from azure.mgmt.web.models import KeyInfo, SiteContainer, AuthType from azure.mgmt.web import WebSiteManagementClient from azure.cli.core.commands.client_factory import get_mgmt_service_client @@ -111,7 +109,8 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_file=None, # pylint: disable=too-many-statements,too-many-branches deployment_container_image_name=None, deployment_source_url=None, deployment_source_branch='master', - deployment_local_git=None, container_registry_password=None, container_registry_user=None, + deployment_local_git=None, sitecontainers_app=None, + container_registry_password=None, container_registry_user=None, container_registry_url=None, container_image_name=None, multicontainer_config_type=None, multicontainer_config_file=None, tags=None, using_webapp_up=False, language=None, assign_identities=None, @@ -227,20 +226,24 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi current_stack = None if is_linux: if not validate_container_app_create_options(runtime, container_image_name, - multicontainer_config_type, multicontainer_config_file): + multicontainer_config_type, multicontainer_config_file, + sitecontainers_app): if deployment_container_image_name: raise ArgumentUsageError('Please specify both --multicontainer-config-type TYPE ' 'and --multicontainer-config-file FILE, ' 'and only specify one out of --runtime, ' - '--deployment-container-image-name and --multicontainer-config-type') + '--deployment-container-image-name, --multicontainer-config-type ' + 'or --sitecontainers_app') raise ArgumentUsageError('Please specify both --multicontainer-config-type TYPE ' 'and --multicontainer-config-file FILE, ' 'and only specify one out of --runtime, ' - '--container-image-name and --multicontainer-config-type') + '--container-image-name, --multicontainer-config-type ' + 'or --sitecontainers_app') if startup_file: site_config.app_command_line = startup_file - - if runtime: + if sitecontainers_app: + site_config.linux_fx_version = 'sitecontainers' + elif runtime: match = helper.resolve(runtime, is_linux) if not match: raise ValidationError("Linux Runtime '{}' is not supported." @@ -434,10 +437,11 @@ def get_managed_environment(cmd, resource_group_name, environment_name): def validate_container_app_create_options(runtime=None, container_image_name=None, - multicontainer_config_type=None, multicontainer_config_file=None): + multicontainer_config_type=None, multicontainer_config_file=None, + sitecontainers_app=None): if bool(multicontainer_config_type) != bool(multicontainer_config_file): return False - opts = [runtime, container_image_name, multicontainer_config_type] + opts = [runtime, container_image_name, multicontainer_config_type, sitecontainers_app] return len([x for x in opts if x]) == 1 # you can only specify one out the combinations @@ -1156,8 +1160,6 @@ def delete_webapp_sitecontainer(cmd, name, resource_group, container_name, slot= logger.error("Failed to delete sitecontainer %s.", container_name) except Exception as ex: raise AzureInternalError("Failed to delete sitecontainer '{}'. Error: {}".format(container_name, str(ex))) - return response - def list_webapp_sitecontainers(cmd, name, resource_group, slot=None): web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json new file mode 100644 index 00000000000..2fbfb467c6f --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json @@ -0,0 +1,44 @@ +[ + { + "name" : "main", + "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-nginx:latest", + "target_port": "80", + "is_main": true, + "auth_type": "SystemIdentity", + "environment_variables" : [ + { + "name" : "hello", + "value": "world" + }, + { + "name": "lorem", + "value": "ipsum" + } + ], + "volume_mounts": [ + { + "container_mount_path" : "mountPath", + "data": "configData", + "read_only": true, + "volume_sub_path": "subPath" + } + ] + }, + { + "name" : "sidecardotnet", + "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-dotnetcore:latest", + "target_port": "2000", + "is_main": false, + "auth_type": "UserAssigned", + "user_managed_identity_client_id": "c283d9ab-ed41-4da9-a458-7256a2aa3e74" + }, + { + "name" : "sidecarnodejs", + "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-nodejs:latest", + "target_port": "4000", + "is_main": false, + "auth_type": "UserCredentials", + "user_name": "Username", + "password_secret": "Password" + } +] \ No newline at end of file diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_create_update_show_delete.yaml b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_create_update_show_delete.yaml new file mode 100644 index 00000000000..e79f5a20a12 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_create_update_show_delete.yaml @@ -0,0 +1,734 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - appservice plan create + Connection: + - keep-alive + ParameterSetName: + - -g -n --sku --is-linux + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_webapp_sitecontainers000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001","name":"cli_test_webapp_sitecontainers000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","test":"test_webapp_sitecontainers_create_update_show_delete","date":"2025-02-06T18:58:12Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '434' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 06 Feb 2025 18:58:18 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: B24B27E6F3934641934A143707E47DB6 Ref B: MAA201060513031 Ref C: 2025-02-06T18:58:18Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "sku": {"name": "S1", "tier": "STANDARD", "capacity": + 1}, "properties": {"perSiteScaling": false, "reserved": true, "isXenon": false, + "zoneRedundant": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - appservice plan create + Connection: + - keep-alive + Content-Length: + - '181' + Content-Type: + - application/json + ParameterSetName: + - -g -n --sku --is-linux + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003?api-version=2023-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","name":"webapp-sitecontainers-plan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"eastus","properties":{"serverFarmId":55182,"name":"webapp-sitecontainers-plan000003","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","subscription":"bef29afb-3c08-4894-ae64-43bdd8f3f447","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East + US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"cli_test_webapp_sitecontainers000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-217_55182","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-02-06T18:58:28.0166667"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1716' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:58:29 GMT + etag: + - '"1DB78C91C096920"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '12000' + x-ms-ratelimit-remaining-subscription-writes: + - '800' + x-msedge-ref: + - 'Ref A: 74B0D38FE90346E69EE97AD083C71B51 Ref B: MAA201060514049 Ref C: 2025-02-06T18:58:18Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp create + Connection: + - keep-alive + ParameterSetName: + - -g -n --plan --sitecontainers-app + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003?api-version=2023-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","name":"webapp-sitecontainers-plan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"East + US","properties":{"serverFarmId":55182,"name":"webapp-sitecontainers-plan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","subscription":"bef29afb-3c08-4894-ae64-43bdd8f3f447","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":10,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East + US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"cli_test_webapp_sitecontainers000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-217_55182","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":0,"vnetConnectionsMax":2,"createdTime":"2025-02-06T18:58:28.0166667"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1636' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:58:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 87E38940CB744952876903461ACDF147 Ref B: MAA201060514033 Ref C: 2025-02-06T18:58:30Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"name": "webapp-sitecontainers-test000002", "type": "Site"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp create + Connection: + - keep-alive + Content-Length: + - '60' + Content-Type: + - application/json + ParameterSetName: + - -g -n --plan --sitecontainers-app + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/checknameavailability?api-version=2023-12-01 + response: + body: + string: '{"nameAvailable":true,"reason":"","message":""}' + headers: + cache-control: + - no-cache + content-length: + - '47' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:58:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: E215840FB19D4F279A667B66F330BECA Ref B: MAA201060514039 Ref C: 2025-02-06T18:58:31Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "East US", "properties": {"serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003", + "reserved": false, "isXenon": false, "hyperV": false, "siteConfig": {"netFrameworkVersion": + "v4.6", "linuxFxVersion": "sitecontainers", "appSettings": [], "alwaysOn": true, + "localMySqlEnabled": false, "http20Enabled": true}, "scmSiteAlsoStopped": false, + "httpsOnly": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp create + Connection: + - keep-alive + Content-Length: + - '505' + Content-Type: + - application/json + ParameterSetName: + - -g -n --plan --sitecontainers-app + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002?api-version=2023-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002","name":"webapp-sitecontainers-test000002","type":"Microsoft.Web/sites","kind":"app,linux","location":"East + US","properties":{"name":"webapp-sitecontainers-test000002","state":"Running","hostNames":["webapp-sitecontainers-test000002.azurewebsites.net"],"webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","selfLink":"https://waws-prod-blu-217.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux/sites/webapp-sitecontainers-test000002","repositorySiteName":"webapp-sitecontainers-test000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"siteScopedCertificatesEnabled":false,"afdEnabled":false,"enabledHostNames":["webapp-sitecontainers-test000002.azurewebsites.net","webapp-sitecontainers-test000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"sitecontainers"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"webapp-sitecontainers-test000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"webapp-sitecontainers-test000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2025-02-06T18:58:37","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"outboundVnetRouting":{"allTraffic":false,"applicationTraffic":false,"contentShareTraffic":false,"imagePullTraffic":false,"backupRestoreTraffic":false},"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":false,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow + all","description":"Allow all access"}],"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow + all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":false,"minTlsVersion":null,"minTlsCipherSuite":null,"scmMinTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmSupportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null,"sitePrivateLinkHostEnabled":null,"clusteringEnabled":false},"functionAppConfig":null,"daprConfig":null,"deploymentId":"webapp-sitecontainers-test000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientAffinityProxyEnabled":false,"blockPathTraversal":false,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"ipMode":"IPv4","vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"D3BA5386ECE3EF692436FA80D86862EA4BBB849B79C16196E232335AC62906B7","kind":"app,linux","managedEnvironmentId":null,"workloadProfileName":null,"resourceConfig":null,"inboundIpAddress":"20.49.104.15","possibleInboundIpAddresses":"20.49.104.15","ftpUsername":"webapp-sitecontainers-test000002\\$webapp-sitecontainers-test000002","ftpsHostName":"ftps://waws-prod-blu-217.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"40.76.167.202,52.146.70.44,52.146.70.103,52.146.68.209,52.146.68.246,52.146.69.57,20.49.104.15","possibleOutboundIpAddresses":"40.76.167.202,52.146.70.44,52.146.70.103,52.146.68.209,52.146.68.246,52.146.69.57,52.146.70.115,52.146.70.118,52.146.70.158,52.146.66.148,52.146.71.5,40.76.165.150,40.76.167.156,40.76.167.157,52.146.68.142,52.146.64.68,52.146.65.22,52.146.65.23,52.191.239.27,52.191.239.78,52.191.239.120,52.224.200.31,52.224.201.90,52.224.202.78,20.49.104.15","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-blu-217","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli_test_webapp_sitecontainers000001","defaultHostName":"webapp-sitecontainers-test000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"functionsRuntimeAdminIsolationEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs,AppServiceAuthenticationLogs","inFlightFeatures":null,"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","autoGeneratedDomainNameLabelScope":null,"defaultHostNameScope":"Global","privateLinkIdentifiers":null,"sshEnabled":null}}' + headers: + cache-control: + - no-cache + content-length: + - '7876' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:58:56 GMT + etag: + - '"1DB78C921058DD5"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '499' + x-msedge-ref: + - 'Ref A: EC4B84DBC18B4A888FC5A546293B24D0 Ref B: MAA201060514033 Ref C: 2025-02-06T18:58:32Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"format": "WebDeploy"}' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp create + Connection: + - keep-alive + Content-Length: + - '23' + Content-Type: + - application/json + ParameterSetName: + - -g -n --plan --sitecontainers-app + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/publishxml?api-version=2023-01-01 + response: + body: + string: + headers: + cache-control: + - no-cache + content-length: + - '1532' + content-type: + - application/xml + date: + - Thu, 06 Feb 2025 18:58:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-msedge-ref: + - 'Ref A: 93A21DCB18A647199F4C09AA4A707AB2 Ref B: MAA201060515023 Ref C: 2025-02-06T18:58:57Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --container-name --is-main --image --target-port + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002?api-version=2023-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002","name":"webapp-sitecontainers-test000002","type":"Microsoft.Web/sites","kind":"app,linux","location":"East + US","properties":{"name":"webapp-sitecontainers-test000002","state":"Running","hostNames":["webapp-sitecontainers-test000002.azurewebsites.net"],"webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","selfLink":"https://waws-prod-blu-217.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux/sites/webapp-sitecontainers-test000002","repositorySiteName":"webapp-sitecontainers-test000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"siteScopedCertificatesEnabled":false,"afdEnabled":false,"enabledHostNames":["webapp-sitecontainers-test000002.azurewebsites.net","webapp-sitecontainers-test000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"sitecontainers"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"webapp-sitecontainers-test000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"webapp-sitecontainers-test000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2025-02-06T18:58:56.6166667","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"outboundVnetRouting":null,"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"sitecontainers","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":true,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":null,"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":null,"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":true,"minTlsVersion":null,"minTlsCipherSuite":null,"scmMinTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmSupportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":0,"elasticWebAppScaleLimit":null,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null,"sitePrivateLinkHostEnabled":null,"clusteringEnabled":false},"functionAppConfig":null,"daprConfig":null,"deploymentId":"webapp-sitecontainers-test000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientAffinityProxyEnabled":false,"blockPathTraversal":false,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"ipMode":"IPv4","vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"D3BA5386ECE3EF692436FA80D86862EA4BBB849B79C16196E232335AC62906B7","kind":"app,linux","managedEnvironmentId":null,"workloadProfileName":null,"resourceConfig":null,"inboundIpAddress":"20.49.104.15","possibleInboundIpAddresses":"20.49.104.15","ftpUsername":"webapp-sitecontainers-test000002\\$webapp-sitecontainers-test000002","ftpsHostName":"ftps://waws-prod-blu-217.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"40.76.167.202,52.146.70.44,52.146.70.103,52.146.68.209,52.146.68.246,52.146.69.57,20.49.104.15","possibleOutboundIpAddresses":"40.76.167.202,52.146.70.44,52.146.70.103,52.146.68.209,52.146.68.246,52.146.69.57,52.146.70.115,52.146.70.118,52.146.70.158,52.146.66.148,52.146.71.5,40.76.165.150,40.76.167.156,40.76.167.157,52.146.68.142,52.146.64.68,52.146.65.22,52.146.65.23,52.191.239.27,52.191.239.78,52.191.239.120,52.224.200.31,52.224.201.90,52.224.202.78,20.49.104.15","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-blu-217","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli_test_webapp_sitecontainers000001","defaultHostName":"webapp-sitecontainers-test000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"functionsRuntimeAdminIsolationEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":[],"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs,AppServiceAuthenticationLogs","inFlightFeatures":["SiteContainers"],"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","autoGeneratedDomainNameLabelScope":null,"defaultHostNameScope":"Global","privateLinkIdentifiers":null,"sshEnabled":null}}' + headers: + cache-control: + - no-cache + content-length: + - '7567' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:58:59 GMT + etag: + - '"1DB78C92C65708B"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F6A408D516F64F3CB7196BE1ABAFE064 Ref B: MAA201060516035 Ref C: 2025-02-06T18:58:58Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"image": "mcr.microsoft.com/appsvc/staticsite", "targetPort": + "80", "isMain": true, "authType": "Anonymous"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers create + Connection: + - keep-alive + Content-Length: + - '125' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --container-name --is-main --image --target-port + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend?api-version=2023-12-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend","name":"frontend","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/staticsite","targetPort":"80","isMain":true,"startUpCommand":null,"authType":"Anonymous","userName":null,"passwordSecret":null,"userManagedIdentityClientId":null,"type":null,"metadata":null,"createdTime":"2025-02-06T18:59:00.44","lastModifiedTime":"2025-02-06T18:59:00.44","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '693' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:59:00 GMT + etag: + - '"1DB78C92EACD580"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 1C9C5033935549EC822712796B633231 Ref B: MAA201060516049 Ref C: 2025-02-06T18:58:59Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers show + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --container-name + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend?api-version=2023-12-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend","name":"frontend","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/staticsite","targetPort":"80","isMain":true,"startUpCommand":null,"authType":"Anonymous","userName":null,"passwordSecret":null,"userManagedIdentityClientId":null,"type":null,"metadata":null,"createdTime":"2025-02-06T18:59:00.44","lastModifiedTime":"2025-02-06T18:59:00.44","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '693' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:59:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: F16FB4994308446E8BF14442C28ACB5B Ref B: MAA201060516031 Ref C: 2025-02-06T18:59:01Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers update + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --container-name --is-main --image --target-port --startup-cmd + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend?api-version=2023-12-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend","name":"frontend","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/staticsite","targetPort":"80","isMain":true,"startUpCommand":null,"authType":"Anonymous","userName":null,"passwordSecret":null,"userManagedIdentityClientId":null,"type":null,"metadata":null,"createdTime":"2025-02-06T18:59:00.44","lastModifiedTime":"2025-02-06T18:59:00.44","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '693' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:59:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 2F0CB72C34084D218A355976D53A77B2 Ref B: MAA201060514039 Ref C: 2025-02-06T18:59:01Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"image": "mcr.microsoft.com/appsvc/staticsite", "targetPort": + "80", "isMain": false, "startUpCommand": "npm start", "authType": "Anonymous", + "volumeMounts": [], "environmentVariables": []}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers update + Connection: + - keep-alive + Content-Length: + - '205' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --container-name --is-main --image --target-port --startup-cmd + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend?api-version=2023-12-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend","name":"frontend","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/staticsite","targetPort":"80","isMain":false,"startUpCommand":"npm + start","authType":"Anonymous","userName":null,"passwordSecret":null,"userManagedIdentityClientId":null,"type":null,"metadata":null,"createdTime":"2025-02-06T18:59:00.44","lastModifiedTime":"2025-02-06T18:59:03.81","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '701' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:59:03 GMT + etag: + - '"1DB78C930AF0E20"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: DDEF205C505E4504ADACD2FD54EC9663 Ref B: MAA201060513047 Ref C: 2025-02-06T18:59:02Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers update + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --container-name --is-main --image --target-port + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/nonexistingcontainer?api-version=2023-12-01 + response: + body: + string: '{"Code":"NotFound","Message":"Cannot find sitecontainer with name nonexistingcontainer.","Target":null,"Details":[{"Message":"Cannot + find sitecontainer with name nonexistingcontainer."},{"Code":"NotFound"},{"ErrorEntity":{"ExtendedCode":"51004","MessageTemplate":"Cannot + find {0} with name {1}.","Parameters":["sitecontainer","nonexistingcontainer"],"Code":"NotFound","Message":"Cannot + find sitecontainer with name nonexistingcontainer."}}],"Innererror":null}' + headers: + cache-control: + - no-cache + content-length: + - '459' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 06 Feb 2025 18:59:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 2CC3A94BF1BD4A5C9EFDFE0284290F96 Ref B: MAA201060513019 Ref C: 2025-02-06T18:59:04Z' + x-powered-by: + - ASP.NET + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --resource-group --container-name + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/frontend?api-version=2023-12-01 + response: + body: + string: '"NoContent"' + headers: + cache-control: + - no-cache + content-length: + - '11' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 18:59:06 GMT + etag: + - '"1DB78C9322AFFC0"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '799' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '11999' + x-msedge-ref: + - 'Ref A: A8330B23DA72450A96812D2830C3ACFC Ref B: MAA201060514009 Ref C: 2025-02-06T18:59:05Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_createfromspecs_and_list_containers.yaml b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_createfromspecs_and_list_containers.yaml new file mode 100644 index 00000000000..51d60fa904b --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_createfromspecs_and_list_containers.yaml @@ -0,0 +1,639 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - appservice plan create + Connection: + - keep-alive + ParameterSetName: + - -g -n --sku --is-linux + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_webapp_sitecontainers000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001","name":"cli_test_webapp_sitecontainers000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","test":"test_webapp_sitecontainers_createfromspecs_and_list_containers","date":"2025-02-06T20:03:23Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '444' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 06 Feb 2025 20:03:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 36CCD55074D54E6B8FA05E03F70489E4 Ref B: MAA201060515027 Ref C: 2025-02-06T20:03:29Z' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "sku": {"name": "S1", "tier": "STANDARD", "capacity": + 1}, "properties": {"perSiteScaling": false, "reserved": true, "isXenon": false, + "zoneRedundant": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - appservice plan create + Connection: + - keep-alive + Content-Length: + - '181' + Content-Type: + - application/json + ParameterSetName: + - -g -n --sku --is-linux + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003?api-version=2023-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","name":"webapp-sitecontainers-plan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"eastus","properties":{"serverFarmId":27720,"name":"webapp-sitecontainers-plan000003","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","subscription":"bef29afb-3c08-4894-ae64-43bdd8f3f447","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East + US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"cli_test_webapp_sitecontainers000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-583_27720","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-02-06T20:03:39.9866667"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1716' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:03:42 GMT + etag: + - '"1DB78D237915BE0"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '12000' + x-ms-ratelimit-remaining-subscription-writes: + - '800' + x-msedge-ref: + - 'Ref A: 81853AC6EEEE433288268815A3DCD463 Ref B: MAA201060515009 Ref C: 2025-02-06T20:03:29Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp create + Connection: + - keep-alive + ParameterSetName: + - -g -n --plan --sitecontainers-app + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003?api-version=2023-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","name":"webapp-sitecontainers-plan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"East + US","properties":{"serverFarmId":27720,"name":"webapp-sitecontainers-plan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","subscription":"bef29afb-3c08-4894-ae64-43bdd8f3f447","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":10,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East + US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"cli_test_webapp_sitecontainers000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-583_27720","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":0,"vnetConnectionsMax":2,"createdTime":"2025-02-06T20:03:39.9866667"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1636' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:03:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: DE56677185824DC29673AE688085DB88 Ref B: MAA201060514027 Ref C: 2025-02-06T20:03:42Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"name": "webapp-sitecontainers-test000002", "type": "Site"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp create + Connection: + - keep-alive + Content-Length: + - '60' + Content-Type: + - application/json + ParameterSetName: + - -g -n --plan --sitecontainers-app + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/checknameavailability?api-version=2023-12-01 + response: + body: + string: '{"nameAvailable":true,"reason":"","message":""}' + headers: + cache-control: + - no-cache + content-length: + - '47' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:03:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: AAD5062E98A24B2DAA58443F05BC00AF Ref B: MAA201060516035 Ref C: 2025-02-06T20:03:43Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "East US", "properties": {"serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003", + "reserved": false, "isXenon": false, "hyperV": false, "siteConfig": {"netFrameworkVersion": + "v4.6", "linuxFxVersion": "sitecontainers", "appSettings": [], "alwaysOn": true, + "localMySqlEnabled": false, "http20Enabled": true}, "scmSiteAlsoStopped": false, + "httpsOnly": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp create + Connection: + - keep-alive + Content-Length: + - '505' + Content-Type: + - application/json + ParameterSetName: + - -g -n --plan --sitecontainers-app + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002?api-version=2023-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002","name":"webapp-sitecontainers-test000002","type":"Microsoft.Web/sites","kind":"app,linux","location":"East + US","properties":{"name":"webapp-sitecontainers-test000002","state":"Running","hostNames":["webapp-sitecontainers-test000002.azurewebsites.net"],"webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","selfLink":"https://waws-prod-blu-583.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux/sites/webapp-sitecontainers-test000002","repositorySiteName":"webapp-sitecontainers-test000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"siteScopedCertificatesEnabled":false,"afdEnabled":false,"enabledHostNames":["webapp-sitecontainers-test000002.azurewebsites.net","webapp-sitecontainers-test000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"sitecontainers"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"webapp-sitecontainers-test000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"webapp-sitecontainers-test000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2025-02-06T20:03:49.5","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"outboundVnetRouting":{"allTraffic":false,"applicationTraffic":false,"contentShareTraffic":false,"imagePullTraffic":false,"backupRestoreTraffic":false},"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":false,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow + all","description":"Allow all access"}],"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow + all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":false,"minTlsVersion":null,"minTlsCipherSuite":null,"scmMinTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmSupportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null,"sitePrivateLinkHostEnabled":null,"clusteringEnabled":false},"functionAppConfig":null,"daprConfig":null,"deploymentId":"webapp-sitecontainers-test000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientAffinityProxyEnabled":false,"blockPathTraversal":false,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"ipMode":"IPv4","vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"D3BA5386ECE3EF692436FA80D86862EA4BBB849B79C16196E232335AC62906B7","kind":"app,linux","managedEnvironmentId":null,"workloadProfileName":null,"resourceConfig":null,"inboundIpAddress":"20.119.16.59","possibleInboundIpAddresses":"20.119.16.59","ftpUsername":"webapp-sitecontainers-test000002\\$webapp-sitecontainers-test000002","ftpsHostName":"ftps://waws-prod-blu-583.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"172.171.169.220,172.171.170.17,172.171.170.31,172.171.170.59,172.171.170.88,172.171.170.100,172.214.1.199,172.214.7.229,172.171.168.210,172.171.168.222,172.171.168.232,172.171.168.237,20.119.16.59","possibleOutboundIpAddresses":"172.171.169.220,172.171.170.17,172.171.170.31,172.171.170.59,172.171.170.88,172.171.170.100,172.214.1.199,172.214.7.229,172.171.168.210,172.171.168.222,172.171.168.232,172.171.168.237,172.214.3.199,172.171.168.239,172.214.2.4,172.214.7.94,172.214.3.127,172.214.7.109,172.171.168.252,172.214.4.108,172.171.169.22,172.171.169.83,172.171.169.215,172.214.4.200,172.171.170.118,172.171.170.125,172.171.170.184,172.171.170.216,172.171.170.218,172.171.170.251,20.119.16.59","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-blu-583","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli_test_webapp_sitecontainers000001","defaultHostName":"webapp-sitecontainers-test000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"functionsRuntimeAdminIsolationEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs,AppServiceAuthenticationLogs","inFlightFeatures":null,"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","autoGeneratedDomainNameLabelScope":null,"defaultHostNameScope":"Global","privateLinkIdentifiers":null,"sshEnabled":null}}' + headers: + cache-control: + - no-cache + content-length: + - '8103' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:04:08 GMT + etag: + - '"1DB78D23D19E215"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '499' + x-msedge-ref: + - 'Ref A: C6EB019B8C41400C8A721101E5EC5EF5 Ref B: MAA201060514027 Ref C: 2025-02-06T20:03:45Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"format": "WebDeploy"}' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp create + Connection: + - keep-alive + Content-Length: + - '23' + Content-Type: + - application/json + ParameterSetName: + - -g -n --plan --sitecontainers-app + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/publishxml?api-version=2023-01-01 + response: + body: + string: + headers: + cache-control: + - no-cache + content-length: + - '1532' + content-type: + - application/xml + date: + - Thu, 06 Feb 2025 20:04:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-msedge-ref: + - 'Ref A: A63E300D811D41BCB4351830C74B98D5 Ref B: MAA201060516033 Ref C: 2025-02-06T20:04:09Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers create + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --sitecontainers-spec-file + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002?api-version=2023-01-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002","name":"webapp-sitecontainers-test000002","type":"Microsoft.Web/sites","kind":"app,linux","location":"East + US","properties":{"name":"webapp-sitecontainers-test000002","state":"Running","hostNames":["webapp-sitecontainers-test000002.azurewebsites.net"],"webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","selfLink":"https://waws-prod-blu-583.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux/sites/webapp-sitecontainers-test000002","repositorySiteName":"webapp-sitecontainers-test000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"siteScopedCertificatesEnabled":false,"afdEnabled":false,"enabledHostNames":["webapp-sitecontainers-test000002.azurewebsites.net","webapp-sitecontainers-test000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"sitecontainers"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"webapp-sitecontainers-test000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"webapp-sitecontainers-test000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2025-02-06T20:04:09.1333333","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"outboundVnetRouting":null,"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"sitecontainers","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":true,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":null,"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":null,"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":true,"minTlsVersion":null,"minTlsCipherSuite":null,"scmMinTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmSupportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":0,"elasticWebAppScaleLimit":null,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null,"sitePrivateLinkHostEnabled":null,"clusteringEnabled":false},"functionAppConfig":null,"daprConfig":null,"deploymentId":"webapp-sitecontainers-test000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientAffinityProxyEnabled":false,"blockPathTraversal":false,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"ipMode":"IPv4","vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"D3BA5386ECE3EF692436FA80D86862EA4BBB849B79C16196E232335AC62906B7","kind":"app,linux","managedEnvironmentId":null,"workloadProfileName":null,"resourceConfig":null,"inboundIpAddress":"20.119.16.59","possibleInboundIpAddresses":"20.119.16.59","ftpUsername":"webapp-sitecontainers-test000002\\$webapp-sitecontainers-test000002","ftpsHostName":"ftps://waws-prod-blu-583.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"172.171.169.220,172.171.170.17,172.171.170.31,172.171.170.59,172.171.170.88,172.171.170.100,172.214.1.199,172.214.7.229,172.171.168.210,172.171.168.222,172.171.168.232,172.171.168.237,20.119.16.59","possibleOutboundIpAddresses":"172.171.169.220,172.171.170.17,172.171.170.31,172.171.170.59,172.171.170.88,172.171.170.100,172.214.1.199,172.214.7.229,172.171.168.210,172.171.168.222,172.171.168.232,172.171.168.237,172.214.3.199,172.171.168.239,172.214.2.4,172.214.7.94,172.214.3.127,172.214.7.109,172.171.168.252,172.214.4.108,172.171.169.22,172.171.169.83,172.171.169.215,172.214.4.200,172.171.170.118,172.171.170.125,172.171.170.184,172.171.170.216,172.171.170.218,172.171.170.251,20.119.16.59","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-blu-583","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli_test_webapp_sitecontainers000001","defaultHostName":"webapp-sitecontainers-test000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"functionsRuntimeAdminIsolationEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":[],"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs,AppServiceAuthenticationLogs","inFlightFeatures":["SiteContainers"],"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","autoGeneratedDomainNameLabelScope":null,"defaultHostNameScope":"Global","privateLinkIdentifiers":null,"sshEnabled":null}}' + headers: + cache-control: + - no-cache + content-length: + - '7792' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:04:11 GMT + etag: + - '"1DB78D248701AD5"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 7EF5F6D40213462D89E343E02214422E Ref B: MAA201060515023 Ref C: 2025-02-06T20:04:10Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-nginx:latest", + "targetPort": "80", "isMain": true, "authType": "SystemIdentity", "volumeMounts": + [{"volumeSubPath": "subPath", "containerMountPath": "mountPath", "data": "configData", + "readOnly": true}], "environmentVariables": [{"name": "hello", "value": "world"}, + {"name": "lorem", "value": "ipsum"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers create + Connection: + - keep-alive + Content-Length: + - '376' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --sitecontainers-spec-file + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/main?api-version=2023-12-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/main","name":"main","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/docs/sidecars/sample-nginx:latest","targetPort":"80","isMain":true,"startUpCommand":null,"authType":"SystemIdentity","userName":null,"passwordSecret":null,"userManagedIdentityClientId":null,"type":null,"metadata":null,"createdTime":"2025-02-06T20:04:12.65","lastModifiedTime":"2025-02-06T20:04:12.65","volumeMounts":[{"volumeSubPath":"subPath","containerMountPath":"mountPath","data":"configData","readOnly":true}],"environmentVariables":[{"name":"hello","value":"world"},{"name":"lorem","value":"ipsum"}],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '874' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:04:12 GMT + etag: + - '"1DB78D24A88B4A0"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 69A21D063C0C403D921CDE4DCB9E49A6 Ref B: MAA201060513021 Ref C: 2025-02-06T20:04:11Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-dotnetcore:latest", + "targetPort": "2000", "isMain": false, "authType": "UserAssigned", "userManagedIdentityClientId": + "c283d9ab-ed41-4da9-a458-7256a2aa3e74"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers create + Connection: + - keep-alive + Content-Length: + - '230' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --sitecontainers-spec-file + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/sidecardotnet?api-version=2023-12-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/sidecardotnet","name":"sidecardotnet","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/docs/sidecars/sample-dotnetcore:latest","targetPort":"2000","isMain":false,"startUpCommand":null,"authType":"UserAssigned","userName":null,"passwordSecret":null,"userManagedIdentityClientId":"c283d9ab-ed41-4da9-a458-7256a2aa3e74","type":null,"metadata":null,"createdTime":"2025-02-06T20:04:14.2166667","lastModifiedTime":"2025-02-06T20:04:14.2166667","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '781' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:04:13 GMT + etag: + - '"1DB78D24B77C28B"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: 9019E8049CB84615A410054152124601 Ref B: MAA201060514037 Ref C: 2025-02-06T20:04:13Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"properties": {"image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-nodejs:latest", + "targetPort": "4000", "isMain": false, "authType": "UserCredentials", "userName": + "Username", "passwordSecret": "Password"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers create + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json + ParameterSetName: + - --name --resource-group --sitecontainers-spec-file + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/sidecarnodejs?api-version=2023-12-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/sidecarnodejs","name":"sidecarnodejs","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/docs/sidecars/sample-nodejs:latest","targetPort":"4000","isMain":false,"startUpCommand":null,"authType":"UserCredentials","userName":"Username","passwordSecret":"Password","userManagedIdentityClientId":null,"type":null,"metadata":null,"createdTime":"2025-02-06T20:04:16.1666667","lastModifiedTime":"2025-02-06T20:04:16.1666667","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '758' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:04:16 GMT + etag: + - '"1DB78D24CA14E6B"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-writes: + - '11999' + x-ms-ratelimit-remaining-subscription-writes: + - '799' + x-msedge-ref: + - 'Ref A: A3D52EB8B50D4365BBC731BD5D58CE2B Ref B: MAA201060515039 Ref C: 2025-02-06T20:04:14Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers list + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group + User-Agent: + - AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.12.9 (Windows-11-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers?api-version=2023-12-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/main","name":"main","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/docs/sidecars/sample-nginx:latest","targetPort":"80","isMain":true,"startUpCommand":null,"authType":"SystemIdentity","userName":null,"passwordSecret":null,"userManagedIdentityClientId":null,"type":null,"metadata":null,"createdTime":"2025-02-06T20:04:12.65","lastModifiedTime":"2025-02-06T20:04:12.65","volumeMounts":[{"volumeSubPath":"subPath","containerMountPath":"mountPath","data":null,"readOnly":true}],"environmentVariables":[{"name":"hello","value":"world"},{"name":"lorem","value":"ipsum"}],"inheritAppSettingsAndConnectionStrings":null}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/sidecardotnet","name":"sidecardotnet","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/docs/sidecars/sample-dotnetcore:latest","targetPort":"2000","isMain":false,"startUpCommand":null,"authType":"UserAssigned","userName":null,"passwordSecret":null,"userManagedIdentityClientId":"c283d9ab-ed41-4da9-a458-7256a2aa3e74","type":null,"metadata":null,"createdTime":"2025-02-06T20:04:14.2166667","lastModifiedTime":"2025-02-06T20:04:14.2166667","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002/sitecontainers/sidecarnodejs","name":"sidecarnodejs","type":"Microsoft.Web/sites/sitecontainer","location":"East + US","properties":{"image":"mcr.microsoft.com/appsvc/docs/sidecars/sample-nodejs:latest","targetPort":"4000","isMain":false,"startUpCommand":null,"authType":"UserCredentials","userName":"Username","passwordSecret":null,"userManagedIdentityClientId":null,"type":null,"metadata":null,"createdTime":"2025-02-06T20:04:16.1666667","lastModifiedTime":"2025-02-06T20:04:16.1666667","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}],"nextLink":null,"id":null}' + headers: + cache-control: + - no-cache + content-length: + - '2439' + content-type: + - application/json + date: + - Thu, 06 Feb 2025 20:04:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: 4C7C428E4EB249A4891AF7C9884DC723 Ref B: MAA201060515023 Ref C: 2025-02-06T20:04:16Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py index aff83a49997..46c03fa24cf 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py @@ -2889,6 +2889,82 @@ def test_one_deploy_arm(self, resource_group): JMESPathCheck('message', 'OneDeploy'), ]) +class WebappSiteContainersTests(ScenarioTest): + @ResourceGroupPreparer(name_prefix='cli_test_webapp_sitecontainers', location='eastus') + def test_webapp_sitecontainers_create_update_show_delete(self, resource_group): + webapp_name = self.create_random_name('webapp-sitecontainers-test', 40) + plan_name = self.create_random_name('webapp-sitecontainers-plan', 40) + self.cmd( + 'appservice plan create -g {} -n {} --sku S1 --is-linux'.format(resource_group, plan_name)) + self.cmd( + 'webapp create -g {} -n {} --plan {} --sitecontainers-app'.format(resource_group, webapp_name, plan_name)) + + self.cmd('webapp sitecontainers create --name {} --resource-group {} --container-name frontend --is-main --image mcr.microsoft.com/appsvc/staticsite --target-port 80'. + format(webapp_name, resource_group)).assert_with_checks([ + JMESPathCheck('name', 'frontend'), + JMESPathCheck('image', 'mcr.microsoft.com/appsvc/staticsite'), + JMESPathCheck('authType', 'Anonymous'), + JMESPathCheck('isMain', True), + JMESPathCheck('targetPort', '80') + ]) + + self.cmd('webapp sitecontainers show --name {} --resource-group {} --container-name frontend'. + format(webapp_name, resource_group)).assert_with_checks([ + JMESPathCheck('name', 'frontend'), + JMESPathCheck('image', 'mcr.microsoft.com/appsvc/staticsite'), + JMESPathCheck('authType', 'Anonymous'), + JMESPathCheck('isMain', True), + JMESPathCheck('targetPort', '80') + ]) + + self.cmd('webapp sitecontainers update --name {} --resource-group {} --container-name frontend --is-main false --image mcr.microsoft.com/appsvc/staticsite --target-port 80 --startup-cmd "npm start"'. + format(webapp_name, resource_group)).assert_with_checks([ + JMESPathCheck('name', 'frontend'), + JMESPathCheck('image', 'mcr.microsoft.com/appsvc/staticsite'), + JMESPathCheck('authType', 'Anonymous'), + JMESPathCheck('isMain', False), + JMESPathCheck('targetPort', '80'), + JMESPathCheck('startUpCommand', 'npm start') + ]) + + with self.assertRaisesRegex(CLIError, "Sitecontainer 'nonexistingcontainer' does not exist, failed to update the sitecontainer"): + self.cmd('webapp sitecontainers update --name {} --resource-group {} --container-name nonexistingcontainer --is-main false --image mcr.microsoft.com/appsvc/staticsite --target-port 80'.format(webapp_name, resource_group)) + + self.cmd('webapp sitecontainers delete --name {} --resource-group {} --container-name frontend'.format(webapp_name, resource_group)) + + @ResourceGroupPreparer(name_prefix='cli_test_webapp_sitecontainers', location='eastus') + def test_webapp_sitecontainers_createfromspecs_and_list_containers(self, resource_group): + webapp_name = self.create_random_name('webapp-sitecontainers-test', 40) + plan_name = self.create_random_name('webapp-sitecontainers-plan', 40) + spec_file = os.path.join(TEST_DIR, 'data', 'sitecontainers_spec.json') + + self.cmd( + 'appservice plan create -g {} -n {} --sku S1 --is-linux'.format(resource_group, plan_name)) + self.cmd( + 'webapp create -g {} -n {} --plan {} --sitecontainers-app'.format(resource_group, webapp_name, plan_name)) + + self.cmd('webapp sitecontainers create --name {} --resource-group {} --sitecontainers-spec-file "{}"'. + format(webapp_name, resource_group, spec_file)).assert_with_checks([ + JMESPathCheck('length([])', 3), + JMESPathCheck('[0].name', 'main'), + JMESPathCheck('[1].name', 'sidecardotnet'), + JMESPathCheck('[2].name', 'sidecarnodejs') + ]) + + self.cmd('webapp sitecontainers list --name {} --resource-group {}'. + format(webapp_name, resource_group, spec_file)).assert_with_checks([ + JMESPathCheck('length([])', 3), + JMESPathCheck('[0].name', 'main'), + JMESPathCheck('[0].isMain', True), + JMESPathCheck('[0].authType', "SystemIdentity"), + JMESPathCheck('length([0].environmentVariables)', 2), + JMESPathCheck('length([0].volumeMounts)', 1), + JMESPathCheck('[1].name', 'sidecardotnet'), + JMESPathCheck('[1].targetPort', '2000'), + JMESPathCheck('[2].name', 'sidecarnodejs'), + JMESPathCheck('[2].authType', 'UserCredentials'), + JMESPathCheck('[2].userName', 'Username') + ]) class TrackRuntimeStatusTest(ScenarioTest): @live_only() From 0fa62a8875be923fb69419dbc4b21f13004ef1af Mon Sep 17 00:00:00 2001 From: OGFTestPipeline Date: Mon, 10 Feb 2025 11:40:44 +0530 Subject: [PATCH 7/8] update linuxfxversion --- src/azure-cli/azure/cli/command_modules/appservice/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index b63f9143898..1d9b785fb5e 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -242,7 +242,7 @@ def create_webapp(cmd, resource_group_name, name, plan, runtime=None, startup_fi if startup_file: site_config.app_command_line = startup_file if sitecontainers_app: - site_config.linux_fx_version = 'sitecontainers' + site_config.linux_fx_version = 'SITECONTAINERS' elif runtime: match = helper.resolve(runtime, is_linux) if not match: From 657ef1af16d3153eeca8dc9ed0ab9b31b46a0e14 Mon Sep 17 00:00:00 2001 From: OGFTestPipeline Date: Mon, 10 Feb 2025 21:36:09 +0530 Subject: [PATCH 8/8] resolve comments --- .../cli/command_modules/appservice/_help.py | 87 ++++++++------- .../cli/command_modules/appservice/custom.py | 30 ++++- .../latest/data/sitecontainers_spec.json | 77 +++++++------ ...econtainers_create_update_show_delete.yaml | 104 +++++++++--------- ...s_createfromspecs_and_list_containers.yaml | 104 +++++++++--------- 5 files changed, 222 insertions(+), 180 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_help.py b/src/azure-cli/azure/cli/command_modules/appservice/_help.py index ff89f14aa35..03574c64b7a 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_help.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_help.py @@ -2216,51 +2216,60 @@ long-summary: | Multiple sitecontainers can be added at once by passing arg --sitecontainer-spec-file, which is the path to a json file containing an array of sitecontainer specs. Example json file: - [{ - "name" : "firstcontainer", - "image": "myregistry.io/firstimage:latest", - "target_port": "80", - "is_main": true, - "environment_variables" : [ - { - "name" : "hello", - "value": "world" - } - ], - "volume_mounts": [ - { - "container_mount_path" : "mountPath", - "data": "configData", - "read_only": true, - "volume_sub_path": "subPath" - } - ] + [ + { + "name": "firstcontainer", + "properties": { + "image": "myregistry.io/firstimage:latest", + "targetPort": "80", + "isMain": true, + "environmentVariables": [ + { + "name": "VARIABLE_1", + "value": "APPSETTING_KEY1" + } + ], + "volumeMounts": [ + { + "containerMountPath": "mountPath", + "readOnly": true, + "volumeSubPath": "subPath" + } + ] + } }, { - "name" : "secondcontainer", - "image": "myregistry.io/secondimage:latest", - "target_port": "3000", - "is_main": false, - "auth_type": "SystemIdentity", - "start_up_command": "MyStartupCmd" + "name": "secondcontainer", + "properties": { + "image": "myregistry.io/secondimage:latest", + "targetPort": "3000", + "isMain": false, + "authType": "SystemIdentity", + "startUpCommand": "MyStartupCmd" + } }, { - "name" : "thirdcontainer", - "image": "myregistry.io/thirdimage:latest", - "target_port": "3001", - "is_main": false, - "auth_type": "UserAssigned", - "user_managed_identity_client_id": "ClientID" + "name": "thirdcontainer", + "properties": { + "image": "myregistry.io/thirdimage:latest", + "targetPort": "3001", + "isMain": false, + "authType": "UserAssigned", + "userManagedIdentityClientId": "ClientID" + } }, { - "name" : "thirdcontainer", - "image": "myregistry.io/thirdimage:latest", - "target_port": "3002", - "is_main": false, - "auth_type": "UserCredentials", - "user_name": "Username", - "password_secret": "Password" - }] + "name": "fourthcontainer", + "properties": { + "image": "myregistry.io/fourthimage:latest", + "targetPort": "3002", + "isMain": false, + "authType": "UserCredentials", + "userName": "Username", + "passwordSecret": "Password" + } + } + ] examples: - name: Create a sitecontainer for a linux webapp text: az webapp sitecontainers create --name MyWebApp --resource-group MyResourceGroup --container-name MyContainer --image MyImageRegistry.io/MyImage:latest --target-port 80 --is-main diff --git a/src/azure-cli/azure/cli/command_modules/appservice/custom.py b/src/azure-cli/azure/cli/command_modules/appservice/custom.py index 1d9b785fb5e..a1638101e58 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -1018,6 +1018,33 @@ def __init__(self, name: str, image: str, target_port: str, is_main: bool, start self.volume_mounts = volume_mounts self.environment_variables = environment_variables + @classmethod + def from_json(cls, json_data): + name = json_data.get("name") + properties = json_data.get("properties", {}) + volume_mounts = properties.get("volumeMounts") + if volume_mounts: + for mount in volume_mounts: + if "containerMountPath" in mount: + mount["container_mount_path"] = mount.pop("containerMountPath") + if "volumeSubPath" in mount: + mount["volume_sub_path"] = mount.pop("volumeSubPath") + if "readOnly" in mount: + mount["read_only"] = mount.pop("readOnly") + return cls( + name=name, + image=properties.get("image"), + target_port=properties.get("targetPort"), + is_main=properties.get("isMain"), + start_up_command=properties.get("startUpCommand"), + auth_type=properties.get("authType"), + user_name=properties.get("userName"), + password_secret=properties.get("passwordSecret"), + user_managed_identity_client_id=properties.get("userManagedIdentityClientId"), + volume_mounts=volume_mounts, + environment_variables=properties.get("environmentVariables") + ) + def create_webapp_sitecontainers(cmd, name, resource_group, container_name=None, image=None, target_port=None, slot=None, startup_cmd=None, is_main=None, system_assigned_identity=None, @@ -1043,7 +1070,7 @@ def create_webapp_sitecontainers(cmd, name, resource_group, container_name=None, if not isinstance(sitecontainers_spec_json, list): raise ValidationError("The sitecontainer spec file should contain a list of sitecontainers.") try: - sitecontainers_spec = [SiteContainerSpec(**container) for container in sitecontainers_spec_json] + sitecontainers_spec = [SiteContainerSpec.from_json(container) for container in sitecontainers_spec_json] except Exception as ex: raise ValidationError("Failed to parse the sitecontainer spec file. Error: {}".format(str(ex))) if sitecontainers_spec is None or len(sitecontainers_spec) == 0: @@ -1161,6 +1188,7 @@ def delete_webapp_sitecontainer(cmd, name, resource_group, container_name, slot= except Exception as ex: raise AzureInternalError("Failed to delete sitecontainer '{}'. Error: {}".format(container_name, str(ex))) + def list_webapp_sitecontainers(cmd, name, resource_group, slot=None): web_client = get_mgmt_service_client(cmd.cli_ctx, WebSiteManagementClient).web_apps site_containers = None diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json index 2fbfb467c6f..55f2b2285b7 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json @@ -1,44 +1,49 @@ [ { - "name" : "main", - "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-nginx:latest", - "target_port": "80", - "is_main": true, - "auth_type": "SystemIdentity", - "environment_variables" : [ - { - "name" : "hello", - "value": "world" - }, - { - "name": "lorem", - "value": "ipsum" - } - ], - "volume_mounts": [ - { - "container_mount_path" : "mountPath", - "data": "configData", - "read_only": true, - "volume_sub_path": "subPath" - } - ] + "name": "main", + "properties": { + "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-nginx:latest", + "targetPort": "80", + "isMain": true, + "authType": "SystemIdentity", + "environmentVariables": [ + { + "name": "VARIABLE1", + "value": "APPSETTING_KEY1" + }, + { + "name": "VARIABLE2", + "value": "APPSETTING_KEY2" + } + ], + "volumeMounts": [ + { + "containerMountPath": "mountPath", + "readOnly": true, + "volumeSubPath": "subPath" + } + ] + } }, { - "name" : "sidecardotnet", - "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-dotnetcore:latest", - "target_port": "2000", - "is_main": false, - "auth_type": "UserAssigned", - "user_managed_identity_client_id": "c283d9ab-ed41-4da9-a458-7256a2aa3e74" + "name": "sidecardotnet", + "properties": { + "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-dotnetcore:latest", + "targetPort": "2000", + "isMain": false, + "authType": "UserAssigned", + "userManagedIdentityClientId": "c283d9ab-ed41-4da9-a458-7256a2aa3e74" + } }, { - "name" : "sidecarnodejs", - "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-nodejs:latest", - "target_port": "4000", - "is_main": false, - "auth_type": "UserCredentials", - "user_name": "Username", - "password_secret": "Password" + "name": "sidecarnodejs", + "properties": { + "image": "mcr.microsoft.com/appsvc/docs/sidecars/sample-nodejs:latest", + "targetPort": "4000", + "isMain": false, + "authType": "UserCredentials", + "userName": "Username", + "passwordSecret": "Password" + } } ] \ No newline at end of file diff --git a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_create_update_show_delete.yaml b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_create_update_show_delete.yaml index e79f5a20a12..545a9891ee9 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_create_update_show_delete.yaml +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_sitecontainers_create_update_show_delete.yaml @@ -18,7 +18,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_webapp_sitecontainers000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001","name":"cli_test_webapp_sitecontainers000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","test":"test_webapp_sitecontainers_create_update_show_delete","date":"2025-02-06T18:58:12Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001","name":"cli_test_webapp_sitecontainers000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","test":"test_webapp_sitecontainers_create_update_show_delete","date":"2025-02-10T15:45:53Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +27,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 06 Feb 2025 18:58:18 GMT + - Mon, 10 Feb 2025 15:45:57 GMT expires: - '-1' pragma: @@ -41,7 +41,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: B24B27E6F3934641934A143707E47DB6 Ref B: MAA201060513031 Ref C: 2025-02-06T18:58:18Z' + - 'Ref A: BB1A09B5D8D741F0A85FD011581FF501 Ref B: MAA201060514027 Ref C: 2025-02-10T15:45:58Z' status: code: 200 message: OK @@ -70,8 +70,8 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003?api-version=2023-01-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","name":"webapp-sitecontainers-plan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"eastus","properties":{"serverFarmId":55182,"name":"webapp-sitecontainers-plan000003","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","subscription":"bef29afb-3c08-4894-ae64-43bdd8f3f447","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East - US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"cli_test_webapp_sitecontainers000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-217_55182","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-02-06T18:58:28.0166667"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","name":"webapp-sitecontainers-plan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"eastus","properties":{"serverFarmId":19280,"name":"webapp-sitecontainers-plan000003","sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1},"workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","subscription":"bef29afb-3c08-4894-ae64-43bdd8f3f447","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East + US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"cli_test_webapp_sitecontainers000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-557_19280","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-02-10T15:46:08.9133333"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' headers: cache-control: - no-cache @@ -80,9 +80,9 @@ interactions: content-type: - application/json date: - - Thu, 06 Feb 2025 18:58:29 GMT + - Mon, 10 Feb 2025 15:46:11 GMT etag: - - '"1DB78C91C096920"' + - '"1DB7BD2E7CA3920"' expires: - '-1' pragma: @@ -100,7 +100,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '800' x-msedge-ref: - - 'Ref A: 74B0D38FE90346E69EE97AD083C71B51 Ref B: MAA201060514049 Ref C: 2025-02-06T18:58:18Z' + - 'Ref A: E9920608EAE743F1B09CFC518D18EDB7 Ref B: MAA201060513019 Ref C: 2025-02-10T15:45:58Z' x-powered-by: - ASP.NET status: @@ -126,8 +126,8 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","name":"webapp-sitecontainers-plan000003","type":"Microsoft.Web/serverfarms","kind":"linux","location":"East - US","properties":{"serverFarmId":55182,"name":"webapp-sitecontainers-plan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","subscription":"bef29afb-3c08-4894-ae64-43bdd8f3f447","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":10,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East - US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"cli_test_webapp_sitecontainers000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-217_55182","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":0,"vnetConnectionsMax":2,"createdTime":"2025-02-06T18:58:28.0166667"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + US","properties":{"serverFarmId":19280,"name":"webapp-sitecontainers-plan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","subscription":"bef29afb-3c08-4894-ae64-43bdd8f3f447","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":10,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East + US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"linux","resourceGroup":"cli_test_webapp_sitecontainers000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-557_19280","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":0,"vnetConnectionsMax":2,"createdTime":"2025-02-10T15:46:08.9133333"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' headers: cache-control: - no-cache @@ -136,7 +136,7 @@ interactions: content-type: - application/json date: - - Thu, 06 Feb 2025 18:58:31 GMT + - Mon, 10 Feb 2025 15:46:12 GMT expires: - '-1' pragma: @@ -152,7 +152,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: 87E38940CB744952876903461ACDF147 Ref B: MAA201060514033 Ref C: 2025-02-06T18:58:30Z' + - 'Ref A: C701F9B4BB594DF5A07F26F91BDBCE54 Ref B: MAA201060513047 Ref C: 2025-02-10T15:46:12Z' x-powered-by: - ASP.NET status: @@ -190,7 +190,7 @@ interactions: content-type: - application/json date: - - Thu, 06 Feb 2025 18:58:31 GMT + - Mon, 10 Feb 2025 15:46:13 GMT expires: - '-1' pragma: @@ -206,7 +206,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '16499' x-msedge-ref: - - 'Ref A: E215840FB19D4F279A667B66F330BECA Ref B: MAA201060514039 Ref C: 2025-02-06T18:58:31Z' + - 'Ref A: EA34AA0463EE4ED6B5311D48EF857F50 Ref B: MAA201060516017 Ref C: 2025-02-10T15:46:13Z' x-powered-by: - ASP.NET status: @@ -215,7 +215,7 @@ interactions: - request: body: '{"location": "East US", "properties": {"serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003", "reserved": false, "isXenon": false, "hyperV": false, "siteConfig": {"netFrameworkVersion": - "v4.6", "linuxFxVersion": "sitecontainers", "appSettings": [], "alwaysOn": true, + "v4.6", "linuxFxVersion": "SITECONTAINERS", "appSettings": [], "alwaysOn": true, "localMySqlEnabled": false, "http20Enabled": true}, "scmSiteAlsoStopped": false, "httpsOnly": false}}' headers: @@ -240,20 +240,20 @@ interactions: response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/sites/webapp-sitecontainers-test000002","name":"webapp-sitecontainers-test000002","type":"Microsoft.Web/sites","kind":"app,linux","location":"East - US","properties":{"name":"webapp-sitecontainers-test000002","state":"Running","hostNames":["webapp-sitecontainers-test000002.azurewebsites.net"],"webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","selfLink":"https://waws-prod-blu-217.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux/sites/webapp-sitecontainers-test000002","repositorySiteName":"webapp-sitecontainers-test000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"siteScopedCertificatesEnabled":false,"afdEnabled":false,"enabledHostNames":["webapp-sitecontainers-test000002.azurewebsites.net","webapp-sitecontainers-test000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"sitecontainers"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"webapp-sitecontainers-test000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"webapp-sitecontainers-test000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2025-02-06T18:58:37","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"outboundVnetRouting":{"allTraffic":false,"applicationTraffic":false,"contentShareTraffic":false,"imagePullTraffic":false,"backupRestoreTraffic":false},"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":false,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow + US","properties":{"name":"webapp-sitecontainers-test000002","state":"Running","hostNames":["webapp-sitecontainers-test000002.azurewebsites.net"],"webSpace":"cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux","selfLink":"https://waws-prod-blu-557.api.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/cli_test_webapp_sitecontainers000001-EastUSwebspace-Linux/sites/webapp-sitecontainers-test000002","repositorySiteName":"webapp-sitecontainers-test000002","owner":null,"usageState":"Normal","enabled":true,"adminEnabled":true,"siteScopedCertificatesEnabled":false,"afdEnabled":false,"enabledHostNames":["webapp-sitecontainers-test000002.azurewebsites.net","webapp-sitecontainers-test000002.scm.azurewebsites.net"],"siteProperties":{"metadata":null,"properties":[{"name":"LinuxFxVersion","value":"SITECONTAINERS"},{"name":"WindowsFxVersion","value":null}],"appSettings":null},"availabilityState":"Normal","sslCertificates":null,"csrs":[],"cers":null,"siteMode":null,"hostNameSslStates":[{"name":"webapp-sitecontainers-test000002.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Standard"},{"name":"webapp-sitecontainers-test000002.scm.azurewebsites.net","sslState":"Disabled","ipBasedSslResult":null,"virtualIP":null,"virtualIPv6":null,"thumbprint":null,"certificateResourceId":null,"toUpdate":null,"toUpdateIpBasedSsl":null,"ipBasedSslState":"NotConfigured","hostType":"Repository"}],"computeMode":null,"serverFarm":null,"serverFarmId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_webapp_sitecontainers000001/providers/Microsoft.Web/serverfarms/webapp-sitecontainers-plan000003","reserved":true,"isXenon":false,"hyperV":false,"lastModifiedTimeUtc":"2025-02-10T15:46:18.21","storageRecoveryDefaultState":"Running","contentAvailabilityState":"Normal","runtimeAvailabilityState":"Normal","dnsConfiguration":{},"vnetRouteAllEnabled":false,"containerAllocationSubnet":null,"useContainerLocalhostBindings":null,"vnetImagePullEnabled":false,"vnetContentShareEnabled":false,"outboundVnetRouting":{"allTraffic":false,"applicationTraffic":false,"contentShareTraffic":false,"imagePullTraffic":false,"backupRestoreTraffic":false},"siteConfig":{"numberOfWorkers":1,"defaultDocuments":null,"netFrameworkVersion":null,"phpVersion":null,"pythonVersion":null,"nodeVersion":null,"powerShellVersion":null,"linuxFxVersion":"","windowsFxVersion":null,"windowsConfiguredStacks":null,"requestTracingEnabled":null,"remoteDebuggingEnabled":null,"remoteDebuggingVersion":null,"httpLoggingEnabled":null,"azureMonitorLogCategories":null,"acrUseManagedIdentityCreds":false,"acrUserManagedIdentityID":null,"logsDirectorySizeLimit":null,"detailedErrorLoggingEnabled":null,"publishingUsername":null,"publishingPassword":null,"appSettings":null,"metadata":null,"connectionStrings":null,"machineKey":null,"handlerMappings":null,"documentRoot":null,"scmType":null,"use32BitWorkerProcess":null,"webSocketsEnabled":null,"alwaysOn":false,"javaVersion":null,"javaContainer":null,"javaContainerVersion":null,"appCommandLine":null,"managedPipelineMode":null,"virtualApplications":null,"winAuthAdminState":null,"winAuthTenantState":null,"customAppPoolIdentityAdminState":null,"customAppPoolIdentityTenantState":null,"runtimeADUser":null,"runtimeADUserPassword":null,"loadBalancing":null,"routingRules":null,"experiments":null,"limits":null,"autoHealEnabled":null,"autoHealRules":null,"tracingOptions":null,"vnetName":null,"vnetRouteAllEnabled":null,"vnetPrivatePortsCount":null,"publicNetworkAccess":null,"cors":null,"push":null,"apiDefinition":null,"apiManagementConfig":null,"autoSwapSlotName":null,"localMySqlEnabled":null,"managedServiceIdentityId":null,"xManagedServiceIdentityId":null,"keyVaultReferenceIdentity":null,"ipSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow all","description":"Allow all access"}],"ipSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictions":[{"ipAddress":"Any","action":"Allow","priority":2147483647,"name":"Allow - all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":false,"minTlsVersion":null,"minTlsCipherSuite":null,"scmMinTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmSupportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null,"sitePrivateLinkHostEnabled":null,"clusteringEnabled":false},"functionAppConfig":null,"daprConfig":null,"deploymentId":"webapp-sitecontainers-test000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientAffinityProxyEnabled":false,"blockPathTraversal":false,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"ipMode":"IPv4","vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"D3BA5386ECE3EF692436FA80D86862EA4BBB849B79C16196E232335AC62906B7","kind":"app,linux","managedEnvironmentId":null,"workloadProfileName":null,"resourceConfig":null,"inboundIpAddress":"20.49.104.15","possibleInboundIpAddresses":"20.49.104.15","ftpUsername":"webapp-sitecontainers-test000002\\$webapp-sitecontainers-test000002","ftpsHostName":"ftps://waws-prod-blu-217.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"40.76.167.202,52.146.70.44,52.146.70.103,52.146.68.209,52.146.68.246,52.146.69.57,20.49.104.15","possibleOutboundIpAddresses":"40.76.167.202,52.146.70.44,52.146.70.103,52.146.68.209,52.146.68.246,52.146.69.57,52.146.70.115,52.146.70.118,52.146.70.158,52.146.66.148,52.146.71.5,40.76.165.150,40.76.167.156,40.76.167.157,52.146.68.142,52.146.64.68,52.146.65.22,52.146.65.23,52.191.239.27,52.191.239.78,52.191.239.120,52.224.200.31,52.224.201.90,52.224.202.78,20.49.104.15","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-blu-217","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli_test_webapp_sitecontainers000001","defaultHostName":"webapp-sitecontainers-test000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"functionsRuntimeAdminIsolationEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs,AppServiceAuthenticationLogs","inFlightFeatures":null,"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","autoGeneratedDomainNameLabelScope":null,"defaultHostNameScope":"Global","privateLinkIdentifiers":null,"sshEnabled":null}}' + all","description":"Allow all access"}],"scmIpSecurityRestrictionsDefaultAction":null,"scmIpSecurityRestrictionsUseMain":null,"http20Enabled":false,"minTlsVersion":null,"minTlsCipherSuite":null,"scmMinTlsCipherSuite":null,"supportedTlsCipherSuites":null,"scmSupportedTlsCipherSuites":null,"scmMinTlsVersion":null,"ftpsState":null,"preWarmedInstanceCount":null,"functionAppScaleLimit":null,"elasticWebAppScaleLimit":0,"healthCheckPath":null,"fileChangeAuditEnabled":null,"functionsRuntimeScaleMonitoringEnabled":null,"websiteTimeZone":null,"minimumElasticInstanceCount":0,"azureStorageAccounts":null,"http20ProxyFlag":null,"sitePort":null,"antivirusScanEnabled":null,"storageType":null,"sitePrivateLinkHostEnabled":null,"clusteringEnabled":false},"functionAppConfig":null,"daprConfig":null,"deploymentId":"webapp-sitecontainers-test000002","slotName":null,"trafficManagerHostNames":null,"sku":"Standard","scmSiteAlsoStopped":false,"targetSwapSlot":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"clientAffinityEnabled":true,"clientAffinityProxyEnabled":false,"blockPathTraversal":false,"clientCertEnabled":false,"clientCertMode":"Required","clientCertExclusionPaths":null,"hostNamesDisabled":false,"ipMode":"IPv4","vnetBackupRestoreEnabled":false,"domainVerificationIdentifiers":null,"customDomainVerificationId":"D3BA5386ECE3EF692436FA80D86862EA4BBB849B79C16196E232335AC62906B7","kind":"app,linux","managedEnvironmentId":null,"workloadProfileName":null,"resourceConfig":null,"inboundIpAddress":"20.119.16.52","possibleInboundIpAddresses":"20.119.16.52","ftpUsername":"webapp-sitecontainers-test000002\\$webapp-sitecontainers-test000002","ftpsHostName":"ftps://waws-prod-blu-557.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.253.79.11,20.253.79.20,20.253.79.21,20.253.79.22,20.253.79.23,20.253.79.24,20.253.73.128,20.253.77.121,20.253.78.45,20.253.78.136,20.253.78.137,20.253.78.138,20.119.16.52","possibleOutboundIpAddresses":"20.253.79.11,20.253.79.20,20.253.79.21,20.253.79.22,20.253.79.23,20.253.79.24,20.253.73.128,20.253.77.121,20.253.78.45,20.253.78.136,20.253.78.137,20.253.78.138,20.253.78.139,20.253.78.180,20.253.78.181,20.253.78.182,20.253.78.183,20.253.78.240,20.253.78.241,20.253.78.242,20.253.78.243,20.253.79.8,20.253.79.9,20.253.79.10,20.253.79.25,20.253.79.26,20.253.79.27,20.253.79.224,20.253.79.225,20.253.79.226,20.119.16.52","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-blu-557","cloningInfo":null,"hostingEnvironmentId":null,"tags":null,"resourceGroup":"cli_test_webapp_sitecontainers000001","defaultHostName":"webapp-sitecontainers-test000002.azurewebsites.net","slotSwapStatus":null,"httpsOnly":false,"endToEndEncryptionEnabled":false,"functionsRuntimeAdminIsolationEnabled":false,"redundancyMode":"None","inProgressOperationId":null,"geoDistributions":null,"privateEndpointConnections":null,"publicNetworkAccess":null,"buildVersion":null,"targetBuildVersion":null,"migrationState":null,"eligibleLogCategories":"AppServiceAppLogs,AppServiceAuditLogs,AppServiceConsoleLogs,AppServiceHTTPLogs,AppServiceIPSecAuditLogs,AppServicePlatformLogs,ScanLogs,AppServiceAuthenticationLogs","inFlightFeatures":null,"storageAccountRequired":false,"virtualNetworkSubnetId":null,"keyVaultReferenceIdentity":"SystemAssigned","autoGeneratedDomainNameLabelScope":null,"defaultHostNameScope":"Global","privateLinkIdentifiers":null,"sshEnabled":null}}' headers: cache-control: - no-cache content-length: - - '7876' + - '8033' content-type: - application/json date: - - Thu, 06 Feb 2025 18:58:56 GMT + - Mon, 10 Feb 2025 15:46:37 GMT etag: - - '"1DB78C921058DD5"' + - '"1DB7BD2ED52BF55"' expires: - '-1' pragma: @@ -269,7 +269,7 @@ interactions: x-ms-ratelimit-remaining-subscription-resource-requests: - '499' x-msedge-ref: - - 'Ref A: EC4B84DBC18B4A888FC5A546293B24D0 Ref B: MAA201060514033 Ref C: 2025-02-06T18:58:32Z' + - 'Ref A: 8424F68D4DCF47DB800EF2D4A3C8FE7F Ref B: MAA201060513047 Ref C: 2025-02-10T15:46:13Z' x-powered-by: - ASP.NET status: @@ -305,7 +305,7 @@ interactions: SQLServerDBConnectionString="REDACTED" mySQLDBConnectionString="" hostingProviderForumLink="" controlPanelLink="https://portal.azure.com" webSystem="WebSites">