diff --git a/src/azure-cli/azure/cli/command_modules/acs/_help.py b/src/azure-cli/azure/cli/command_modules/acs/_help.py index 29571e3b82c..8ab18740353 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/_help.py +++ b/src/azure-cli/azure/cli/command_modules/acs/_help.py @@ -852,16 +852,24 @@ - name: --space -s type: string short-summary: Name of the new or existing dev space to select. Defaults to an interactive selection experience. + - name: --endpoint -e + type: string + short-summary: The endpoint type to be used for a Azure Dev Spaces controller. See https://aka.ms/azds-networking for more information. examples: - name: Use Azure Dev Spaces with a managed Kubernetes cluster, interactively selecting a dev space. text: |- az aks use-dev-spaces -g my-aks-group -n my-aks - - name: Use Azure Dev Spaces with a managed Kubernetes cluster, updating to the latest Azure Dev Spaces \\ client components and selecting a new or existing dev space 'my-space'. + - name: Use Azure Dev Spaces with a managed Kubernetes cluster, updating to the latest Azure Dev Spaces \ + client components and selecting a new or existing dev space 'my-space'. text: |- az aks use-dev-spaces -g my-aks-group -n my-aks --update --space my-space - - name: Use Azure Dev Spaces with a managed Kubernetes cluster, selecting a new or existing dev space \\ 'develop/my-space' without prompting for confirmation. + - name: Use Azure Dev Spaces with a managed Kubernetes cluster, selecting a new or existing dev space \ + 'develop/my-space' without prompting for confirmation. text: |- az aks use-dev-spaces -g my-aks-group -n my-aks -s develop/my-space -y + - name: Use Azure Dev Spaces with a managed Kubernetes cluster with a private endpoint. + text: |- + az aks use-dev-spaces -g my-aks-group -n my-aks -e private """ helps['aks wait'] = """ diff --git a/src/azure-cli/azure/cli/command_modules/acs/_params.py b/src/azure-cli/azure/cli/command_modules/acs/_params.py index 32f024e0e29..5116cc56004 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/_params.py +++ b/src/azure-cli/azure/cli/command_modules/acs/_params.py @@ -308,6 +308,7 @@ def load_arguments(self, _): with self.argument_context('aks use-dev-spaces') as c: c.argument('update', options_list=['--update'], action='store_true') c.argument('space_name', options_list=['--space', '-s']) + c.argument('endpoint_type', get_enum_type(['Public', 'Private', 'None'], default='Public'), options_list=['--endpoint', '-e']) c.argument('prompt', options_list=['--yes', '-y'], action='store_true', help='Do not prompt for confirmation. Requires --space.') with self.argument_context('aks remove-dev-spaces') as c: diff --git a/src/azure-cli/azure/cli/command_modules/acs/custom.py b/src/azure-cli/azure/cli/command_modules/acs/custom.py index 1efe39010a5..859b3fef23f 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/acs/custom.py @@ -2174,7 +2174,8 @@ def aks_upgrade(cmd, client, resource_group_name, name, kubernetes_version, cont DEV_SPACES_EXTENSION_MODULE = 'azext_dev_spaces.custom' -def aks_use_dev_spaces(cmd, client, name, resource_group_name, update=False, space_name=None, prompt=False): +def aks_use_dev_spaces(cmd, client, name, resource_group_name, update=False, space_name=None, + endpoint_type='Public', prompt=False): """ Use Azure Dev Spaces with a managed Kubernetes cluster. @@ -2185,8 +2186,12 @@ def aks_use_dev_spaces(cmd, client, name, resource_group_name, update=False, spa :type resource_group_name: String :param update: Update to the latest Azure Dev Spaces client components. :type update: bool - :param space_name: Name of the new or existing dev space to select. Defaults to an interactive selection experience. + :param space_name: Name of the new or existing dev space to select. Defaults to an \ + interactive selection experience. :type space_name: String + :param endpoint_type: The endpoint type to be used for a Azure Dev Spaces controller. \ + See https://aka.ms/azds-networking for more information. + :type endpoint_type: String :param prompt: Do not prompt for confirmation. Requires --space. :type prompt: bool """ @@ -2194,7 +2199,7 @@ def aks_use_dev_spaces(cmd, client, name, resource_group_name, update=False, spa if _get_or_add_extension(cmd, DEV_SPACES_EXTENSION_NAME, DEV_SPACES_EXTENSION_MODULE, update): azext_custom = _get_azext_module(DEV_SPACES_EXTENSION_NAME, DEV_SPACES_EXTENSION_MODULE) try: - azext_custom.ads_use_dev_spaces(name, resource_group_name, update, space_name, prompt) + azext_custom.ads_use_dev_spaces(name, resource_group_name, update, space_name, endpoint_type, prompt) except TypeError: raise CLIError("Use '--update' option to get the latest Azure Dev Spaces client components.") except AttributeError as ae: