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..03574c64b7a 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 @@ -2207,6 +2210,127 @@ crafted: true """ +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", + "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", + "properties": { + "image": "myregistry.io/secondimage:latest", + "targetPort": "3000", + "isMain": false, + "authType": "SystemIdentity", + "startUpCommand": "MyStartupCmd" + } + }, + { + "name": "thirdcontainer", + "properties": { + "image": "myregistry.io/thirdimage:latest", + "targetPort": "3001", + "isMain": false, + "authType": "UserAssigned", + "userManagedIdentityClientId": "ClientID" + } + }, + { + "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 + - 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 +""" + + 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 a5b964efeed..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'], @@ -172,6 +173,36 @@ def load_arguments(self, _): c.ignore('language') c.ignore('using_webapp_up') + with self.argument_context("webapp sitecontainers") as c: + 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 73646fcca04..6cf38b50f5b 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/commands.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/commands.py @@ -142,6 +142,15 @@ def load_command_table(self, _): 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') + 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('log', 'get_webapp_sitecontainer_log') + with self.command_group('webapp traffic-routing') as g: g.custom_command('set', 'set_traffic_routing') g.custom_show_command('show', 'show_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..a1638101e58 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/custom.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/custom.py @@ -36,7 +36,8 @@ 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 KeyInfo, SiteContainer, 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 @@ -108,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, @@ -224,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." @@ -431,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 @@ -991,6 +998,237 @@ def progress_callback(current, total): raise ex +class SiteContainerSpec: + # 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 + 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 + + @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, + 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) + 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: + 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 = json.load(file) + if not isinstance(sitecontainers_spec_json, list): + raise ValidationError("The sitecontainer spec file should contain a list of sitecontainers.") + try: + 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: + 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)) + else: + if container_name is None or image is None or target_port is None: + 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 + 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 + 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): + # get the sitecontainer + site_container = None + try: + site_container = get_webapp_sitecontainer(cmd, name, resource_group, container_name, slot) + except: + 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 + 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 + 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 + 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))) + + +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 + 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 "") + 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 AzureInternalError("Failed to fetch sitecontainer status. Error: {}".format(str(ex))) + + +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) + 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 AzureInternalError("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) 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..55f2b2285b7 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/data/sitecontainers_spec.json @@ -0,0 +1,49 @@ +[ + { + "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", + "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", + "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 new file mode 100644 index 00000000000..545a9891ee9 --- /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-10T15:45:53Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '434' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 10 Feb 2025 15:45:57 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: BB1A09B5D8D741F0A85FD011581FF501 Ref B: MAA201060514027 Ref C: 2025-02-10T15:45:58Z' + 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":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 + content-length: + - '1716' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 15:46:11 GMT + etag: + - '"1DB7BD2E7CA3920"' + 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: E9920608EAE743F1B09CFC518D18EDB7 Ref B: MAA201060513019 Ref C: 2025-02-10T15:45:58Z' + 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":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 + content-length: + - '1636' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 15:46:12 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: C701F9B4BB594DF5A07F26F91BDBCE54 Ref B: MAA201060513047 Ref C: 2025-02-10T15:46:12Z' + 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: + - Mon, 10 Feb 2025 15:46:13 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: EA34AA0463EE4ED6B5311D48EF857F50 Ref B: MAA201060516017 Ref C: 2025-02-10T15:46:13Z' + 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-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.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: + - '8033' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 15:46:37 GMT + etag: + - '"1DB7BD2ED52BF55"' + 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: 8424F68D4DCF47DB800EF2D4A3C8FE7F Ref B: MAA201060513047 Ref C: 2025-02-10T15:46:13Z' + 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: + - Mon, 10 Feb 2025 15:46:39 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: AA021B0A6A2F4CB0AC9B0BA67DC543C0 Ref B: MAA201060515021 Ref C: 2025-02-10T15:46:38Z' + 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-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:38.18","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.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":[],"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: + - '7716' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 15:46:40 GMT + etag: + - '"1DB7BD2F89ABA40"' + 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: 1EDDBC6D6B014E6198208EE7E33A694E Ref B: MAA201060515009 Ref C: 2025-02-10T15:46:40Z' + 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-10T15:46:42.4366667","lastModifiedTime":"2025-02-10T15:46:42.4366667","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '703' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 15:46:42 GMT + etag: + - '"1DB7BD2FB243E4B"' + 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: 207324B8D47E44A2867077B1A1F35CA0 Ref B: MAA201060515035 Ref C: 2025-02-10T15:46:41Z' + 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-10T15:46:42.4366667","lastModifiedTime":"2025-02-10T15:46:42.4366667","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '703' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 15:46:43 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: 3868358CE7204388AFD4AD0A1DF097A1 Ref B: MAA201060513021 Ref C: 2025-02-10T15:46:43Z' + 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-10T15:46:42.4366667","lastModifiedTime":"2025-02-10T15:46:42.4366667","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '703' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 15:46: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: B944D90494804BB3BBBA07D8EF13E55A Ref B: MAA201060514011 Ref C: 2025-02-10T15:46:44Z' + 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-10T15:46:42.4366667","lastModifiedTime":"2025-02-10T15:46:46.6033333","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '711' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 15:46:46 GMT + etag: + - '"1DB7BD2FDA006B5"' + 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: AC4E097EB4CA4702838528ED9F937F50 Ref B: MAA201060514047 Ref C: 2025-02-10T15:46:45Z' + 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: + - Mon, 10 Feb 2025 15:46:47 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: 0705CD3B670C44239FA32C07091B091B Ref B: MAA201060515017 Ref C: 2025-02-10T15:46:47Z' + 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: + - Mon, 10 Feb 2025 15:46:48 GMT + etag: + - '"1DB7BD2FF51E26B"' + 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: 7D2CB8F1D1DF4153BD3F127DBCEEFE71 Ref B: MAA201060514009 Ref C: 2025-02-10T15:46:48Z' + 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..19938ff6df9 --- /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-10T16:02:50Z","module":"appservice"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '444' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 10 Feb 2025 16:02:56 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: 9E8E386823AC430494C374BDEB50668C Ref B: MAA201060515017 Ref C: 2025-02-10T16:02:55Z' + 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":13612,"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-551_13612","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-02-10T16:03:07.1233333"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1716' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 16:03:08 GMT + etag: + - '"1DB7BD5466A8C80"' + 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: 5974EE58D49349A2AB1290C248AE4730 Ref B: MAA201060513037 Ref C: 2025-02-10T16:02:56Z' + 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":13612,"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-551_13612","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":0,"vnetConnectionsMax":2,"createdTime":"2025-02-10T16:03:07.1233333"},"sku":{"name":"S1","tier":"Standard","size":"S1","family":"S","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1636' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 16:03: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-global-reads: + - '16499' + x-msedge-ref: + - 'Ref A: A83177BC016F40079402794AC06F0049 Ref B: MAA201060513025 Ref C: 2025-02-10T16:03:09Z' + 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: + - Mon, 10 Feb 2025 16:03:12 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: F89662659E1E451C849854ADF5E46C73 Ref B: MAA201060516033 Ref C: 2025-02-10T16:03:10Z' + 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-551.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-10T16:03:16.3633333","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.8.48","possibleInboundIpAddresses":"20.119.8.48","ftpUsername":"webapp-sitecontainers-test000002\\$webapp-sitecontainers-test000002","ftpsHostName":"ftps://waws-prod-blu-551.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.232.85.129,20.232.86.76,20.232.87.25,20.232.87.238,20.242.209.69,20.242.210.13,20.85.173.5,20.85.173.101,20.85.173.156,20.85.173.167,20.85.173.178,20.85.174.39,20.119.8.48","possibleOutboundIpAddresses":"20.232.85.129,20.232.86.76,20.232.87.25,20.232.87.238,20.242.209.69,20.242.210.13,20.85.173.5,20.85.173.101,20.85.173.156,20.85.173.167,20.85.173.178,20.85.174.39,20.85.174.110,20.121.249.26,20.121.252.94,20.121.253.96,20.121.254.80,20.121.254.174,20.121.255.96,20.121.255.217,20.232.80.57,20.232.81.161,20.232.82.42,20.232.84.63,20.242.210.198,20.242.210.211,20.242.211.205,20.242.212.125,20.242.213.81,20.242.214.136,20.119.8.48","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-blu-551","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: + - '8050' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 16:03:37 GMT + etag: + - '"1DB7BD54BE7E220"' + 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: BF1702D0AACE43CD855AC14D584E2A8A Ref B: MAA201060513025 Ref C: 2025-02-10T16:03:12Z' + 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: + - Mon, 10 Feb 2025 16:03:38 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: DA21953B5D1B46FC887D9EEF6D1A9216 Ref B: MAA201060513017 Ref C: 2025-02-10T16:03:37Z' + 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-551.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-10T16:03:36.71","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.8.48","possibleInboundIpAddresses":"20.119.8.48","ftpUsername":"webapp-sitecontainers-test000002\\$webapp-sitecontainers-test000002","ftpsHostName":"ftps://waws-prod-blu-551.ftp.azurewebsites.windows.net/site/wwwroot","outboundIpAddresses":"20.232.85.129,20.232.86.76,20.232.87.25,20.232.87.238,20.242.209.69,20.242.210.13,20.85.173.5,20.85.173.101,20.85.173.156,20.85.173.167,20.85.173.178,20.85.174.39,20.119.8.48","possibleOutboundIpAddresses":"20.232.85.129,20.232.86.76,20.232.87.25,20.232.87.238,20.242.209.69,20.242.210.13,20.85.173.5,20.85.173.101,20.85.173.156,20.85.173.167,20.85.173.178,20.85.174.39,20.85.174.110,20.121.249.26,20.121.252.94,20.121.253.96,20.121.254.80,20.121.254.174,20.121.255.96,20.121.255.217,20.232.80.57,20.232.81.161,20.232.82.42,20.232.84.63,20.242.210.198,20.242.210.211,20.242.211.205,20.242.212.125,20.242.213.81,20.242.214.136,20.119.8.48","containerSize":0,"dailyMemoryTimeQuota":0,"suspendedTill":null,"siteDisabledReason":0,"functionExecutionUnitsCache":null,"maxNumberOfWorkers":null,"homeStamp":"waws-prod-blu-551","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: + - '7728' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 16:03:38 GMT + etag: + - '"1DB7BD557B21260"' + 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: 3E4A77E2BC6147B7B49645D8A6700B23 Ref B: MAA201060516039 Ref C: 2025-02-10T16:03:38Z' + 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", "readOnly": + true}], "environmentVariables": [{"name": "VARIABLE1", "value": "APPSETTING_KEY1"}, + {"name": "VARIABLE2", "value": "APPSETTING_KEY2"}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - webapp sitecontainers create + Connection: + - keep-alive + Content-Length: + - '382' + 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-10T16:03:41.1833333","lastModifiedTime":"2025-02-10T16:03:41.1833333","volumeMounts":[{"volumeSubPath":"subPath","containerMountPath":"mountPath","data":null,"readOnly":true}],"environmentVariables":[{"name":"VARIABLE1","value":"APPSETTING_KEY1"},{"name":"VARIABLE2","value":"APPSETTING_KEY2"}],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '904' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 16:03:40 GMT + etag: + - '"1DB7BD55A5CA5F5"' + 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: A3154FF7038649BA9B12653960BCABCF Ref B: MAA201060515035 Ref C: 2025-02-10T16:03:39Z' + 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-10T16:03:43.2233333","lastModifiedTime":"2025-02-10T16:03:43.2233333","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '781' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 16:03:43 GMT + etag: + - '"1DB7BD55B93ED75"' + 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: 7D2845EB8F0B48C184B40A9B0CBF2E80 Ref B: MAA201060516021 Ref C: 2025-02-10T16:03:41Z' + 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-10T16:03:45.4633333","lastModifiedTime":"2025-02-10T16:03:45.4633333","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}' + headers: + cache-control: + - no-cache + content-length: + - '758' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 16:03:45 GMT + etag: + - '"1DB7BD55CE9B975"' + 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: 5DDF73280B7443C99D66E3BCE1682448 Ref B: MAA201060513025 Ref C: 2025-02-10T16:03:44Z' + 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-10T16:03:41.1833333","lastModifiedTime":"2025-02-10T16:03:41.1833333","volumeMounts":[{"volumeSubPath":"subPath","containerMountPath":"mountPath","data":null,"readOnly":true}],"environmentVariables":[{"name":"VARIABLE1","value":"APPSETTING_KEY1"},{"name":"VARIABLE2","value":"APPSETTING_KEY2"}],"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-10T16:03:43.2233333","lastModifiedTime":"2025-02-10T16:03:43.2233333","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-10T16:03:45.4633333","lastModifiedTime":"2025-02-10T16:03:45.4633333","volumeMounts":[],"environmentVariables":[],"inheritAppSettingsAndConnectionStrings":null}}],"nextLink":null,"id":null}' + headers: + cache-control: + - no-cache + content-length: + - '2477' + content-type: + - application/json + date: + - Mon, 10 Feb 2025 16:03:47 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: 9DECE47CCF28407FAE0D6657C0297723 Ref B: MAA201060515031 Ref C: 2025-02-10T16:03:46Z' + 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() 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',