diff --git a/src/aks-preview/azext_aks_preview/__init__.py b/src/aks-preview/azext_aks_preview/__init__.py index 06a96a4fdc0..53670ee9f04 100644 --- a/src/aks-preview/azext_aks_preview/__init__.py +++ b/src/aks-preview/azext_aks_preview/__init__.py @@ -21,7 +21,11 @@ def __init__(self, cli_ctx=None): CUSTOM_MGMT_AKS_PREVIEW, SDKProfile("2021-08-01", {"container_services": "2017-07-01"}), ) - + register_resource_type( + "2020-09-01-hybrid", + CUSTOM_MGMT_AKS_PREVIEW, + SDKProfile("2020-11-01", {"container_services": "2017-07-01"}), + ) acs_custom = CliCommandType(operations_tmpl='azext_aks_preview.custom#{}') super(ContainerServiceCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=acs_custom, diff --git a/src/aks-preview/azext_aks_preview/_completers.py b/src/aks-preview/azext_aks_preview/_completers.py index 11ff607bb31..6febdb258c8 100644 --- a/src/aks-preview/azext_aks_preview/_completers.py +++ b/src/aks-preview/azext_aks_preview/_completers.py @@ -7,7 +7,7 @@ from azure.cli.core.decorators import Completer # pylint: disable=line-too-long -from azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ContainerServiceVMSizeTypes +from azure.cli.core.profiles import ResourceType @Completer @@ -48,6 +48,9 @@ def get_vm_size_completion_list(cmd, prefix, namespace, **kwargs): # pylint: di location = _get_location(cmd.cli_ctx, namespace) result = get_vm_sizes(cmd.cli_ctx, location) + ContainerServiceVMSizeTypes = cmd.get_models('ContainerServiceVMSizeTypes', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') return set(r.name for r in result) & set(c.value for c in ContainerServiceVMSizeTypes) diff --git a/src/aks-preview/azext_aks_preview/_helpers.py b/src/aks-preview/azext_aks_preview/_helpers.py index 880957e45b6..df31d339a0a 100644 --- a/src/aks-preview/azext_aks_preview/_helpers.py +++ b/src/aks-preview/azext_aks_preview/_helpers.py @@ -9,14 +9,17 @@ from azure.cli.core.azclierror import ArgumentUsageError # pylint: disable=no-name-in-module,import-error -from .vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterAPIServerAccessProfile +from azure.cli.core.profiles import ResourceType from ._consts import CONST_CONTAINER_NAME_MAX_LENGTH from ._consts import CONST_OUTBOUND_TYPE_LOAD_BALANCER, CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING, \ CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY -def _populate_api_server_access_profile(api_server_authorized_ip_ranges, instance=None): +def _populate_api_server_access_profile(cmd, api_server_authorized_ip_ranges, instance=None): if instance is None or instance.api_server_access_profile is None: + ManagedClusterAPIServerAccessProfile = cmd.get_models('ManagedClusterAPIServerAccessProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') profile = ManagedClusterAPIServerAccessProfile() else: profile = instance.api_server_access_profile diff --git a/src/aks-preview/azext_aks_preview/_loadbalancer.py b/src/aks-preview/azext_aks_preview/_loadbalancer.py index 133cc955e95..48a79ceacb4 100644 --- a/src/aks-preview/azext_aks_preview/_loadbalancer.py +++ b/src/aks-preview/azext_aks_preview/_loadbalancer.py @@ -6,11 +6,7 @@ from distutils.version import StrictVersion # pylint: disable=no-name-in-module,import-error from knack.log import get_logger -from .vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterLoadBalancerProfile -from .vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterLoadBalancerProfileManagedOutboundIPs -from .vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes -from .vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterLoadBalancerProfileOutboundIPs -from .vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ResourceReference +from azure.cli.core.profiles import ResourceType logger = get_logger(__name__) @@ -26,36 +22,38 @@ def set_load_balancer_sku(sku, kubernetes_version): return "standard" -def update_load_balancer_profile(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, +def update_load_balancer_profile(cmd, managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile): """parse and update an existing load balancer profile""" if not is_load_balancer_profile_provided(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout): return profile - return configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, + return configure_load_balancer_profile(cmd, managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile) -def create_load_balancer_profile(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, +def create_load_balancer_profile(cmd, managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout): """parse and build load balancer profile""" if not is_load_balancer_profile_provided(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout): return None - + ManagedClusterLoadBalancerProfile = cmd.get_models('ManagedClusterLoadBalancerProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') profile = ManagedClusterLoadBalancerProfile() return configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile) -def configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, +def configure_load_balancer_profile(cmd, managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile): """configure a load balancer with customer supplied values""" if not profile: return profile - outbound_ip_resources = _get_load_balancer_outbound_ips(outbound_ips) - outbound_ip_prefix_resources = _get_load_balancer_outbound_ip_prefixes(outbound_ip_prefixes) + outbound_ip_resources = _get_load_balancer_outbound_ips(cmd, outbound_ips) + outbound_ip_prefix_resources = _get_load_balancer_outbound_ip_prefixes(cmd, outbound_ip_prefixes) if managed_outbound_ip_count or outbound_ip_resources or outbound_ip_prefix_resources: # ips -> i_ps due to track 2 naming issue @@ -65,15 +63,27 @@ def configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, out profile.outbound_ip_prefixes = None if managed_outbound_ip_count: # ips -> i_ps due to track 2 naming issue + ManagedClusterLoadBalancerProfileManagedOutboundIPs = cmd.get_models( + 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs( count=managed_outbound_ip_count ) if outbound_ip_resources: # ips -> i_ps due to track 2 naming issue + ManagedClusterLoadBalancerProfileOutboundIPs = cmd.get_models( + 'ManagedClusterLoadBalancerProfileOutboundIPs', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') profile.outbound_i_ps = ManagedClusterLoadBalancerProfileOutboundIPs( public_i_ps=outbound_ip_resources ) if outbound_ip_prefix_resources: + ManagedClusterLoadBalancerProfileOutboundIPPrefixes = cmd.get_models( + 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( public_ip_prefixes=outbound_ip_prefix_resources ) @@ -93,19 +103,23 @@ def is_load_balancer_profile_provided(managed_outbound_ip_count, outbound_ips, i idle_timeout]) -def _get_load_balancer_outbound_ips(load_balancer_outbound_ips): +def _get_load_balancer_outbound_ips(cmd, load_balancer_outbound_ips): """parse load balancer profile outbound IP ids and return an array of references to the outbound IP resources""" load_balancer_outbound_ip_resources = None + ResourceReference = cmd.get_models('ResourceReference', resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') if load_balancer_outbound_ips: load_balancer_outbound_ip_resources = \ [ResourceReference(id=x.strip()) for x in load_balancer_outbound_ips.split(',')] return load_balancer_outbound_ip_resources -def _get_load_balancer_outbound_ip_prefixes(load_balancer_outbound_ip_prefixes): +def _get_load_balancer_outbound_ip_prefixes(cmd, load_balancer_outbound_ip_prefixes): """parse load balancer profile outbound IP prefix ids and return an array \ of references to the outbound IP prefix resources""" load_balancer_outbound_ip_prefix_resources = None + ResourceReference = cmd.get_models('ResourceReference', resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') if load_balancer_outbound_ip_prefixes: load_balancer_outbound_ip_prefix_resources = \ [ResourceReference(id=x.strip()) for x in load_balancer_outbound_ip_prefixes.split(',')] diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 544ca57facb..e38de12a416 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -76,8 +76,8 @@ def load_arguments(self, _): c.argument('load_balancer_outbound_ip_prefixes', type=str, validator=validate_load_balancer_outbound_ip_prefixes) c.argument('load_balancer_outbound_ports', type=int, validator=validate_load_balancer_outbound_ports) c.argument('load_balancer_idle_timeout', type=int, validator=validate_load_balancer_idle_timeout) - c.argument('nat_gateway_managed_outbound_ip_count', type=int, validator=validate_nat_gateway_managed_outbound_ip_count) - c.argument('nat_gateway_idle_timeout', type=int, validator=validate_nat_gateway_idle_timeout) + c.argument('nat_gateway_managed_outbound_ip_count', min_api='2021-07-01', type=int, validator=validate_nat_gateway_managed_outbound_ip_count) + c.argument('nat_gateway_idle_timeout', min_api='2021-07-01', type=int, validator=validate_nat_gateway_idle_timeout) c.argument('outbound_type', arg_type=get_enum_type([CONST_OUTBOUND_TYPE_LOAD_BALANCER, CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING, CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, diff --git a/src/aks-preview/azext_aks_preview/_validators.py b/src/aks-preview/azext_aks_preview/_validators.py index 38038361f41..b78d07018c0 100644 --- a/src/aks-preview/azext_aks_preview/_validators.py +++ b/src/aks-preview/azext_aks_preview/_validators.py @@ -17,7 +17,7 @@ from azure.cli.core.util import CLIError import azure.cli.core.keys as keys -from .vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterPropertiesAutoScalerProfile +from azure.cli.core.profiles import ResourceType from ._helpers import (_fuzzy_match) @@ -289,7 +289,7 @@ def validate_nodepool_tags(ns): ns.nodepool_tags = tags_dict -def validate_cluster_autoscaler_profile(namespace): +def validate_cluster_autoscaler_profile(cmd, namespace): """ Validates that cluster autoscaler profile is acceptable by: 1. Extracting the key[=value] format to map 2. Validating that the key isn't empty and that the key is valid @@ -298,12 +298,15 @@ def validate_cluster_autoscaler_profile(namespace): _extract_cluster_autoscaler_params(namespace) if namespace.cluster_autoscaler_profile is not None: for key in namespace.cluster_autoscaler_profile.keys(): - _validate_cluster_autoscaler_key(key) + _validate_cluster_autoscaler_key(cmd, key) -def _validate_cluster_autoscaler_key(key): +def _validate_cluster_autoscaler_key(cmd, key): if not key: raise CLIError('Empty key specified for cluster-autoscaler-profile') + ManagedClusterPropertiesAutoScalerProfile = cmd.get_models('ManagedClusterPropertiesAutoScalerProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') valid_keys = list(k.replace("_", "-") for k, v in ManagedClusterPropertiesAutoScalerProfile._attribute_map.items()) # pylint: disable=protected-access if key not in valid_keys: raise CLIError('Invalid key specified for cluster-autoscaler-profile: %s' % key) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index d53ccd45fa7..63f41860740 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -49,37 +49,12 @@ from azure.cli.core.util import get_file_json, in_cloud_console, shell_safe_json_parse, truncate_text, sdk_no_wait from azure.cli.core.commands import LongRunningOperation from azure.cli.core._profile import Profile +from azure.cli.core.profiles import ResourceType from azure.graphrbac.models import (ApplicationCreateParameters, PasswordCredential, KeyCredential, ServicePrincipalCreateParameters, GetObjectsParameters) -from .vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import (ContainerServiceLinuxProfile, - ManagedClusterWindowsProfile, - ContainerServiceNetworkProfile, - ManagedClusterServicePrincipalProfile, - ContainerServiceSshConfiguration, - ContainerServiceSshPublicKey, - ManagedCluster, - ManagedClusterAADProfile, - ManagedClusterAddonProfile, - ManagedClusterAgentPoolProfile, - AgentPool, - AgentPoolUpgradeSettings, - ContainerServiceStorageProfileTypes, - ManagedClusterIdentity, - ManagedClusterAPIServerAccessProfile, - ManagedClusterSKU, - ManagedServiceIdentityUserAssignedIdentitiesValue, - ManagedClusterAutoUpgradeProfile, - KubeletConfig, - LinuxOSConfig, - ManagedClusterHTTPProxyConfig, - SysctlConfig, - ManagedClusterPodIdentityProfile, - ManagedClusterPodIdentity, - ManagedClusterPodIdentityException, - UserAssignedIdentity) from ._client_factory import cf_resource_groups from ._client_factory import get_auth_management_client from ._client_factory import get_graph_rbac_management_client @@ -199,9 +174,9 @@ def _build_service_principal(rbac_client, cli_ctx, name, url, client_secret): return service_principal -def _add_role_assignment(cli_ctx, role, service_principal_msi_id, is_service_principal=True, delay=2, scope=None): +def _add_role_assignment(cmd, role, service_principal_msi_id, is_service_principal=True, delay=2, scope=None): # AAD can have delays in propagating data, so sleep and retry - hook = cli_ctx.get_progress_controller(True) + hook = cmd.cli_ctx.get_progress_controller(True) hook.add(message='Waiting for AAD role to propagate', value=0, total_val=1.0) logger.info('Waiting for AAD role to propagate') @@ -211,7 +186,7 @@ def _add_role_assignment(cli_ctx, role, service_principal_msi_id, is_service_pri try: # TODO: break this out into a shared utility library create_role_assignment( - cli_ctx, role, service_principal_msi_id, is_service_principal, scope=scope) + cmd, role, service_principal_msi_id, is_service_principal, scope=scope) break except CloudError as ex: if ex.message == 'The role assignment already exists.': @@ -406,16 +381,16 @@ def create_service_principal(cli_ctx, identifier, resolve_app=True, rbac_client= return rbac_client.service_principals.create(ServicePrincipalCreateParameters(app_id=app_id, account_enabled=True)) -def create_role_assignment(cli_ctx, role, assignee, is_service_principal, resource_group_name=None, scope=None): - return _create_role_assignment(cli_ctx, +def create_role_assignment(cmd, role, assignee, is_service_principal, resource_group_name=None, scope=None): + return _create_role_assignment(cmd, role, assignee, resource_group_name, scope, resolve_assignee=is_service_principal) -def _create_role_assignment(cli_ctx, role, assignee, +def _create_role_assignment(cmd, role, assignee, resource_group_name=None, scope=None, resolve_assignee=True): from azure.cli.core.profiles import ResourceType, get_sdk - factory = get_auth_management_client(cli_ctx, scope) + factory = get_auth_management_client(cmd.cli_ctx, scope) assignments_client = factory.role_assignments definitions_client = factory.role_definitions @@ -429,15 +404,22 @@ def _create_role_assignment(cli_ctx, role, assignee, # If the cluster has service principal resolve the service principal client id to get the object id, # if not use MSI object id. object_id = _resolve_object_id( - cli_ctx, assignee) if resolve_assignee else assignee - RoleAssignmentCreateParameters = get_sdk(cli_ctx, ResourceType.MGMT_AUTHORIZATION, - 'RoleAssignmentCreateParameters', mod='models', - operation_group='role_assignments') - parameters = RoleAssignmentCreateParameters( - role_definition_id=role_id, principal_id=object_id) + cmd.cli_ctx, assignee) if resolve_assignee else assignee assignment_name = uuid.uuid4() custom_headers = None - return assignments_client.create(scope, assignment_name, parameters, custom_headers=custom_headers) + RoleAssignmentCreateParameters = get_sdk(cmd.cli_ctx, ResourceType.MGMT_AUTHORIZATION, + 'RoleAssignmentCreateParameters', mod='models', + operation_group='role_assignments') + if cmd.supported_api_version(min_api='2018-01-01-preview', resource_type=ResourceType.MGMT_AUTHORIZATION): + parameters = RoleAssignmentCreateParameters( + role_definition_id=role_id, principal_id=object_id) + return assignments_client.create(scope, assignment_name, parameters, custom_headers=custom_headers) + + RoleAssignmentProperties = get_sdk(cmd.cli_ctx, ResourceType.MGMT_AUTHORIZATION, + 'RoleAssignmentProperties', mod='models', + operation_group='role_assignments') + properties = RoleAssignmentProperties(role_definition_id=role_id, principal_id=object_id) + return assignments_client.create(scope, assignment_name, properties, custom_headers=custom_headers) def delete_role_assignments(cli_ctx, ids=None, assignee=None, role=None, resource_group_name=None, @@ -599,15 +581,16 @@ def _get_object_stubs(graph_client, assignees): return list(graph_client.objects.get_objects_by_object_ids(params)) -def subnet_role_assignment_exists(cli_ctx, scope): +def subnet_role_assignment_exists(cmd, scope): network_contributor_role_id = "4d97b98b-1d4f-4787-a291-c67834d212e7" - factory = get_auth_management_client(cli_ctx, scope) + factory = get_auth_management_client(cmd.cli_ctx, scope) assignments_client = factory.role_assignments - for i in assignments_client.list_for_scope(scope=scope, filter='atScope()'): - if i.scope == scope and i.role_definition_id.endswith(network_contributor_role_id): - return True + if cmd.supported_api_version(min_api='2018-01-01-preview', resource_type=ResourceType.MGMT_AUTHORIZATION): + for i in assignments_client.list_for_scope(scope=scope, filter='atScope()'): + if i.scope == scope and i.role_definition_id.endswith(network_contributor_role_id): + return True return False @@ -657,6 +640,9 @@ def aks_browse(cmd, # pylint: disable=too-many-statements,too-many-branches disable_browser=False, listen_address='127.0.0.1', listen_port='8001'): + ManagedClusterAddonProfile = cmd.get_models('ManagedClusterAddonProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') # verify the kube-dashboard addon was not disabled instance = client.get(resource_group_name, name) addon_profiles = instance.addon_profiles or {} @@ -799,7 +785,7 @@ def _add_monitoring_role_assignment(result, cluster_resource_id, cmd): is_service_principal = False if service_principal_msi_id is not None: - if not _add_role_assignment(cmd.cli_ctx, 'Monitoring Metrics Publisher', + if not _add_role_assignment(cmd, 'Monitoring Metrics Publisher', service_principal_msi_id, is_service_principal, scope=cluster_resource_id): logger.warning('Could not create a role assignment for Monitoring addon. ' 'Are you an Owner on this subscription?') @@ -838,14 +824,14 @@ def _add_ingress_appgw_addon_role_assignment(result, cmd): parsed_appgw_id = parse_resource_id(appgw_id) appgw_group_id = resource_id(subscription=parsed_appgw_id["subscription"], resource_group=parsed_appgw_id["resource_group"]) - if not _add_role_assignment(cmd.cli_ctx, 'Contributor', + if not _add_role_assignment(cmd, 'Contributor', service_principal_msi_id, is_service_principal, scope=appgw_group_id): logger.warning('Could not create a role assignment for application gateway: %s ' 'specified in %s addon. ' 'Are you an Owner on this subscription?', appgw_id, CONST_INGRESS_APPGW_ADDON_NAME) if CONST_INGRESS_APPGW_SUBNET_ID in config: subnet_id = config[CONST_INGRESS_APPGW_SUBNET_ID] - if not _add_role_assignment(cmd.cli_ctx, 'Network Contributor', + if not _add_role_assignment(cmd, 'Network Contributor', service_principal_msi_id, is_service_principal, scope=subnet_id): logger.warning('Could not create a role assignment for subnet: %s ' 'specified in %s addon. ' @@ -859,7 +845,7 @@ def _add_ingress_appgw_addon_role_assignment(result, cmd): namespace="Microsoft.Network", type="virtualNetworks", name=parsed_subnet_vnet_id["name"]) - if not _add_role_assignment(cmd.cli_ctx, 'Contributor', + if not _add_role_assignment(cmd, 'Contributor', service_principal_msi_id, is_service_principal, scope=vnet_id): logger.warning('Could not create a role assignment for virtual network: %s ' 'specified in %s addon. ' @@ -1040,6 +1026,57 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to no_wait=False, assign_kubelet_identity=None, yes=False): + ManagedClusterWindowsProfile = cmd.get_models('ManagedClusterWindowsProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterSKU = cmd.get_models('ManagedClusterSKU', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ContainerServiceNetworkProfile = cmd.get_models('ContainerServiceNetworkProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ContainerServiceLinuxProfile = cmd.get_models('ContainerServiceLinuxProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterServicePrincipalProfile = cmd.get_models('ManagedClusterServicePrincipalProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ContainerServiceSshConfiguration = cmd.get_models('ContainerServiceSshConfiguration', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ContainerServiceSshPublicKey = cmd.get_models('ContainerServiceSshPublicKey', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterAADProfile = cmd.get_models('ManagedClusterAADProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterAutoUpgradeProfile = cmd.get_models('ManagedClusterAutoUpgradeProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterAgentPoolProfile = cmd.get_models('ManagedClusterAgentPoolProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterIdentity = cmd.get_models('ManagedClusterIdentity', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + UserAssignedIdentity = cmd.get_models( + 'UserAssignedIdentity', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedCluster = cmd.get_models('ManagedCluster', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedServiceIdentityUserAssignedIdentitiesValue = cmd.get_models( + 'ManagedServiceIdentityUserAssignedIdentitiesValue', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterAPIServerAccessProfile = cmd.get_models('ManagedClusterAPIServerAccessProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterPodIdentityProfile = cmd.get_models('ManagedClusterPodIdentityProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + if not no_ssh_key: try: if not ssh_key_value or not is_valid_ssh_rsa_public_key(ssh_key_value): @@ -1111,11 +1148,11 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to enable_cluster_autoscaler, min_count, max_count, node_count, agent_pool_profile) if kubelet_config: - agent_pool_profile.kubelet_config = _get_kubelet_config(kubelet_config) + agent_pool_profile.kubelet_config = _get_kubelet_config(cmd, kubelet_config) if linux_os_config: agent_pool_profile.linux_os_config = _get_linux_os_config( - linux_os_config) + cmd, linux_os_config) linux_profile = None # LinuxProfile is just used for SSH access to VMs, so omit it if --no-ssh-key was specified. @@ -1165,14 +1202,14 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to raise CLIError('When --attach-acr and --enable-managed-identity are both specified, ' '--no-wait is not allowed, please wait until the whole operation succeeds.') else: - _ensure_aks_acr(cmd.cli_ctx, + _ensure_aks_acr(cmd, client_id=service_principal_profile.client_id, acr_name_or_id=attach_acr, subscription_id=subscription_id) need_post_creation_vnet_permission_granting = False if (vnet_subnet_id and not skip_subnet_role_assignment and - not subnet_role_assignment_exists(cmd.cli_ctx, vnet_subnet_id)): + not subnet_role_assignment_exists(cmd, vnet_subnet_id)): # if service_principal_profile is None, then this cluster is an MSI cluster, # and the service principal does not exist. Two cases: # 1. For system assigned identity, we just tell user to grant the @@ -1201,12 +1238,13 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to cmd.cli_ctx, assign_identity) else: identity_client_id = service_principal_profile.client_id - if not _add_role_assignment(cmd.cli_ctx, 'Network Contributor', + if not _add_role_assignment(cmd, 'Network Contributor', identity_client_id, scope=scope): logger.warning('Could not create a role assignment for subnet. ' 'Are you an Owner on this subscription?') load_balancer_profile = create_load_balancer_profile( + cmd, load_balancer_managed_outbound_ip_count, load_balancer_outbound_ips, load_balancer_outbound_ip_prefixes, @@ -1338,7 +1376,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to api_server_access_profile = None if api_server_authorized_ip_ranges: api_server_access_profile = _populate_api_server_access_profile( - api_server_authorized_ip_ranges) + cmd, api_server_authorized_ip_ranges) identity = None if not enable_managed_identity and assign_identity: @@ -1371,7 +1409,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to } cluster_identity_object_id = _get_user_assigned_identity_object_id(cmd.cli_ctx, assign_identity) # ensure the cluster identity has "Managed Identity Operator" role at the scope of kubelet identity - _ensure_cluster_identity_permission_on_kubelet_identity(cmd.cli_ctx, cluster_identity_object_id, assign_kubelet_identity) + _ensure_cluster_identity_permission_on_kubelet_identity(cmd, cluster_identity_object_id, assign_kubelet_identity) pod_identity_profile = None if enable_pod_identity: @@ -1448,7 +1486,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to mc.fqdn_subdomain = fqdn_subdomain if http_proxy_config: - mc.http_proxy_config = _get_http_proxy_config(http_proxy_config) + mc.http_proxy_config = _get_http_proxy_config(cmd, http_proxy_config) if uptime_sla: mc.sku = ManagedClusterSKU( @@ -1548,6 +1586,21 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, windows_admin_password=None, enable_azure_rbac=False, disable_azure_rbac=False): + ManagedClusterAADProfile = cmd.get_models('ManagedClusterAADProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterSKU = cmd.get_models('ManagedClusterSKU', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterAutoUpgradeProfile = cmd.get_models('ManagedClusterAutoUpgradeProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedClusterIdentity = cmd.get_models('ManagedClusterIdentity', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + ManagedServiceIdentityUserAssignedIdentitiesValue = cmd.get_models('ManagedServiceIdentityUserAssignedIdentitiesValue', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') update_autoscaler = enable_cluster_autoscaler or disable_cluster_autoscaler or update_cluster_autoscaler update_acr = attach_acr is not None or detach_acr is not None update_pod_security = enable_pod_security_policy or disable_pod_security_policy @@ -1697,6 +1750,7 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, if update_lb_profile: instance.network_profile.load_balancer_profile = update_load_balancer_profile( + cmd, load_balancer_managed_outbound_ip_count, load_balancer_outbound_ips, load_balancer_outbound_ip_prefixes, @@ -1745,13 +1799,13 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, raise CLIError('Cannot get the AKS cluster\'s service principal.') if attach_acr: - _ensure_aks_acr(cmd.cli_ctx, + _ensure_aks_acr(cmd, client_id=client_id, acr_name_or_id=attach_acr, subscription_id=subscription_id) if detach_acr: - _ensure_aks_acr(cmd.cli_ctx, + _ensure_aks_acr(cmd, client_id=client_id, acr_name_or_id=detach_acr, subscription_id=subscription_id, @@ -1761,7 +1815,7 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, if api_server_authorized_ip_ranges is not None: instance.api_server_access_profile = \ _populate_api_server_access_profile( - api_server_authorized_ip_ranges, instance) + cmd, api_server_authorized_ip_ranges, instance) if enable_aad: if instance.aad_profile is not None and instance.aad_profile.managed: @@ -1862,12 +1916,12 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches, if not _is_pod_identity_addon_enabled(instance): # we only rebuild the pod identity profile if it's disabled before _update_addon_pod_identity( - instance, enable=True, + cmd, instance, enable=True, allow_kubenet_consent=enable_pod_identity_with_kubenet, ) if disable_pod_identity: - _update_addon_pod_identity(instance, enable=False) + _update_addon_pod_identity(cmd, instance, enable=False) azure_keyvault_secrets_provider_addon_profile = None monitoring_addon_enabled = False @@ -2331,6 +2385,9 @@ def _handle_addons_args(cmd, # pylint: disable=too-many-statements aci_subnet_name=None, vnet_subnet_id=None, enable_secret_rotation=False): + ManagedClusterAddonProfile = cmd.get_models('ManagedClusterAddonProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') if not addon_profiles: addon_profiles = {} addons = addons_str.split(',') if addons_str else [] @@ -2966,7 +3023,7 @@ def _create_client_secret(): return client_secret -def _ensure_aks_acr(cli_ctx, +def _ensure_aks_acr(cmd, client_id, acr_name_or_id, subscription_id, # pylint: disable=unused-argument @@ -2977,13 +3034,13 @@ def _ensure_aks_acr(cli_ctx, try: parsed_registry = parse_resource_id(acr_name_or_id) acr_client = cf_container_registry_service( - cli_ctx, subscription_id=parsed_registry['subscription']) + cmd.cli_ctx, subscription_id=parsed_registry['subscription']) registry = acr_client.registries.get( parsed_registry['resource_group'], parsed_registry['name']) except CloudError as ex: raise CLIError(ex.message) _ensure_aks_acr_role_assignment( - cli_ctx, client_id, registry.id, detach) + cmd, client_id, registry.id, detach) return # Check if the ACR exists by name accross all resource groups. @@ -2991,22 +3048,22 @@ def _ensure_aks_acr(cli_ctx, registry_resource = 'Microsoft.ContainerRegistry/registries' try: registry = get_resource_by_name( - cli_ctx, registry_name, registry_resource) + cmd.cli_ctx, registry_name, registry_resource) except CloudError as ex: if 'was not found' in ex.message: raise CLIError( "ACR {} not found. Have you provided the right ACR name?".format(registry_name)) raise CLIError(ex.message) - _ensure_aks_acr_role_assignment(cli_ctx, client_id, registry.id, detach) + _ensure_aks_acr_role_assignment(cmd, client_id, registry.id, detach) return -def _ensure_aks_acr_role_assignment(cli_ctx, +def _ensure_aks_acr_role_assignment(cmd, client_id, registry_id, detach=False): if detach: - if not _delete_role_assignments(cli_ctx, + if not _delete_role_assignments(cmd.cli_ctx, 'acrpull', client_id, scope=registry_id): @@ -3014,7 +3071,7 @@ def _ensure_aks_acr_role_assignment(cli_ctx, 'Are you an Owner on this subscription?') return - if not _add_role_assignment(cli_ctx, + if not _add_role_assignment(cmd, 'acrpull', client_id, scope=registry_id): @@ -3053,7 +3110,7 @@ def _add_virtual_node_role_assignment(cmd, result, vnet_subnet_id): is_service_principal = False if service_principal_msi_id is not None: - if not _add_role_assignment(cmd.cli_ctx, 'Contributor', + if not _add_role_assignment(cmd, 'Contributor', service_principal_msi_id, is_service_principal, scope=vnet_id): logger.warning('Could not create a role assignment for virtual node addon. ' 'Are you an Owner on this subscription?') @@ -3116,6 +3173,15 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local enable_encryption_at_host=False, enable_ultra_ssd=False, no_wait=False): + AgentPool = cmd.get_models('AgentPool', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='agent_pools') + AgentPoolUpgradeSettings = cmd.get_models('AgentPoolUpgradeSettings', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='agent_pools') + ContainerServiceStorageProfileTypes = cmd.get_models('ContainerServiceStorageProfileTypes', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='agent_pools') instances = client.list(resource_group_name, cluster_name) for agentpool_profile in instances: if agentpool_profile.name == nodepool_name: @@ -3187,10 +3253,10 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local agent_pool.os_disk_type = node_osdisk_type if kubelet_config: - agent_pool.kubelet_config = _get_kubelet_config(kubelet_config) + agent_pool.kubelet_config = _get_kubelet_config(cmd, kubelet_config) if linux_os_config: - agent_pool.linux_os_config = _get_linux_os_config(linux_os_config) + agent_pool.linux_os_config = _get_linux_os_config(cmd, linux_os_config) headers = get_aks_custom_headers(aks_custom_headers) return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, agent_pool, headers=headers) @@ -3224,6 +3290,9 @@ def aks_agentpool_upgrade(cmd, # pylint: disable=unused-argument node_image_only=False, max_surge=None, aks_custom_headers=None): + AgentPoolUpgradeSettings = cmd.get_models('AgentPoolUpgradeSettings', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='agent_pools') if kubernetes_version != '' and node_image_only: raise CLIError('Conflicting flags. Upgrading the Kubernetes version will also upgrade node image version.' 'If you only want to upgrade the node version please use the "--node-image-only" option only.') @@ -3271,7 +3340,9 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument max_surge=None, mode=None, no_wait=False): - + AgentPoolUpgradeSettings = cmd.get_models('AgentPoolUpgradeSettings', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='agent_pools') update_autoscaler = enable_cluster_autoscaler + \ disable_cluster_autoscaler + update_cluster_autoscaler @@ -3488,7 +3559,9 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements enable_sgxquotehelper=False, enable_secret_rotation=False, no_wait=False): # pylint: disable=unused-argument - + ManagedClusterAddonProfile = cmd.get_models('ManagedClusterAddonProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') # parse the comma-separated addons argument addon_args = addons.split(',') @@ -3955,7 +4028,7 @@ def _put_managed_cluster_ensuring_permission( if virtual_node_addon_enabled: _add_virtual_node_role_assignment(cmd, cluster, vnet_subnet_id) if need_grant_vnet_permission_to_cluster_identity: - if not _create_role_assignment(cmd.cli_ctx, 'Network Contributor', + if not _create_role_assignment(cmd, 'Network Contributor', cluster.identity.principal_id, scope=vnet_subnet_id, resolve_assignee=False): logger.warning('Could not create a role assignment for subnet. ' @@ -3990,7 +4063,10 @@ def _is_msi_cluster(managed_cluster): (managed_cluster.identity.type.casefold() == "systemassigned" or managed_cluster.identity.type.casefold() == "userassigned")) -def _get_kubelet_config(file_path): +def _get_kubelet_config(cmd, file_path): + KubeletConfig = cmd.get_models('KubeletConfig', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') if not os.path.isfile(file_path): raise CLIError("{} is not valid file, or not accessable.".format(file_path)) kubelet_config = get_file_json(file_path) @@ -4022,7 +4098,10 @@ def _get_kubelet_config(file_path): return config_object -def _get_linux_os_config(file_path): +def _get_linux_os_config(cmd, file_path): + LinuxOSConfig = cmd.get_models('LinuxOSConfig', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') if not os.path.isfile(file_path): raise CLIError("{} is not valid file, or not accessable.".format(file_path)) os_config = get_file_json(file_path) @@ -4040,7 +4119,7 @@ def _get_linux_os_config(file_path): if not isinstance(sysctls, dict): raise CLIError( "Error reading Sysctl settings at {}. Please see https://aka.ms/CustomNodeConfig for correct format.".format(file_path)) - config_object.sysctls = SysctlConfig() + config_object.sysctlSysctlConfigs = () config_object.sysctls.net_core_somaxconn = sysctls.get( "netCoreSomaxconn", None) config_object.sysctls.net_core_netdev_max_backlog = sysctls.get( @@ -4096,7 +4175,10 @@ def _get_linux_os_config(file_path): return config_object -def _get_http_proxy_config(file_path): +def _get_http_proxy_config(cmd, file_path): + ManagedClusterHTTPProxyConfig = cmd.get_models('ManagedClusterHTTPProxyConfig', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') if not os.path.isfile(file_path): raise CLIError("{} is not valid file, or not accessable.".format(file_path)) hp_config = get_file_json(file_path) @@ -4145,7 +4227,10 @@ def _ensure_pod_identity_kubenet_consent(network_profile, pod_identity_profile, pod_identity_profile.allow_network_plugin_kubenet = True -def _update_addon_pod_identity(instance, enable, pod_identities=None, pod_identity_exceptions=None, allow_kubenet_consent=None): +def _update_addon_pod_identity(cmd, instance, enable, pod_identities=None, pod_identity_exceptions=None, allow_kubenet_consent=None): + ManagedClusterPodIdentityProfile = cmd.get_models('ManagedClusterPodIdentityProfile', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') if not enable: # when disable, remove previous saved value instance.pod_identity_profile = ManagedClusterPodIdentityProfile( @@ -4205,7 +4290,7 @@ def _ensure_managed_identity_operator_permission(cli_ctx, instance, scope): logger.debug('Managed Identity Opereator role has been assigned to {}'.format(i.scope)) return - if not _add_role_assignment(cli_ctx, CONST_MANAGED_IDENTITY_OPERATOR_ROLE, cluster_identity_object_id, + if not _add_role_assignment(cmd, CONST_MANAGED_IDENTITY_OPERATOR_ROLE, cluster_identity_object_id, is_service_principal=False, scope=scope): raise CLIError( 'Could not grant Managed Identity Operator permission for cluster') @@ -4220,6 +4305,12 @@ def aks_pod_identity_add(cmd, client, resource_group_name, cluster_name, identity_name, identity_namespace, identity_resource_id, binding_selector=None, no_wait=False): # pylint: disable=unused-argument + ManagedClusterPodIdentity = cmd.get_models('ManagedClusterPodIdentity', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') + UserAssignedIdentity = cmd.get_models('UserAssignedIdentity', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') instance = client.get(resource_group_name, cluster_name) _ensure_pod_identity_addon_is_enabled(instance) @@ -4245,7 +4336,7 @@ def aks_pod_identity_add(cmd, client, resource_group_name, cluster_name, pod_identities.append(pod_identity) _update_addon_pod_identity( - instance, enable=True, + cmd, instance, enable=True, pod_identities=pod_identities, pod_identity_exceptions=instance.pod_identity_profile.user_assigned_identity_exceptions, ) @@ -4269,7 +4360,7 @@ def aks_pod_identity_delete(cmd, client, resource_group_name, cluster_name, pod_identities.append(pod_identity) _update_addon_pod_identity( - instance, enable=True, + cmd, instance, enable=True, pod_identities=pod_identities, pod_identity_exceptions=instance.pod_identity_profile.user_assigned_identity_exceptions, ) @@ -4285,6 +4376,9 @@ def aks_pod_identity_list(cmd, client, resource_group_name, cluster_name): # py def aks_pod_identity_exception_add(cmd, client, resource_group_name, cluster_name, exc_name, exc_namespace, pod_labels, no_wait=False): # pylint: disable=unused-argument + ManagedClusterPodIdentityException = cmd.get_models('ManagedClusterPodIdentityException', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') instance = client.get(resource_group_name, cluster_name) _ensure_pod_identity_addon_is_enabled(instance) @@ -4296,7 +4390,7 @@ def aks_pod_identity_exception_add(cmd, client, resource_group_name, cluster_nam pod_identity_exceptions.append(exc) _update_addon_pod_identity( - instance, enable=True, + cmd, instance, enable=True, pod_identities=instance.pod_identity_profile.user_assigned_identities, pod_identity_exceptions=pod_identity_exceptions, ) @@ -4319,7 +4413,7 @@ def aks_pod_identity_exception_delete(cmd, client, resource_group_name, cluster_ pod_identity_exceptions.append(exc) _update_addon_pod_identity( - instance, enable=True, + cmd, instance, enable=True, pod_identities=instance.pod_identity_profile.user_assigned_identities, pod_identity_exceptions=pod_identity_exceptions, ) @@ -4330,6 +4424,9 @@ def aks_pod_identity_exception_delete(cmd, client, resource_group_name, cluster_ def aks_pod_identity_exception_update(cmd, client, resource_group_name, cluster_name, exc_name, exc_namespace, pod_labels, no_wait=False): # pylint: disable=unused-argument + ManagedClusterPodIdentityException = cmd.get_models('ManagedClusterPodIdentityException', + resource_type=ResourceType.MGMT_CONTAINERSERVICE, + operation_group='managed_clusters') instance = client.get(resource_group_name, cluster_name) _ensure_pod_identity_addon_is_enabled(instance) @@ -4350,7 +4447,7 @@ def aks_pod_identity_exception_update(cmd, client, resource_group_name, cluster_ 'pod identity exception {}/{} not found'.format(exc_namespace, exc_name)) _update_addon_pod_identity( - instance, enable=True, + cmd, instance, enable=True, pod_identities=instance.pod_identity_profile.user_assigned_identities, pod_identity_exceptions=pod_identity_exceptions, ) @@ -4364,8 +4461,8 @@ def aks_pod_identity_exception_list(cmd, client, resource_group_name, cluster_na return _remove_nulls([instance])[0] -def _ensure_cluster_identity_permission_on_kubelet_identity(cli_ctx, cluster_identity_object_id, scope): - factory = get_auth_management_client(cli_ctx, scope) +def _ensure_cluster_identity_permission_on_kubelet_identity(cmd, cluster_identity_object_id, scope): + factory = get_auth_management_client(cmd.cli_ctx, scope) assignments_client = factory.role_assignments for i in assignments_client.list_for_scope(scope=scope, filter='atScope()'): @@ -4378,7 +4475,7 @@ def _ensure_cluster_identity_permission_on_kubelet_identity(cli_ctx, cluster_ide # already assigned return - if not _add_role_assignment(cli_ctx, CONST_MANAGED_IDENTITY_OPERATOR_ROLE, cluster_identity_object_id, + if not _add_role_assignment(cmd, CONST_MANAGED_IDENTITY_OPERATOR_ROLE, cluster_identity_object_id, is_service_principal=False, scope=scope): raise CLIError('Could not grant Managed Identity Operator permission to cluster identity at scope {}'.format(scope)) diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/__init__.py b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/__init__.py new file mode 100644 index 00000000000..34913fb394d --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/__init__.py @@ -0,0 +1,4 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/custom_preparers.py b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/custom_preparers.py new file mode 100644 index 00000000000..0ca2dbea076 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/custom_preparers.py @@ -0,0 +1,39 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os + +from azure.cli.testsdk.preparers import ResourceGroupPreparer + + +class AKSCustomResourceGroupPreparer(ResourceGroupPreparer): + def __init__( + self, + name_prefix="clitest.rg", + parameter_name="resource_group", + parameter_name_for_location="resource_group_location", + location="westus", + dev_setting_name="AZURE_CLI_TEST_DEV_RESOURCE_GROUP_NAME", + dev_setting_location="AZURE_CLI_TEST_DEV_RESOURCE_GROUP_LOCATION", + random_name_length=75, + key="rg", + ): + super(AKSCustomResourceGroupPreparer, self).__init__( + name_prefix, + parameter_name, + parameter_name_for_location, + location, + dev_setting_name, + dev_setting_location, + random_name_length, + key, + ) + + # use environment variable to modify the default value of location + self.dev_setting_location = os.environ.get(dev_setting_location, None) + if self.dev_setting_location: + self.location = self.dev_setting_location + else: + self.dev_setting_location = location diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/httpproxyconfig.json b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/httpproxyconfig.json new file mode 100644 index 00000000000..70319184114 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/httpproxyconfig.json @@ -0,0 +1,8 @@ +{ + "httpProxy": "http://myproxy.server.com:8080/", + "httpsProxy": "https://myproxy.server.com:8080/", + "noProxy": [ + "localhost", + "127.0.0.1" + ] +} diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/kubeletconfig.json b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/kubeletconfig.json new file mode 100644 index 00000000000..ef29e3306d0 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/kubeletconfig.json @@ -0,0 +1,16 @@ +{ + "cpuManagerPolicy": "static", + "cpuCfsQuota": true, + "cpuCfsQuotaPeriod": "200ms", + "imageGcHighThreshold": 90, + "imageGcLowThreshold": 70, + "topologyManagerPolicy": "best-effort", + "allowedUnsafeSysctls": [ + "kernel.msg*", + "net.*" + ], + "failSwapOn": false, + "containerLogMaxFiles": 10, + "podMaxPids": 120, + "containerLogMaxSizeMB": 20 +} \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/linuxosconfig.json b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/linuxosconfig.json new file mode 100644 index 00000000000..be1b9e3cef5 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/linuxosconfig.json @@ -0,0 +1,10 @@ +{ + "transparentHugePageEnabled": "madvise", + "transparentHugePageDefrag": "defer+madvise", + "swapFileSizeMB": 1500, + "sysctls": { + "netCoreSomaxconn": 163849, + "netIpv4TcpTwReuse": true, + "netIpv4IpLocalPortRange": "32000 60000" + } +} \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/maintenanceconfig.json b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/maintenanceconfig.json new file mode 100644 index 00000000000..7a2d251bc4d --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/data/maintenanceconfig.json @@ -0,0 +1,28 @@ +{ + "timeInWeek": [ + { + "day": "Tuesday", + "hour_slots": [ + 1, + 2 + ] + }, + { + "day": "Wednesday", + "hour_slots": [ + 1, + 6 + ] + } + ], + "notAllowedTime": [ + { + "start": "2021-11-26T03:00:00Z", + "end": "2021-11-30T12:00:00Z" + }, + { + "start": "2021-12-26T03:00:00Z", + "end": "2021-12-26T12:00:00Z" + } + ] +} \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recording_processors.py b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recording_processors.py new file mode 100644 index 00000000000..78526209c05 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recording_processors.py @@ -0,0 +1,63 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure_devtools.scenario_tests import RecordingProcessor +from azure_devtools.scenario_tests.utilities import is_text_payload + +MOCK_GUID = '00000000-0000-0000-0000-000000000001' +MOCK_SECRET = 'fake-secret' + + +class KeyReplacer(RecordingProcessor): + + def process_request(self, request): + if is_text_payload(request) and isinstance(request.body, bytes): + request.body = self._replace_byte_keys(request.body) + elif is_text_payload(request) and isinstance(request.body, str): + request.body = self._replace_string_keys(request.body) + return request + + def process_response(self, response): + if is_text_payload(response) and response['body']['string']: + response['body']['string'] = self._replace_string_keys(response['body']['string']) + return response + + # pylint: disable=no-self-use + def _replace_string_keys(self, val): + import re + if 'secret' in val: + val = re.sub(r'"secret":( ?)"([^"]+)"', r'"secret":"{}"' + .format(MOCK_SECRET), val, flags=re.IGNORECASE) + if 'clientId' in val: + val = re.sub(r'"clientId":( ?)"([^"]+)"', r'"clientId":"{}"' + .format(MOCK_GUID), val, flags=re.IGNORECASE) + if 'objectId' in val: + val = re.sub(r'"objectId":( ?)"([^"]+)"', r'"objectId":"{}"' + .format(MOCK_GUID), val, flags=re.IGNORECASE) + if 'principalId' in val: + val = re.sub(r'"principalId":( ?)"([^"]+)"', r'"principalId":"{}"' + .format(MOCK_GUID), val, flags=re.IGNORECASE) + return val + + # pylint: disable=no-self-use + def _replace_byte_keys(self, val): + import re + if b'secret' in val: + val = re.sub(b'"secret":( ?)"([^"]+)"', + ('"secret":"{}"'.format(MOCK_SECRET)).encode('utf-8'), + val, flags=re.IGNORECASE) + if b'clientId' in val: + val = re.sub(b'"clientId":( ?)"([^"]+)"', + ('"clientId":"{}"'.format(MOCK_GUID)).encode('utf-8'), + val, flags=re.IGNORECASE) + if b'objectId' in val: + val = re.sub(b'"objectId":( ?)"([^"]+)"', + ('"objectId":"{}"'.format(MOCK_GUID)).encode('utf-8'), + val, flags=re.IGNORECASE) + if b'principalId' in val: + val = re.sub(b'"principalId":( ?)"([^"]+)"', + ('"principalId":"{}"'.format(MOCK_GUID)).encode('utf-8'), + val, flags=re.IGNORECASE) + return val diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_byo_appgw_with_ingress_appgw_addon.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_byo_appgw_with_ingress_appgw_addon.yaml new file mode 100644 index 00000000000..4653767c990 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_byo_appgw_with_ingress_appgw_addon.yaml @@ -0,0 +1,2065 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefix --subnet-name --subnet-prefix -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:24:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "tags": {}, "properties": {"addressSpace": {"addressPrefixes": + ["11.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"name": "aks-subnet", "properties": + {"addressPrefix": "11.0.0.0/24"}}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + Content-Length: + - '209' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --address-prefix --subnet-name --subnet-prefix -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"d09f1c92-b841-4c17-ad50-e0cf697a393d\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"39972421-b900-4427-8479-0b2b51f3fbb0\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"d09f1c92-b841-4c17-ad50-e0cf697a393d\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/3642bd1b-6520-4acb-b585-168533cd3fc0?api-version=2018-11-01 + cache-control: + - no-cache + content-length: + - '1212' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - f41ce694-a1e4-4c1a-be2e-2669af908c95 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefix --subnet-name --subnet-prefix -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/3642bd1b-6520-4acb-b585-168533cd3fc0?api-version=2018-11-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:10 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 2e0ea45b-8b53-49c5-8867-ff6fdb574e2c + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefix --subnet-name --subnet-prefix -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"5809cfb3-a026-42f4-9e46-fb8386072859\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"39972421-b900-4427-8479-0b2b51f3fbb0\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"5809cfb3-a026-42f4-9e46-fb8386072859\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1214' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:10 GMT + etag: + - W/"5809cfb3-a026-42f4-9e46-fb8386072859" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - a86d8548-aac7-4625-a17f-485594213c0d + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -n --resource-group --vnet-name --address-prefixes -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"5809cfb3-a026-42f4-9e46-fb8386072859\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"39972421-b900-4427-8479-0b2b51f3fbb0\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"5809cfb3-a026-42f4-9e46-fb8386072859\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1214' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:11 GMT + etag: + - W/"5809cfb3-a026-42f4-9e46-fb8386072859" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 75deebe2-ab90-438a-aae0-5e6f722bcaa5 + status: + code: 200 + message: OK +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003", + "location": "westus2", "tags": {}, "etag": "W/\"5809cfb3-a026-42f4-9e46-fb8386072859\"", + "properties": {"addressSpace": {"addressPrefixes": ["11.0.0.0/16"]}, "dhcpOptions": + {"dnsServers": []}, "subnets": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet", + "name": "aks-subnet", "etag": "W/\"5809cfb3-a026-42f4-9e46-fb8386072859\"", + "properties": {"addressPrefix": "11.0.0.0/24", "delegations": [], "provisioningState": + "Succeeded"}}, {"name": "appgw-subnet", "properties": {"addressPrefix": "11.0.1.0/24"}}], + "virtualNetworkPeerings": [], "resourceGuid": "39972421-b900-4427-8479-0b2b51f3fbb0", + "provisioningState": "Succeeded", "enableDdosProtection": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + Content-Length: + - '940' + Content-Type: + - application/json + ParameterSetName: + - -n --resource-group --vnet-name --address-prefixes -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"b2f0f161-7317-4931-a7cb-ca714b43f7f2\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"39972421-b900-4427-8479-0b2b51f3fbb0\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"b2f0f161-7317-4931-a7cb-ca714b43f7f2\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"appgw-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet\",\r\n + \ \"etag\": \"W/\\\"b2f0f161-7317-4931-a7cb-ca714b43f7f2\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"11.0.1.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/f61ca9ff-bef1-472c-a404-2773affce95c?api-version=2018-11-01 + cache-control: + - no-cache + content-length: + - '1726' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:12 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 6d368720-7409-4bd6-8a70-218899fa3b9a + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -n --resource-group --vnet-name --address-prefixes -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/f61ca9ff-bef1-472c-a404-2773affce95c?api-version=2018-11-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 924e8067-a637-46e3-9f96-0c5a60992f29 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -n --resource-group --vnet-name --address-prefixes -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"5f104251-4352-43cc-94d0-5fc563e5d1dd\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"39972421-b900-4427-8479-0b2b51f3fbb0\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"5f104251-4352-43cc-94d0-5fc563e5d1dd\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"appgw-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet\",\r\n + \ \"etag\": \"W/\\\"5f104251-4352-43cc-94d0-5fc563e5d1dd\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"11.0.1.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1729' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:17 GMT + etag: + - W/"5f104251-4352-43cc-94d0-5fc563e5d1dd" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 5cef5103-84bf-4f62-aef2-5f15a06a7267 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + ParameterSetName: + - -n -g --allocation-method --sku -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:24:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "sku": {"name": "Standard"}, "properties": {"publicIPAllocationMethod": + "Static", "publicIPAddressVersion": "IPv4", "idleTimeoutInMinutes": 4}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + Content-Length: + - '167' + Content-Type: + - application/json + ParameterSetName: + - -n -g --allocation-method --sku -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/appgw-ip?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"appgw-ip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/appgw-ip\",\r\n + \ \"etag\": \"W/\\\"df4b7ede-788f-419a-aae9-af1187fbe069\\\"\",\r\n \"location\": + \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"e23dc47e-c2b9-4df1-a0f0-9f543e01fbbf\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Standard\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/801136f6-dfb8-4c97-a6c7-522138381feb?api-version=2018-11-01 + cache-control: + - no-cache + content-length: + - '609' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - f8e200cf-4611-43ff-9aa1-ff09f43ad9b6 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + ParameterSetName: + - -n -g --allocation-method --sku -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/801136f6-dfb8-4c97-a6c7-522138381feb?api-version=2018-11-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 8f729b76-3783-436c-92dd-2b01bedb64fe + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network public-ip create + Connection: + - keep-alive + ParameterSetName: + - -n -g --allocation-method --sku -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/appgw-ip?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"appgw-ip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/appgw-ip\",\r\n + \ \"etag\": \"W/\\\"bfe800f2-3b26-4feb-ace7-ed380a0e26a2\\\"\",\r\n \"location\": + \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"e23dc47e-c2b9-4df1-a0f0-9f543e01fbbf\",\r\n \"ipAddress\": + \"20.190.18.10\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n + \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": + {\r\n \"name\": \"Standard\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '644' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:19 GMT + etag: + - W/"bfe800f2-3b26-4feb-ace7-ed380a0e26a2" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - eb9d4db0-ede1-4011-b7a0-759ca5cf55f9 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:24:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27clitest000001%27%20and%20name%20eq%20%27cliakstest000003%27%20and%20resourceType%20eq%20%27Microsoft.Network%2FvirtualNetworks%27&api-version=2019-10-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003","name":"cliakstest000003","type":"Microsoft.Network/virtualNetworks","location":"westus2","tags":{}}]}' + headers: + cache-control: + - no-cache + content-length: + - '266' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27clitest000001%27%20and%20name%20eq%20%27appgw-ip%27%20and%20resourceType%20eq%20%27Microsoft.Network%2FpublicIPAddresses%27&api-version=2019-10-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/appgw-ip","name":"appgw-ip","type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard"},"location":"westus2"}]}' + headers: + cache-control: + - no-cache + content-length: + - '270' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {}, "variables": {"appGwID": "[resourceId(''Microsoft.Network/applicationGateways'', + ''appgw'')]"}, "resources": [{"type": "Microsoft.Network/applicationGateways", + "name": "appgw", "location": "westus2", "tags": {}, "apiVersion": "2018-11-01", + "dependsOn": [], "properties": {"backendAddressPools": [{"name": "appGatewayBackendPool"}], + "backendHttpSettingsCollection": [{"name": "appGatewayBackendHttpSettings", + "properties": {"Port": 80, "Protocol": "Http", "CookieBasedAffinity": "disabled", + "connectionDraining": {"enabled": false, "drainTimeoutInSec": 1}}}], "frontendIPConfigurations": + [{"name": "appGatewayFrontendIP", "properties": {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/appgw-ip"}}}], + "frontendPorts": [{"name": "appGatewayFrontendPort", "properties": {"Port": + 80}}], "gatewayIPConfigurations": [{"name": "appGatewayFrontendIP", "properties": + {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet"}}}], + "httpListeners": [{"name": "appGatewayHttpListener", "properties": {"FrontendIpConfiguration": + {"Id": "[concat(variables(''appGwID''), ''/frontendIPConfigurations/appGatewayFrontendIP'')]"}, + "FrontendPort": {"Id": "[concat(variables(''appGwID''), ''/frontendPorts/appGatewayFrontendPort'')]"}, + "Protocol": "http", "SslCertificate": null}}], "sku": {"name": "Standard_v2", + "tier": "Standard_v2", "capacity": 2}, "requestRoutingRules": [{"Name": "rule1", + "properties": {"RuleType": "Basic", "httpListener": {"id": "[concat(variables(''appGwID''), + ''/httpListeners/appGatewayHttpListener'')]"}, "backendAddressPool": {"id": + "[concat(variables(''appGwID''), ''/backendAddressPools/appGatewayBackendPool'')]"}, + "backendHttpSettings": {"id": "[concat(variables(''appGwID''), ''/backendHttpSettingsCollection/appGatewayBackendHttpSettings'')]"}}}], + "privateLinkConfigurations": []}, "zones": null}], "outputs": {"applicationGateway": + {"type": "object", "value": "[reference(''appgw'')]"}}}, "parameters": {}, "mode": + "incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + Content-Length: + - '2328' + Content-Type: + - application/json + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/ag_deploy_cgNfvLDBY9lLm5oBnCyOl55s1c56ShZL","name":"ag_deploy_cgNfvLDBY9lLm5oBnCyOl55s1c56ShZL","type":"Microsoft.Resources/deployments","properties":{"templateHash":"17651092418983176301","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-09-24T08:24:22.9580951Z","duration":"PT0.5520149S","correlationId":"5d6881db-6d71-44da-8dc6-8151ba4f34ac","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"applicationGateways","locations":["westus2"]}]}],"dependencies":[]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/ag_deploy_cgNfvLDBY9lLm5oBnCyOl55s1c56ShZL/operationStatuses/08585691350230715392?api-version=2019-10-01 + cache-control: + - no-cache + content-length: + - '663' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585691350230715392?api-version=2019-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585691350230715392?api-version=2019-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:25:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585691350230715392?api-version=2019-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:25:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585691350230715392?api-version=2019-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:26:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585691350230715392?api-version=2019-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:26:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585691350230715392?api-version=2019-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:27:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585691350230715392?api-version=2019-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:27:53 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585691350230715392?api-version=2019-10-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:28:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network application-gateway create + Connection: + - keep-alive + ParameterSetName: + - -n -g --sku --public-ip-address --subnet + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/ag_deploy_cgNfvLDBY9lLm5oBnCyOl55s1c56ShZL","name":"ag_deploy_cgNfvLDBY9lLm5oBnCyOl55s1c56ShZL","type":"Microsoft.Resources/deployments","properties":{"templateHash":"17651092418983176301","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-09-24T08:28:11.0663139Z","duration":"PT3M48.6602337S","correlationId":"5d6881db-6d71-44da-8dc6-8151ba4f34ac","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"applicationGateways","locations":["westus2"]}]}],"dependencies":[],"outputs":{"applicationGateway":{"type":"Object","value":{"provisioningState":"Succeeded","resourceGuid":"95ddeaf1-dfae-4ce2-b9d8-14268694558d","sku":{"name":"Standard_v2","tier":"Standard_v2","capacity":2},"operationalState":"Running","gatewayIPConfigurations":[{"name":"appGatewayFrontendIP","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/gatewayIPConfigurations/appGatewayFrontendIP","etag":"W/\"01d64323-a0e6-4fca-a491-8469f39c7e8c\"","properties":{"provisioningState":"Succeeded","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet"}},"type":"Microsoft.Network/applicationGateways/gatewayIPConfigurations"}],"sslCertificates":[],"trustedRootCertificates":[],"frontendIPConfigurations":[{"name":"appGatewayFrontendIP","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appGatewayFrontendIP","etag":"W/\"01d64323-a0e6-4fca-a491-8469f39c7e8c\"","type":"Microsoft.Network/applicationGateways/frontendIPConfigurations","properties":{"provisioningState":"Succeeded","privateIPAllocationMethod":"Dynamic","publicIPAddress":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/publicIPAddresses/appgw-ip"},"httpListeners":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appGatewayHttpListener"}]}}],"frontendPorts":[{"name":"appGatewayFrontendPort","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appGatewayFrontendPort","etag":"W/\"01d64323-a0e6-4fca-a491-8469f39c7e8c\"","properties":{"provisioningState":"Succeeded","port":80,"httpListeners":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appGatewayHttpListener"}]},"type":"Microsoft.Network/applicationGateways/frontendPorts"}],"backendAddressPools":[{"name":"appGatewayBackendPool","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appGatewayBackendPool","etag":"W/\"01d64323-a0e6-4fca-a491-8469f39c7e8c\"","properties":{"provisioningState":"Succeeded","backendAddresses":[],"requestRoutingRules":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/requestRoutingRules/rule1"}]},"type":"Microsoft.Network/applicationGateways/backendAddressPools"}],"backendHttpSettingsCollection":[{"name":"appGatewayBackendHttpSettings","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appGatewayBackendHttpSettings","etag":"W/\"01d64323-a0e6-4fca-a491-8469f39c7e8c\"","properties":{"provisioningState":"Succeeded","port":80,"protocol":"Http","cookieBasedAffinity":"Disabled","connectionDraining":{"enabled":false,"drainTimeoutInSec":1},"pickHostNameFromBackendAddress":false,"requestTimeout":30,"requestRoutingRules":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/requestRoutingRules/rule1"}]},"type":"Microsoft.Network/applicationGateways/backendHttpSettingsCollection"}],"httpListeners":[{"name":"appGatewayHttpListener","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appGatewayHttpListener","etag":"W/\"01d64323-a0e6-4fca-a491-8469f39c7e8c\"","properties":{"provisioningState":"Succeeded","frontendIPConfiguration":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appGatewayFrontendIP"},"frontendPort":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appGatewayFrontendPort"},"protocol":"Http","requireServerNameIndication":false,"requestRoutingRules":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/requestRoutingRules/rule1"}]},"type":"Microsoft.Network/applicationGateways/httpListeners"}],"urlPathMaps":[],"requestRoutingRules":[{"name":"rule1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/requestRoutingRules/rule1","etag":"W/\"01d64323-a0e6-4fca-a491-8469f39c7e8c\"","properties":{"provisioningState":"Succeeded","ruleType":"Basic","httpListener":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appGatewayHttpListener"},"backendAddressPool":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appGatewayBackendPool"},"backendHttpSettings":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appGatewayBackendHttpSettings"}},"type":"Microsoft.Network/applicationGateways/requestRoutingRules"}],"probes":[],"rewriteRuleSets":[],"redirectConfigurations":[]}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '6821' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:28:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:24:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:28:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestkqkqyqpzp-8db766", "agentPoolProfiles": + [{"count": 3, "vmSize": "Standard_DS2_v2", "vnetSubnetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet", + "osType": "Linux", "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": + false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", + "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {"ingressApplicationGateway": {"enabled": + true, "config": {"applicationGatewayId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw"}}}, + "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "standard"}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1983' + Content-Type: + - application/json + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestkqkqyqpzp-8db766\",\n \"fqdn\": + \"cliakstest-clitestkqkqyqpzp-8db766-4b93f46d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\": + {\n \"applicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw\",\n + \ \"effectiveApplicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/0b1cca2c-5415-485c-b262-51e6526ca16e?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3406' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:28:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/0b1cca2c-5415-485c-b262-51e6526ca16e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"2cca1c0b-1554-5c48-b262-51e6526ca16e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:28:31.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/0b1cca2c-5415-485c-b262-51e6526ca16e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"2cca1c0b-1554-5c48-b262-51e6526ca16e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:28:31.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/0b1cca2c-5415-485c-b262-51e6526ca16e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"2cca1c0b-1554-5c48-b262-51e6526ca16e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:28:31.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:30:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/0b1cca2c-5415-485c-b262-51e6526ca16e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"2cca1c0b-1554-5c48-b262-51e6526ca16e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:28:31.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:30:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/0b1cca2c-5415-485c-b262-51e6526ca16e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"2cca1c0b-1554-5c48-b262-51e6526ca16e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:28:31.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:31:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/0b1cca2c-5415-485c-b262-51e6526ca16e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"2cca1c0b-1554-5c48-b262-51e6526ca16e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:28:31.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:31:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/0b1cca2c-5415-485c-b262-51e6526ca16e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"2cca1c0b-1554-5c48-b262-51e6526ca16e\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:28:31.9166666Z\",\n \"endTime\": + \"2021-09-24T08:31:44.247339Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '169' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestkqkqyqpzp-8db766\",\n \"fqdn\": + \"cliakstest-clitestkqkqyqpzp-8db766-4b93f46d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\": + {\n \"applicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw\",\n + \ \"effectiveApplicationGatewayId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/applicationGateways/appgw\"\n + \ },\n \"identity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ingressapplicationgateway-cliakstest000002\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/9f7b507a-f713-48b3-bf69-56e95d8084a8\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4449' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:03 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2015-07-01 + response: + body: + string: '{"value":[{"properties":{"roleName":"Contributor","type":"BuiltInRole","description":"Grants + full access to manage all resources, but does not allow you to assign roles + in Azure RBAC, manage assignments in Azure Blueprints, or share image galleries.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":["Microsoft.Authorization/*/Delete","Microsoft.Authorization/*/Write","Microsoft.Authorization/elevateAccess/Action","Microsoft.Blueprint/blueprintAssignments/write","Microsoft.Blueprint/blueprintAssignments/delete","Microsoft.Compute/galleries/share/action"]}],"createdOn":"2015-02-02T21:55:09.8806423Z","updatedOn":"2020-12-04T00:34:54.8501087Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","type":"Microsoft.Authorization/roleDefinitions","name":"b24988ac-6180-42a0-ab88-20f7382dd24c"}]}' + headers: + cache-control: + - no-cache + content-length: + - '947' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:32:04 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "principalId":"00000000-0000-0000-0000-000000000001"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Authorization/roleAssignments/cbcfed85-de06-4bbc-b97c-f0dbdb6a3d7e?api-version=2015-07-01 + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"00000000-0000-0000-0000-000000000001","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","createdOn":"2021-09-24T08:32:04.8275284Z","updatedOn":"2021-09-24T08:32:05.5306756Z","createdBy":null,"updatedBy":"9a8b9d31-0042-49a0-a651-96fa94c8d4db"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Authorization/roleAssignments/cbcfed85-de06-4bbc-b97c-f0dbdb6a3d7e","type":"Microsoft.Authorization/roleAssignments","name":"cbcfed85-de06-4bbc-b97c-f0dbdb6a3d7e"}' + headers: + cache-control: + - no-cache + content-length: + - '752' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:32:06 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Network%20Contributor%27&api-version=2015-07-01 + response: + body: + string: '{"value":[{"properties":{"roleName":"Network Contributor","type":"BuiltInRole","description":"Lets + you manage networks, but not access to them.","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Authorization/*/read","Microsoft.Insights/alertRules/*","Microsoft.Network/*","Microsoft.ResourceHealth/availabilityStatuses/read","Microsoft.Resources/deployments/*","Microsoft.Resources/subscriptions/resourceGroups/read","Microsoft.Support/*"],"notActions":[]}],"createdOn":"2015-06-02T00:18:27.3542698Z","updatedOn":"2016-05-31T23:14:00.3326359Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","type":"Microsoft.Authorization/roleDefinitions","name":"4d97b98b-1d4f-4787-a291-c67834d212e7"}]}' + headers: + cache-control: + - no-cache + content-length: + - '836' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:32:06 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7", + "principalId":"00000000-0000-0000-0000-000000000001"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - -n -g --enable-managed-identity --vnet-subnet-id -a --appgw-id --yes --ssh-key-value + -o + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/74477d97-34a6-4b2f-b7f8-916024ef7065?api-version=2015-07-01 + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet","createdOn":"2021-09-24T08:32:08.1684891Z","updatedOn":"2021-09-24T08:32:08.9185023Z","createdBy":null,"updatedBy":"9a8b9d31-0042-49a0-a651-96fa94c8d4db"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/74477d97-34a6-4b2f-b7f8-916024ef7065","type":"Microsoft.Authorization/roleAssignments","name":"74477d97-34a6-4b2f-b7f8-916024ef7065"}' + headers: + cache-control: + - no-cache + content-length: + - '912' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:32:09 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_byo_subnet_with_ingress_appgw_addon.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_byo_subnet_with_ingress_appgw_addon.yaml new file mode 100644 index 00000000000..2b6858d5189 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_byo_subnet_with_ingress_appgw_addon.yaml @@ -0,0 +1,1378 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefix --subnet-name --subnet-prefix -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:24:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "tags": {}, "properties": {"addressSpace": {"addressPrefixes": + ["11.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"name": "aks-subnet", "properties": + {"addressPrefix": "11.0.0.0/24"}}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + Content-Length: + - '209' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --address-prefix --subnet-name --subnet-prefix -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"b69c3974-7ac8-4e2b-8684-e58a16a20db8\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"7ab5dbeb-ee57-406b-b671-33a83dc37dd3\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"b69c3974-7ac8-4e2b-8684-e58a16a20db8\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/a634e501-abea-48ec-8af9-ce6b199b53e3?api-version=2018-11-01 + cache-control: + - no-cache + content-length: + - '1212' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 4460c55a-0b1e-4401-bfae-0cff1d7a3445 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefix --subnet-name --subnet-prefix -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/a634e501-abea-48ec-8af9-ce6b199b53e3?api-version=2018-11-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 15313833-fde3-489b-85b6-4ce1c39639e3 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --address-prefix --subnet-name --subnet-prefix -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"1b125cf6-e302-46fb-9f88-98c0fa52d525\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"7ab5dbeb-ee57-406b-b671-33a83dc37dd3\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"1b125cf6-e302-46fb-9f88-98c0fa52d525\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1214' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:11 GMT + etag: + - W/"1b125cf6-e302-46fb-9f88-98c0fa52d525" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - e696806a-6178-4639-961e-6778b4f34b77 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -n --resource-group --vnet-name --address-prefixes -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"1b125cf6-e302-46fb-9f88-98c0fa52d525\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"7ab5dbeb-ee57-406b-b671-33a83dc37dd3\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"1b125cf6-e302-46fb-9f88-98c0fa52d525\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1214' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:12 GMT + etag: + - W/"1b125cf6-e302-46fb-9f88-98c0fa52d525" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - b3c515b4-5b73-4bad-bcad-ea45ddd6269f + status: + code: 200 + message: OK +- request: + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003", + "location": "westus2", "tags": {}, "etag": "W/\"1b125cf6-e302-46fb-9f88-98c0fa52d525\"", + "properties": {"addressSpace": {"addressPrefixes": ["11.0.0.0/16"]}, "dhcpOptions": + {"dnsServers": []}, "subnets": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet", + "name": "aks-subnet", "etag": "W/\"1b125cf6-e302-46fb-9f88-98c0fa52d525\"", + "properties": {"addressPrefix": "11.0.0.0/24", "delegations": [], "provisioningState": + "Succeeded"}}, {"name": "appgw-subnet", "properties": {"addressPrefix": "11.0.1.0/24"}}], + "virtualNetworkPeerings": [], "resourceGuid": "7ab5dbeb-ee57-406b-b671-33a83dc37dd3", + "provisioningState": "Succeeded", "enableDdosProtection": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + Content-Length: + - '940' + Content-Type: + - application/json + ParameterSetName: + - -n --resource-group --vnet-name --address-prefixes -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"d9df2e0e-1d71-424f-8f8c-4feeb4f5ea1e\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"7ab5dbeb-ee57-406b-b671-33a83dc37dd3\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"d9df2e0e-1d71-424f-8f8c-4feeb4f5ea1e\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"appgw-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet\",\r\n + \ \"etag\": \"W/\\\"d9df2e0e-1d71-424f-8f8c-4feeb4f5ea1e\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"11.0.1.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/1ef76364-9d19-494a-a65e-ee07a3ab4ac3?api-version=2018-11-01 + cache-control: + - no-cache + content-length: + - '1726' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - f84b13fe-2d4d-4385-ba50-e961e108cba7 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -n --resource-group --vnet-name --address-prefixes -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/1ef76364-9d19-494a-a65e-ee07a3ab4ac3?api-version=2018-11-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - b034b28e-2baf-40d5-b3be-b7c0d0537ae6 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -n --resource-group --vnet-name --address-prefixes -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-network/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003?api-version=2018-11-01 + response: + body: + string: "{\r\n \"name\": \"cliakstest000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003\",\r\n + \ \"etag\": \"W/\\\"25a4606d-d909-4a7a-a63f-ab2d17089d57\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"7ab5dbeb-ee57-406b-b671-33a83dc37dd3\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"11.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\r\n + \ \"etag\": \"W/\\\"25a4606d-d909-4a7a-a63f-ab2d17089d57\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"11.0.0.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"appgw-subnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet\",\r\n + \ \"etag\": \"W/\\\"25a4606d-d909-4a7a-a63f-ab2d17089d57\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"11.0.1.0/24\",\r\n \"delegations\": + []\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1729' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:16 GMT + etag: + - W/"25a4606d-d909-4a7a-a63f-ab2d17089d57" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 7386d5e0-b4db-45c8-85db-3222c2d51001 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:24:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestui4xintir-8db766", "agentPoolProfiles": + [{"count": 3, "vmSize": "Standard_DS2_v2", "vnetSubnetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet", + "osType": "Linux", "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": + false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", + "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {"ingressApplicationGateway": {"enabled": + true, "config": {"applicationGatewayName": "gateway", "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet"}}}, + "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "standard"}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '2036' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestui4xintir-8db766\",\n \"fqdn\": + \"cliakstest-clitestui4xintir-8db766-bc6e0af7.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\": + {\n \"applicationGatewayName\": \"gateway\",\n \"effectiveApplicationGatewayId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/gateway\",\n + \ \"subnetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3495' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:24:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:24:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:25:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:25:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:26:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:26:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:28:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/1d801951-149e-4703-8a2b-b68c7b949195?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"5119801d-9e14-0347-8a2b-b68c7b949195\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:24:22.6966666Z\",\n \"endTime\": + \"2021-09-24T08:28:25.8396493Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:28:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestui4xintir-8db766\",\n \"fqdn\": + \"cliakstest-clitestui4xintir-8db766-bc6e0af7.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ingressApplicationGateway\": {\n \"enabled\": true,\n \"config\": + {\n \"applicationGatewayName\": \"gateway\",\n \"effectiveApplicationGatewayId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/applicationGateways/gateway\",\n + \ \"subnetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet\"\n + \ },\n \"identity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ingressapplicationgateway-cliakstest000002\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/a2e6e9e5-00d1-4118-8599-79b2e8b4399a\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4538' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:28:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Network%20Contributor%27&api-version=2015-07-01 + response: + body: + string: '{"value":[{"properties":{"roleName":"Network Contributor","type":"BuiltInRole","description":"Lets + you manage networks, but not access to them.","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Authorization/*/read","Microsoft.Insights/alertRules/*","Microsoft.Network/*","Microsoft.ResourceHealth/availabilityStatuses/read","Microsoft.Resources/deployments/*","Microsoft.Resources/subscriptions/resourceGroups/read","Microsoft.Support/*"],"notActions":[]}],"createdOn":"2015-06-02T00:18:27.3542698Z","updatedOn":"2016-05-31T23:14:00.3326359Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","type":"Microsoft.Authorization/roleDefinitions","name":"4d97b98b-1d4f-4787-a291-c67834d212e7"}]}' + headers: + cache-control: + - no-cache + content-length: + - '836' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:28:54 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7", + "principalId":"00000000-0000-0000-0000-000000000001"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet/providers/Microsoft.Authorization/roleAssignments/cc0a0e57-3730-41a3-974b-ce28ed5e9b80?api-version=2015-07-01 + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet","createdOn":"2021-09-24T08:28:55.7929413Z","updatedOn":"2021-09-24T08:28:56.5273760Z","createdBy":null,"updatedBy":"9a8b9d31-0042-49a0-a651-96fa94c8d4db"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/appgw-subnet/providers/Microsoft.Authorization/roleAssignments/cc0a0e57-3730-41a3-974b-ce28ed5e9b80","type":"Microsoft.Authorization/roleAssignments","name":"cc0a0e57-3730-41a3-974b-ce28ed5e9b80"}' + headers: + cache-control: + - no-cache + content-length: + - '916' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:28:57 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Network%20Contributor%27&api-version=2015-07-01 + response: + body: + string: '{"value":[{"properties":{"roleName":"Network Contributor","type":"BuiltInRole","description":"Lets + you manage networks, but not access to them.","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Authorization/*/read","Microsoft.Insights/alertRules/*","Microsoft.Network/*","Microsoft.ResourceHealth/availabilityStatuses/read","Microsoft.Resources/deployments/*","Microsoft.Resources/subscriptions/resourceGroups/read","Microsoft.Support/*"],"notActions":[]}],"createdOn":"2015-06-02T00:18:27.3542698Z","updatedOn":"2016-05-31T23:14:00.3326359Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","type":"Microsoft.Authorization/roleDefinitions","name":"4d97b98b-1d4f-4787-a291-c67834d212e7"}]}' + headers: + cache-control: + - no-cache + content-length: + - '836' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:28:58 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7", + "principalId":"00000000-0000-0000-0000-000000000001"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '233' + Content-Type: + - application/json; charset=utf-8 + Cookie: + - x-ms-gateway-slice=Production + ParameterSetName: + - --resource-group --name --enable-managed-identity --vnet-subnet-id -a --appgw-name + --appgw-subnet-id --yes --ssh-key-value -o + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-authorization/0.61.0 Azure-SDK-For-Python AZURECLI/2.28.1 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/670c44ad-e1bf-4e61-9dd4-e18e1cb27f7f?api-version=2015-07-01 + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet","createdOn":"2021-09-24T08:28:59.1137223Z","updatedOn":"2021-09-24T08:28:59.8012452Z","createdBy":null,"updatedBy":"9a8b9d31-0042-49a0-a651-96fa94c8d4db"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000003/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/670c44ad-e1bf-4e61-9dd4-e18e1cb27f7f","type":"Microsoft.Authorization/roleAssignments","name":"670c44ad-e1bf-4e61-9dd4-e18e1cb27f7f"}' + headers: + cache-control: + - no-cache + content-length: + - '912' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:29:01 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_aadv1_and_update_with_managed_aad.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_aadv1_and_update_with_managed_aad.yaml new file mode 100644 index 00000000000..7c50991813e --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_aadv1_and_update_with_managed_aad.yaml @@ -0,0 +1,979 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:24:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:08 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitesthfgrmiwlf-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "aadProfile": {"clientAppID": "00000000-0000-0000-0000-000000000002", "serverAppID": + "00000000-0000-0000-0000-000000000001", "serverAppSecret": "fake-secret", "tenantID": + "d5b55040-0c14-48cc-a028-91457fc190d9"}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1787' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitesthfgrmiwlf-8db766\",\n \"fqdn\": + \"cliakstest-clitesthfgrmiwlf-8db766-742f574e.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"aadProfile\": {\n \"adminGroupObjectIDs\": + null,\n \"clientAppID\": \"00000000-0000-0000-0000-000000000002\",\n \"serverAppID\": + \"00000000-0000-0000-0000-000000000001\",\n \"tenantID\": \"d5b55040-0c14-48cc-a028-91457fc190d9\"\n + \ },\n \"maxAgentPools\": 100\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n + \ \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\": + \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\": + \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6fe32a45-fd72-4b0e-a076-9b865b18ddba?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2981' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:24:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6fe32a45-fd72-4b0e-a076-9b865b18ddba?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"452ae36f-72fd-0e4b-a076-9b865b18ddba\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:14.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:24:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6fe32a45-fd72-4b0e-a076-9b865b18ddba?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"452ae36f-72fd-0e4b-a076-9b865b18ddba\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:14.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:25:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6fe32a45-fd72-4b0e-a076-9b865b18ddba?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"452ae36f-72fd-0e4b-a076-9b865b18ddba\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:14.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:25:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6fe32a45-fd72-4b0e-a076-9b865b18ddba?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"452ae36f-72fd-0e4b-a076-9b865b18ddba\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:14.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:26:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6fe32a45-fd72-4b0e-a076-9b865b18ddba?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"452ae36f-72fd-0e4b-a076-9b865b18ddba\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:14.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:26:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6fe32a45-fd72-4b0e-a076-9b865b18ddba?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"452ae36f-72fd-0e4b-a076-9b865b18ddba\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:14.0233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/6fe32a45-fd72-4b0e-a076-9b865b18ddba?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"452ae36f-72fd-0e4b-a076-9b865b18ddba\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:24:14.0233333Z\",\n \"endTime\": + \"2021-09-24T08:27:32.9979454Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --aad-server-app-id --aad-server-app-secret + --aad-client-app-id --aad-tenant-id --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitesthfgrmiwlf-8db766\",\n \"fqdn\": + \"cliakstest-clitesthfgrmiwlf-8db766-742f574e.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/4572b089-c73e-41a3-b5cb-9c09e32d31f6\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"adminGroupObjectIDs\": null,\n \"clientAppID\": \"00000000-0000-0000-0000-000000000002\",\n + \ \"serverAppID\": \"00000000-0000-0000-0000-000000000001\",\n \"tenantID\": + \"d5b55040-0c14-48cc-a028-91457fc190d9\"\n },\n \"maxAgentPools\": 100,\n + \ \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3644' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitesthfgrmiwlf-8db766\",\n \"fqdn\": + \"cliakstest-clitesthfgrmiwlf-8db766-742f574e.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/4572b089-c73e-41a3-b5cb-9c09e32d31f6\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"adminGroupObjectIDs\": null,\n \"clientAppID\": \"00000000-0000-0000-0000-000000000002\",\n + \ \"serverAppID\": \"00000000-0000-0000-0000-000000000001\",\n \"tenantID\": + \"d5b55040-0c14-48cc-a028-91457fc190d9\"\n },\n \"maxAgentPools\": 100,\n + \ \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3644' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "1.20.9", "dnsPrefix": "cliakstest-clitesthfgrmiwlf-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": + "Managed", "maxPods": 110, "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.20.9", "enableNodePublicIP": false, + "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": + {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", "enableRBAC": + true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "Standard", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/4572b089-c73e-41a3-b5cb-9c09e32d31f6"}]}}, + "aadProfile": {"managed": true, "adminGroupObjectIDs": ["00000000-0000-0000-0000-000000000003"], + "tenantID": "00000000-0000-0000-0000-000000000004"}, "identityProfile": {"kubeletidentity": + {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}}, + "location": "westus2", "sku": {"name": "Basic", "tier": "Free"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2532' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitesthfgrmiwlf-8db766\",\n \"fqdn\": + \"cliakstest-clitesthfgrmiwlf-8db766-742f574e.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/4572b089-c73e-41a3-b5cb-9c09e32d31f6\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000003\"\n + \ ],\n \"tenantID\": \"00000000-0000-0000-0000-000000000004\"\n },\n + \ \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2d86fff9-fa81-4a71-837d-8ac85f18172c?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3592' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2d86fff9-fa81-4a71-837d-8ac85f18172c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f9ff862d-81fa-714a-837d-8ac85f18172c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:27:49.1666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:28:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2d86fff9-fa81-4a71-837d-8ac85f18172c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f9ff862d-81fa-714a-837d-8ac85f18172c\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:27:49.1666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:28:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/2d86fff9-fa81-4a71-837d-8ac85f18172c?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f9ff862d-81fa-714a-837d-8ac85f18172c\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:27:49.1666666Z\",\n \"endTime\": + \"2021-09-24T08:28:52.1055458Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitesthfgrmiwlf-8db766\",\n \"fqdn\": + \"cliakstest-clitesthfgrmiwlf-8db766-742f574e.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/4572b089-c73e-41a3-b5cb-9c09e32d31f6\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000003\"\n + \ ],\n \"tenantID\": \"00000000-0000-0000-0000-000000000004\"\n },\n + \ \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3594' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_addon_with_azurekeyvaultsecretsprovider_with_secret_rotation.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_addon_with_azurekeyvaultsecretsprovider_with_secret_rotation.yaml new file mode 100644 index 00000000000..e3ab5bd7132 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_addon_with_azurekeyvaultsecretsprovider_with_secret_rotation.yaml @@ -0,0 +1,109 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -a --enable-secret-rotation --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-22T06:52:58Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 22 Sep 2021 06:53:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestx2jgvmvkh-8db766", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", + "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, + "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": + false, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", + "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {"azureKeyvaultSecretsProvider": {"enabled": + true, "config": {"enableSecretRotation": "true"}}}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "disableLocalAccounts": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1778' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name -a --enable-secret-rotation --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"code\": \"AzureKeyvaultSecretsProviderAddonFeatureFlagNotEnabled\",\n + \ \"message\": \"AzureKeyvaultSecretsProvider addon is not allowed since feature + 'Microsoft.ContainerService/AKS-AzureKeyVaultSecretsProvider' is not enabled. + Please see https://aka.ms/aks/previews for how to enable features.\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '296' + content-type: + - application/json + date: + - Wed, 22 Sep 2021 06:53:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_aad.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_aad.yaml new file mode 100644 index 00000000000..0c6bc0e0e6b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_aad.yaml @@ -0,0 +1,970 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:24:03Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:24:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitests35y22gub-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "aadProfile": {"managed": true, "enableAzureRBAC": false, "adminGroupObjectIDs": + ["00000000-0000-0000-0000-000000000001"]}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1699' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitests35y22gub-8db766\",\n \"fqdn\": + \"cliakstest-clitests35y22gub-8db766-2fd66844.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"aadProfile\": {\n \"managed\": true,\n \"adminGroupObjectIDs\": + [\n \"00000000-0000-0000-0000-000000000001\"\n ],\n \"enableAzureRBAC\": + false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n + \ \"maxAgentPools\": 100\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n + \ \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\": + \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\": + \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ceb956f6-84a9-475d-a29c-48bc7ddd5279?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2961' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:24:10 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ceb956f6-84a9-475d-a29c-48bc7ddd5279?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f656b9ce-a984-5d47-a29c-48bc7ddd5279\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:11.24Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:24:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ceb956f6-84a9-475d-a29c-48bc7ddd5279?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f656b9ce-a984-5d47-a29c-48bc7ddd5279\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:11.24Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:25:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ceb956f6-84a9-475d-a29c-48bc7ddd5279?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f656b9ce-a984-5d47-a29c-48bc7ddd5279\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:11.24Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:25:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ceb956f6-84a9-475d-a29c-48bc7ddd5279?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f656b9ce-a984-5d47-a29c-48bc7ddd5279\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:11.24Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:26:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ceb956f6-84a9-475d-a29c-48bc7ddd5279?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f656b9ce-a984-5d47-a29c-48bc7ddd5279\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:11.24Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:26:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ceb956f6-84a9-475d-a29c-48bc7ddd5279?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f656b9ce-a984-5d47-a29c-48bc7ddd5279\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:24:11.24Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ceb956f6-84a9-475d-a29c-48bc7ddd5279?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"f656b9ce-a984-5d47-a29c-48bc7ddd5279\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:24:11.24Z\",\n \"endTime\": + \"2021-09-24T08:27:29.617766Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '164' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitests35y22gub-8db766\",\n \"fqdn\": + \"cliakstest-clitests35y22gub-8db766-2fd66844.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/415e73e4-8ed6-4818-b7c2-9f666377b665\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"enableAzureRBAC\": false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3624' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --aad-admin-group-object-ids --aad-tenant-id -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitests35y22gub-8db766\",\n \"fqdn\": + \"cliakstest-clitests35y22gub-8db766-2fd66844.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/415e73e4-8ed6-4818-b7c2-9f666377b665\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"enableAzureRBAC\": false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3624' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "1.20.9", "dnsPrefix": "cliakstest-clitests35y22gub-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": + "Managed", "maxPods": 110, "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.20.9", "enableNodePublicIP": false, + "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": + {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", "enableRBAC": + true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "Standard", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/415e73e4-8ed6-4818-b7c2-9f666377b665"}]}}, + "aadProfile": {"managed": true, "enableAzureRBAC": false, "adminGroupObjectIDs": + ["00000000-0000-0000-0000-000000000002"], "tenantID": "00000000-0000-0000-0000-000000000003"}, + "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}}, + "location": "westus2", "sku": {"name": "Basic", "tier": "Free"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2558' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --aad-admin-group-object-ids --aad-tenant-id -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitests35y22gub-8db766\",\n \"fqdn\": + \"cliakstest-clitests35y22gub-8db766-2fd66844.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/415e73e4-8ed6-4818-b7c2-9f666377b665\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000002\"\n + \ ],\n \"enableAzureRBAC\": false,\n \"tenantID\": \"00000000-0000-0000-0000-000000000003\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/e6d40215-0c8c-48cc-9878-e0512891a83d?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3622' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:27:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --aad-admin-group-object-ids --aad-tenant-id -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/e6d40215-0c8c-48cc-9878-e0512891a83d?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1502d4e6-8c0c-cc48-9878-e0512891a83d\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:27:46.0866666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:28:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --aad-admin-group-object-ids --aad-tenant-id -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/e6d40215-0c8c-48cc-9878-e0512891a83d?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1502d4e6-8c0c-cc48-9878-e0512891a83d\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:27:46.0866666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:28:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --aad-admin-group-object-ids --aad-tenant-id -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/e6d40215-0c8c-48cc-9878-e0512891a83d?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"1502d4e6-8c0c-cc48-9878-e0512891a83d\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:27:46.0866666Z\",\n \"endTime\": + \"2021-09-24T08:28:53.0464448Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --aad-admin-group-object-ids --aad-tenant-id -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitests35y22gub-8db766\",\n \"fqdn\": + \"cliakstest-clitests35y22gub-8db766-2fd66844.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/415e73e4-8ed6-4818-b7c2-9f666377b665\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000002\"\n + \ ],\n \"enableAzureRBAC\": false,\n \"tenantID\": \"00000000-0000-0000-0000-000000000003\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3624' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_aad_enable_azure_rbac.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_aad_enable_azure_rbac.yaml new file mode 100644 index 00000000000..41bab74b9eb --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_aad_enable_azure_rbac.yaml @@ -0,0 +1,1202 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:32:12Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:32:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestxoevmpj5g-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "aadProfile": {"managed": true, "enableAzureRBAC": false, "adminGroupObjectIDs": + ["00000000-0000-0000-0000-000000000001"]}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1699' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestxoevmpj5g-8db766\",\n \"fqdn\": + \"cliakstest-clitestxoevmpj5g-8db766-e2078b1d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"aadProfile\": {\n \"managed\": true,\n \"adminGroupObjectIDs\": + [\n \"00000000-0000-0000-0000-000000000001\"\n ],\n \"enableAzureRBAC\": + false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n + \ \"maxAgentPools\": 100\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n + \ \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\": + \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\": + \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/7f79180e-0de0-4c95-a74c-79f4e72fb150?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2961' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/7f79180e-0de0-4c95-a74c-79f4e72fb150?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"0e18797f-e00d-954c-a74c-79f4e72fb150\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:32:16.56Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/7f79180e-0de0-4c95-a74c-79f4e72fb150?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"0e18797f-e00d-954c-a74c-79f4e72fb150\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:32:16.56Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:33:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/7f79180e-0de0-4c95-a74c-79f4e72fb150?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"0e18797f-e00d-954c-a74c-79f4e72fb150\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:32:16.56Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:33:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/7f79180e-0de0-4c95-a74c-79f4e72fb150?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"0e18797f-e00d-954c-a74c-79f4e72fb150\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:32:16.56Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/7f79180e-0de0-4c95-a74c-79f4e72fb150?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"0e18797f-e00d-954c-a74c-79f4e72fb150\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:32:16.56Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/7f79180e-0de0-4c95-a74c-79f4e72fb150?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"0e18797f-e00d-954c-a74c-79f4e72fb150\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:32:16.56Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/7f79180e-0de0-4c95-a74c-79f4e72fb150?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"0e18797f-e00d-954c-a74c-79f4e72fb150\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:32:16.56Z\",\n \"endTime\": + \"2021-09-24T08:35:31.1833251Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '165' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --enable-aad --aad-admin-group-object-ids + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestxoevmpj5g-8db766\",\n \"fqdn\": + \"cliakstest-clitestxoevmpj5g-8db766-e2078b1d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/7a1dc30a-1fa6-4fe2-b2d9-417467ba0d2b\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"enableAzureRBAC\": false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3624' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestxoevmpj5g-8db766\",\n \"fqdn\": + \"cliakstest-clitestxoevmpj5g-8db766-e2078b1d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/7a1dc30a-1fa6-4fe2-b2d9-417467ba0d2b\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"enableAzureRBAC\": false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3624' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "1.20.9", "dnsPrefix": "cliakstest-clitestxoevmpj5g-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": + "Managed", "maxPods": 110, "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.20.9", "enableNodePublicIP": false, + "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": + {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", "enableRBAC": + true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "Standard", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/7a1dc30a-1fa6-4fe2-b2d9-417467ba0d2b"}]}}, + "aadProfile": {"managed": true, "enableAzureRBAC": true, "adminGroupObjectIDs": + ["00000000-0000-0000-0000-000000000001"], "tenantID": "72f988bf-86f1-41af-91ab-2d7cd011db47"}, + "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}}, + "location": "westus2", "sku": {"name": "Basic", "tier": "Free"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2557' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestxoevmpj5g-8db766\",\n \"fqdn\": + \"cliakstest-clitestxoevmpj5g-8db766-e2078b1d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/7a1dc30a-1fa6-4fe2-b2d9-417467ba0d2b\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"enableAzureRBAC\": true,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3135c733-9104-493b-8806-96e4200acc7b?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3621' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3135c733-9104-493b-8806-96e4200acc7b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"33c73531-0491-3b49-8806-96e4200acc7b\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:35:51.9833333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3135c733-9104-493b-8806-96e4200acc7b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"33c73531-0491-3b49-8806-96e4200acc7b\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:35:51.9833333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3135c733-9104-493b-8806-96e4200acc7b?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"33c73531-0491-3b49-8806-96e4200acc7b\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:35:51.9833333Z\",\n \"endTime\": + \"2021-09-24T08:36:56.3027996Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestxoevmpj5g-8db766\",\n \"fqdn\": + \"cliakstest-clitestxoevmpj5g-8db766-e2078b1d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/7a1dc30a-1fa6-4fe2-b2d9-417467ba0d2b\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"enableAzureRBAC\": true,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3623' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestxoevmpj5g-8db766\",\n \"fqdn\": + \"cliakstest-clitestxoevmpj5g-8db766-e2078b1d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/7a1dc30a-1fa6-4fe2-b2d9-417467ba0d2b\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"enableAzureRBAC\": true,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3623' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "1.20.9", "dnsPrefix": "cliakstest-clitestxoevmpj5g-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": + "Managed", "maxPods": 110, "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.20.9", "enableNodePublicIP": false, + "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": + {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", "enableRBAC": + true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "Standard", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/7a1dc30a-1fa6-4fe2-b2d9-417467ba0d2b"}]}}, + "aadProfile": {"managed": true, "enableAzureRBAC": false, "adminGroupObjectIDs": + ["00000000-0000-0000-0000-000000000001"], "tenantID": "72f988bf-86f1-41af-91ab-2d7cd011db47"}, + "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}}, + "location": "westus2", "sku": {"name": "Basic", "tier": "Free"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2558' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --disable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestxoevmpj5g-8db766\",\n \"fqdn\": + \"cliakstest-clitestxoevmpj5g-8db766-e2078b1d.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/7a1dc30a-1fa6-4fe2-b2d9-417467ba0d2b\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"enableAzureRBAC\": false,\n \"tenantID\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n + \ },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a3734d6d-c232-47e3-9dc1-61fbd67fd800?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3622' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-azure-rbac -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a3734d6d-c232-47e3-9dc1-61fbd67fd800?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"6d4d73a3-32c2-e347-9dc1-61fbd67fd800\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:37:26.6066666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_nat_gateway_outbound.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_nat_gateway_outbound.yaml new file mode 100644 index 00000000000..450842439f4 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_and_update_with_managed_nat_gateway_outbound.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --outbound-type --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T06:20:22Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '312' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 06:20:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_fqdn_subdomain.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_fqdn_subdomain.yaml new file mode 100644 index 00000000000..e889c1535fa --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_fqdn_subdomain.yaml @@ -0,0 +1,1211 @@ +interactions: +- request: + body: '{"location": "global"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-dns zone create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + If-None-Match: + - '*' + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-privatedns/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/privateDnsZones/privatelink.westus2.azmk8s.io?api-version=2018-09-01 + response: + body: + string: '{}' + headers: + azure-asyncoperation: + - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtiOWY1ODc2Mi0xZWE1LTQyYWMtODFhNC0zZDA5ODFiYWM5NDk=?api-version=2018-09-01 + cache-control: + - private + content-length: + - '2' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 06:28:05 GMT + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtiOWY1ODc2Mi0xZWE1LTQyYWMtODFhNC0zZDA5ODFiYWM5NDk=?api-version=2018-09-01 + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11999' + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-dns zone create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-privatedns/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtiOWY1ODc2Mi0xZWE1LTQyYWMtODFhNC0zZDA5ODFiYWM5NDk=?api-version=2018-09-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - private + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 06:28:35 GMT + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '499' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network private-dns zone create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name + User-Agent: + - AZURECLI/2.28.1 azsdk-python-mgmt-privatedns/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/privateDnsZones/privatelink.westus2.azmk8s.io?api-version=2018-09-01 + response: + body: + string: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/clitest000001\/providers\/Microsoft.Network\/privateDnsZones\/privatelink.westus2.azmk8s.io","name":"privatelink.westus2.azmk8s.io","type":"Microsoft.Network\/privateDnsZones","etag":"bf6f0fbf-3d09-4f2a-8b53-27bb2005e666","location":"global","properties":{"maxNumberOfRecordSets":25000,"maxNumberOfVirtualNetworkLinks":1000,"maxNumberOfVirtualNetworkLinksWithRegistration":100,"numberOfRecordSets":1,"numberOfVirtualNetworkLinks":0,"numberOfVirtualNetworkLinksWithRegistration":0,"provisioningState":"Succeeded"}}' + headers: + cache-control: + - private + content-length: + - '595' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 06:28:36 GMT + etag: + - bf6f0fbf-3d09-4f2a-8b53-27bb2005e666 + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '499' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://aka.ms/azExtCmdTree + response: + body: + string: '' + headers: + cache-control: + - max-age=0, no-cache, no-store + connection: + - keep-alive + content-length: + - '0' + date: + - Fri, 24 Sep 2021 06:28:38 GMT + expires: + - Fri, 24 Sep 2021 06:28:38 GMT + location: + - https://azurecliextensionsync.blob.core.windows.net/cmd-index/extensionCommandTree.json + pragma: + - no-cache + request-context: + - appId=cid-v1:7d63747b-487e-492a-872d-762362f77974 + server: + - Kestrel + strict-transport-security: + - max-age=31536000 ; includeSubDomains + x-response-cache-status: + - 'True' + status: + code: 301 + message: Moved Permanently +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://azurecliextensionsync.blob.core.windows.net/cmd-index/extensionCommandTree.json + response: + body: + string: "\uFEFF{\"account\": {\"subscription\": {\"rename\": \"account\", \"cancel\": + \"account\", \"enable\": \"account\", \"list\": \"account\", \"show\": \"account\", + \"list-location\": \"account\"}, \"tenant\": {\"list\": \"account\"}, \"alias\": + {\"list\": \"account\", \"show\": \"account\", \"create\": \"account\", \"delete\": + \"account\", \"wait\": \"account\"}, \"create\": \"subscription\"}, \"acr\": + {\"import-pipeline\": {\"create\": \"acrtransfer\", \"delete\": \"acrtransfer\", + \"list\": \"acrtransfer\", \"show\": \"acrtransfer\"}, \"export-pipeline\": + {\"create\": \"acrtransfer\", \"delete\": \"acrtransfer\", \"list\": \"acrtransfer\", + \"show\": \"acrtransfer\"}, \"pipeline-run\": {\"create\": \"acrtransfer\", + \"delete\": \"acrtransfer\", \"list\": \"acrtransfer\", \"show\": \"acrtransfer\"}}, + \"ad\": {\"ds\": {\"list\": \"ad\", \"show\": \"ad\", \"create\": \"ad\", + \"update\": \"ad\", \"delete\": \"ad\", \"wait\": \"ad\"}}, \"vm\": {\"aem\": + {\"set\": \"aem\", \"delete\": \"aem\", \"verify\": \"aem\"}, \"repair\": + {\"create\": \"vm-repair\", \"restore\": \"vm-repair\", \"run\": \"vm-repair\", + \"list-scripts\": \"vm-repair\"}}, \"ai-examples\": {\"check-connection\": + \"ai-examples\"}, \"aks\": {\"kollect\": \"aks-preview\", \"kanalyze\": \"aks-preview\", + \"browse\": \"aks-preview\", \"create\": \"aks-preview\", \"update\": \"aks-preview\", + \"scale\": \"aks-preview\", \"disable-addons\": \"aks-preview\", \"enable-addons\": + \"aks-preview\", \"get-credentials\": \"aks-preview\", \"show\": \"aks-preview\", + \"upgrade\": \"aks-preview\", \"get-upgrades\": \"aks-preview\", \"rotate-certs\": + \"aks-preview\", \"wait\": \"aks-preview\", \"stop\": \"aks-preview\", \"start\": + \"aks-preview\", \"get-os-options\": \"aks-preview\", \"get-versions\": \"aks-preview\", + \"maintenanceconfiguration\": {\"list\": \"aks-preview\", \"show\": \"aks-preview\", + \"add\": \"aks-preview\", \"update\": \"aks-preview\", \"delete\": \"aks-preview\"}, + \"nodepool\": {\"list\": \"aks-preview\", \"show\": \"aks-preview\", \"add\": + \"aks-preview\", \"scale\": \"aks-preview\", \"upgrade\": \"aks-preview\", + \"update\": \"aks-preview\", \"delete\": \"aks-preview\", \"get-upgrades\": + \"aks-preview\"}, \"pod-identity\": {\"add\": \"aks-preview\", \"delete\": + \"aks-preview\", \"list\": \"aks-preview\", \"exception\": {\"add\": \"aks-preview\", + \"delete\": \"aks-preview\", \"update\": \"aks-preview\", \"list\": \"aks-preview\"}}, + \"egress-endpoints\": {\"list\": \"aks-preview\"}, \"app\": {\"up\": \"deploy-to-azure\"}, + \"use-dev-spaces\": \"dev-spaces\"}, \"monitor\": {\"action-rule\": {\"create\": + \"alertsmanagement\", \"update\": \"alertsmanagement\", \"delete\": \"alertsmanagement\", + \"show\": \"alertsmanagement\", \"list\": \"alertsmanagement\"}, \"app-insights\": + {\"component\": {\"create\": \"application-insights\", \"update\": \"application-insights\", + \"show\": \"application-insights\", \"delete\": \"application-insights\", + \"update-tags\": \"application-insights\", \"connect-webapp\": \"application-insights\", + \"connect-function\": \"application-insights\", \"billing\": {\"update\": + \"application-insights\", \"show\": \"application-insights\"}, \"linked-storage\": + {\"show\": \"application-insights\", \"link\": \"application-insights\", \"update\": + \"application-insights\", \"unlink\": \"application-insights\"}, \"continues-export\": + {\"list\": \"application-insights\", \"show\": \"application-insights\", \"create\": + \"application-insights\", \"update\": \"application-insights\", \"delete\": + \"application-insights\"}}, \"api-key\": {\"create\": \"application-insights\", + \"show\": \"application-insights\", \"delete\": \"application-insights\"}, + \"metrics\": {\"show\": \"application-insights\", \"get-metadata\": \"application-insights\"}, + \"events\": {\"show\": \"application-insights\"}, \"query\": \"application-insights\"}, + \"log-analytics\": {\"query\": \"log-analytics\", \"solution\": {\"create\": + \"log-analytics-solution\", \"update\": \"log-analytics-solution\", \"delete\": + \"log-analytics-solution\", \"show\": \"log-analytics-solution\", \"list\": + \"log-analytics-solution\"}}, \"data-collection\": {\"endpoint\": {\"list\": + \"monitor-control-service\", \"show\": \"monitor-control-service\", \"delete\": + \"monitor-control-service\", \"create\": \"monitor-control-service\", \"update\": + \"monitor-control-service\"}, \"rule\": {\"list\": \"monitor-control-service\", + \"show\": \"monitor-control-service\", \"delete\": \"monitor-control-service\", + \"association\": {\"list\": \"monitor-control-service\", \"show\": \"monitor-control-service\", + \"delete\": \"monitor-control-service\", \"create\": \"monitor-control-service\", + \"update\": \"monitor-control-service\"}, \"create\": \"monitor-control-service\", + \"update\": \"monitor-control-service\", \"data-flow\": {\"list\": \"monitor-control-service\", + \"add\": \"monitor-control-service\"}, \"log-analytics\": {\"list\": \"monitor-control-service\", + \"show\": \"monitor-control-service\", \"add\": \"monitor-control-service\", + \"delete\": \"monitor-control-service\", \"update\": \"monitor-control-service\"}, + \"performance-counter\": {\"list\": \"monitor-control-service\", \"show\": + \"monitor-control-service\", \"add\": \"monitor-control-service\", \"delete\": + \"monitor-control-service\", \"update\": \"monitor-control-service\"}, \"windows-event-log\": + {\"list\": \"monitor-control-service\", \"show\": \"monitor-control-service\", + \"add\": \"monitor-control-service\", \"delete\": \"monitor-control-service\", + \"update\": \"monitor-control-service\"}, \"syslog\": {\"list\": \"monitor-control-service\", + \"show\": \"monitor-control-service\", \"add\": \"monitor-control-service\", + \"delete\": \"monitor-control-service\", \"update\": \"monitor-control-service\"}}}, + \"scheduled-query\": {\"create\": \"scheduled-query\", \"delete\": \"scheduled-query\", + \"list\": \"scheduled-query\", \"show\": \"scheduled-query\", \"update\": + \"scheduled-query\"}}, \"alias\": {\"create\": \"alias\", \"export\": \"alias\", + \"import\": \"alias\", \"list\": \"alias\", \"remove\": \"alias\", \"remove-all\": + \"alias\"}, \"arcappliance\": {\"show\": \"arcappliance\", \"list\": \"arcappliance\", + \"get-credentials\": \"arcappliance\", \"validate\": {\"hci\": \"arcappliance\", + \"vmware\": \"arcappliance\", \"scvmm\": \"arcappliance\"}, \"prepare\": {\"hci\": + \"arcappliance\", \"vmware\": \"arcappliance\", \"scvmm\": \"arcappliance\"}, + \"deploy\": {\"hci\": \"arcappliance\", \"vmware\": \"arcappliance\", \"scvmm\": + \"arcappliance\"}, \"create\": {\"hci\": \"arcappliance\", \"vmware\": \"arcappliance\", + \"scvmm\": \"arcappliance\"}, \"delete\": {\"hci\": \"arcappliance\", \"vmware\": + \"arcappliance\", \"scvmm\": \"arcappliance\"}, \"createconfig\": {\"hci\": + \"arcappliance\", \"vmware\": \"arcappliance\", \"scvmm\": \"arcappliance\"}, + \"logs\": {\"hci\": \"arcappliance\", \"vmware\": \"arcappliance\", \"scvmm\": + \"arcappliance\"}, \"run\": {\"hci\": \"arcappliance\", \"vmware\": \"arcappliance\", + \"scvmm\": \"arcappliance\"}}, \"postgres\": {\"arc-server\": {\"create\": + \"arcdata\", \"delete\": \"arcdata\", \"show\": \"arcdata\", \"list\": \"arcdata\", + \"edit\": \"arcdata\", \"endpoint\": {\"list\": \"arcdata\"}}, \"up\": \"db-up\", + \"down\": \"db-up\", \"show-connection-string\": \"db-up\", \"flexible-server\": + {\"connect\": \"rdbms-connect\", \"execute\": \"rdbms-connect\"}}, \"sql\": + {\"mi-arc\": {\"create\": \"arcdata\", \"delete\": \"arcdata\", \"show\": + \"arcdata\", \"get-mirroring-cert\": \"arcdata\", \"list\": \"arcdata\", \"edit\": + \"arcdata\", \"endpoint\": {\"list\": \"arcdata\"}, \"config\": {\"init\": + \"arcdata\", \"patch\": \"arcdata\", \"add\": \"arcdata\", \"replace\": \"arcdata\", + \"remove\": \"arcdata\"}, \"dag\": {\"create\": \"arcdata\", \"delete\": \"arcdata\", + \"get\": \"arcdata\"}}, \"up\": \"db-up\", \"down\": \"db-up\"}, \"arcdata\": + {\"dc\": {\"endpoint\": {\"list\": \"arcdata\"}, \"upload\": \"arcdata\", + \"create\": \"arcdata\", \"config\": {\"show\": \"arcdata\", \"list\": \"arcdata\", + \"init\": \"arcdata\", \"patch\": \"arcdata\", \"add\": \"arcdata\", \"replace\": + \"arcdata\", \"remove\": \"arcdata\"}, \"status\": {\"show\": \"arcdata\"}, + \"delete\": \"arcdata\", \"export\": \"arcdata\", \"debug\": {\"copy-logs\": + \"arcdata\"}}, \"resource-kind\": {\"list\": \"arcdata\", \"get\": \"arcdata\"}}, + \"attestation\": {\"list\": \"attestation\", \"show\": \"attestation\", \"create\": + \"attestation\", \"update\": \"attestation\", \"delete\": \"attestation\", + \"get-default-by-location\": \"attestation\", \"list-default\": \"attestation\", + \"signer\": {\"add\": \"attestation\", \"remove\": \"attestation\", \"list\": + \"attestation\"}, \"policy\": {\"set\": \"attestation\", \"reset\": \"attestation\", + \"show\": \"attestation\"}}, \"webapp\": {\"auth\": {\"show\": \"authV2\", + \"set\": \"authV2\", \"update\": \"authV2\", \"config-version\": {\"show\": + \"authV2\", \"revert\": \"authV2\", \"upgrade\": \"authV2\"}, \"microsoft\": + {\"show\": \"authV2\", \"update\": \"authV2\"}, \"facebook\": {\"show\": \"authV2\", + \"update\": \"authV2\"}, \"github\": {\"show\": \"authV2\", \"update\": \"authV2\"}, + \"google\": {\"show\": \"authV2\", \"update\": \"authV2\"}, \"twitter\": {\"show\": + \"authV2\", \"update\": \"authV2\"}, \"apple\": {\"show\": \"authV2\", \"update\": + \"authV2\"}, \"openid-connect\": {\"show\": \"authV2\", \"add\": \"authV2\", + \"update\": \"authV2\", \"remove\": \"authV2\"}}, \"auth-classic\": {\"show\": + \"authV2\", \"update\": \"authV2\"}, \"scan\": {\"start\": \"webapp\", \"show-result\": + \"webapp\", \"track\": \"webapp\", \"list-result\": \"webapp\", \"stop\": + \"webapp\"}}, \"automation\": {\"runbook\": {\"list\": \"automation\", \"show\": + \"automation\", \"create\": \"automation\", \"update\": \"automation\", \"delete\": + \"automation\", \"publish\": \"automation\", \"wait\": \"automation\", \"replace-content\": + \"automation\", \"revert-to-published\": \"automation\", \"start\": \"automation\"}, + \"job\": {\"list\": \"automation\", \"show\": \"automation\", \"resume\": + \"automation\", \"stop\": \"automation\", \"suspend\": \"automation\"}, \"account\": + {\"list\": \"automation\", \"show\": \"automation\", \"create\": \"automation\", + \"update\": \"automation\", \"delete\": \"automation\"}}, \"devops\": {\"admin\": + {\"banner\": {\"list\": \"azure-devops\", \"show\": \"azure-devops\", \"add\": + \"azure-devops\", \"remove\": \"azure-devops\", \"update\": \"azure-devops\"}}, + \"login\": \"azure-devops\", \"logout\": \"azure-devops\", \"configure\": + \"azure-devops\", \"project\": {\"create\": \"azure-devops\", \"delete\": + \"azure-devops\", \"show\": \"azure-devops\", \"list\": \"azure-devops\"}, + \"service-endpoint\": {\"list\": \"azure-devops\", \"show\": \"azure-devops\", + \"create\": \"azure-devops\", \"update\": \"azure-devops\", \"azurerm\": {\"create\": + \"azure-devops\"}, \"github\": {\"create\": \"azure-devops\"}, \"delete\": + \"azure-devops\"}, \"team\": {\"create\": \"azure-devops\", \"delete\": \"azure-devops\", + \"show\": \"azure-devops\", \"list\": \"azure-devops\", \"list-member\": \"azure-devops\", + \"update\": \"azure-devops\"}, \"invoke\": \"azure-devops\", \"user\": {\"list\": + \"azure-devops\", \"show\": \"azure-devops\", \"remove\": \"azure-devops\", + \"update\": \"azure-devops\", \"add\": \"azure-devops\"}, \"extension\": {\"list\": + \"azure-devops\", \"uninstall\": \"azure-devops\", \"install\": \"azure-devops\", + \"show\": \"azure-devops\", \"enable\": \"azure-devops\", \"disable\": \"azure-devops\", + \"search\": \"azure-devops\"}, \"security\": {\"group\": {\"list\": \"azure-devops\", + \"show\": \"azure-devops\", \"update\": \"azure-devops\", \"create\": \"azure-devops\", + \"delete\": \"azure-devops\", \"membership\": {\"list\": \"azure-devops\", + \"add\": \"azure-devops\", \"remove\": \"azure-devops\"}}, \"permission\": + {\"list\": \"azure-devops\", \"update\": \"azure-devops\", \"reset-all\": + \"azure-devops\", \"reset\": \"azure-devops\", \"show\": \"azure-devops\", + \"namespace\": {\"list\": \"azure-devops\", \"show\": \"azure-devops\"}}}, + \"wiki\": {\"create\": \"azure-devops\", \"list\": \"azure-devops\", \"show\": + \"azure-devops\", \"delete\": \"azure-devops\", \"page\": {\"create\": \"azure-devops\", + \"update\": \"azure-devops\", \"show\": \"azure-devops\", \"delete\": \"azure-devops\"}}}, + \"boards\": {\"work-item\": {\"show\": \"azure-devops\", \"create\": \"azure-devops\", + \"update\": \"azure-devops\", \"delete\": \"azure-devops\", \"relation\": + {\"list-type\": \"azure-devops\", \"add\": \"azure-devops\", \"remove\": \"azure-devops\", + \"show\": \"azure-devops\"}}, \"query\": \"azure-devops\", \"iteration\": + {\"team\": {\"list\": \"azure-devops\", \"list-work-items\": \"azure-devops\", + \"set-default-iteration\": \"azure-devops\", \"set-backlog-iteration\": \"azure-devops\", + \"show-default-iteration\": \"azure-devops\", \"show-backlog-iteration\": + \"azure-devops\", \"remove\": \"azure-devops\", \"add\": \"azure-devops\"}, + \"project\": {\"list\": \"azure-devops\", \"update\": \"azure-devops\", \"delete\": + \"azure-devops\", \"show\": \"azure-devops\", \"create\": \"azure-devops\"}}, + \"area\": {\"project\": {\"list\": \"azure-devops\", \"delete\": \"azure-devops\", + \"create\": \"azure-devops\", \"update\": \"azure-devops\", \"show\": \"azure-devops\"}, + \"team\": {\"list\": \"azure-devops\", \"add\": \"azure-devops\", \"remove\": + \"azure-devops\", \"update\": \"azure-devops\"}}}, \"pipelines\": {\"create\": + \"azure-devops\", \"update\": \"azure-devops\", \"list\": \"azure-devops\", + \"show\": \"azure-devops\", \"delete\": \"azure-devops\", \"run\": \"azure-devops\", + \"build\": {\"list\": \"azure-devops\", \"queue\": \"azure-devops\", \"show\": + \"azure-devops\", \"tag\": {\"list\": \"azure-devops\", \"add\": \"azure-devops\", + \"delete\": \"azure-devops\"}, \"definition\": {\"list\": \"azure-devops\", + \"show\": \"azure-devops\"}}, \"release\": {\"list\": \"azure-devops\", \"create\": + \"azure-devops\", \"show\": \"azure-devops\", \"definition\": {\"list\": \"azure-devops\", + \"show\": \"azure-devops\"}}, \"runs\": {\"artifact\": {\"download\": \"azure-devops\", + \"list\": \"azure-devops\", \"upload\": \"azure-devops\"}, \"tag\": {\"add\": + \"azure-devops\", \"list\": \"azure-devops\", \"delete\": \"azure-devops\"}, + \"list\": \"azure-devops\", \"show\": \"azure-devops\"}, \"pool\": {\"list\": + \"azure-devops\", \"show\": \"azure-devops\"}, \"agent\": {\"list\": \"azure-devops\", + \"show\": \"azure-devops\"}, \"queue\": {\"list\": \"azure-devops\", \"show\": + \"azure-devops\"}, \"variable-group\": {\"create\": \"azure-devops\", \"show\": + \"azure-devops\", \"list\": \"azure-devops\", \"update\": \"azure-devops\", + \"delete\": \"azure-devops\", \"variable\": {\"create\": \"azure-devops\", + \"list\": \"azure-devops\", \"update\": \"azure-devops\", \"delete\": \"azure-devops\"}}, + \"variable\": {\"create\": \"azure-devops\", \"update\": \"azure-devops\", + \"list\": \"azure-devops\", \"delete\": \"azure-devops\"}, \"folder\": {\"create\": + \"azure-devops\", \"delete\": \"azure-devops\", \"list\": \"azure-devops\", + \"update\": \"azure-devops\"}}, \"repos\": {\"create\": \"azure-devops\", + \"delete\": \"azure-devops\", \"list\": \"azure-devops\", \"show\": \"azure-devops\", + \"update\": \"azure-devops\", \"policy\": {\"list\": \"azure-devops\", \"show\": + \"azure-devops\", \"delete\": \"azure-devops\", \"create\": \"azure-devops\", + \"update\": \"azure-devops\", \"approver-count\": {\"create\": \"azure-devops\", + \"update\": \"azure-devops\"}, \"merge-strategy\": {\"create\": \"azure-devops\", + \"update\": \"azure-devops\"}, \"build\": {\"create\": \"azure-devops\", \"update\": + \"azure-devops\"}, \"comment-required\": {\"create\": \"azure-devops\", \"update\": + \"azure-devops\"}, \"work-item-linking\": {\"create\": \"azure-devops\", \"update\": + \"azure-devops\"}, \"file-size\": {\"create\": \"azure-devops\", \"update\": + \"azure-devops\"}, \"required-reviewer\": {\"create\": \"azure-devops\", \"update\": + \"azure-devops\"}, \"case-enforcement\": {\"create\": \"azure-devops\", \"update\": + \"azure-devops\"}}, \"pr\": {\"create\": \"azure-devops\", \"update\": \"azure-devops\", + \"show\": \"azure-devops\", \"list\": \"azure-devops\", \"checkout\": \"azure-devops\", + \"reviewer\": {\"add\": \"azure-devops\", \"list\": \"azure-devops\", \"remove\": + \"azure-devops\"}, \"work-item\": {\"add\": \"azure-devops\", \"list\": \"azure-devops\", + \"remove\": \"azure-devops\"}, \"set-vote\": \"azure-devops\", \"policy\": + {\"list\": \"azure-devops\", \"queue\": \"azure-devops\"}}, \"import\": {\"create\": + \"azure-devops\"}, \"ref\": {\"create\": \"azure-devops\", \"delete\": \"azure-devops\", + \"list\": \"azure-devops\", \"lock\": \"azure-devops\", \"unlock\": \"azure-devops\"}}, + \"artifacts\": {\"universal\": {\"publish\": \"azure-devops\", \"download\": + \"azure-devops\"}}, \"network\": {\"firewall\": {\"create\": \"azure-firewall\", + \"delete\": \"azure-firewall\", \"list\": \"azure-firewall\", \"show\": \"azure-firewall\", + \"update\": \"azure-firewall\", \"threat-intel-allowlist\": {\"create\": \"azure-firewall\", + \"delete\": \"azure-firewall\", \"show\": \"azure-firewall\", \"update\": + \"azure-firewall\"}, \"ip-config\": {\"create\": \"azure-firewall\", \"list\": + \"azure-firewall\", \"show\": \"azure-firewall\", \"delete\": \"azure-firewall\"}, + \"management-ip-config\": {\"show\": \"azure-firewall\", \"update\": \"azure-firewall\"}, + \"network-rule\": {\"create\": \"azure-firewall\", \"list\": \"azure-firewall\", + \"show\": \"azure-firewall\", \"delete\": \"azure-firewall\", \"collection\": + {\"list\": \"azure-firewall\", \"show\": \"azure-firewall\", \"delete\": \"azure-firewall\"}}, + \"nat-rule\": {\"create\": \"azure-firewall\", \"list\": \"azure-firewall\", + \"show\": \"azure-firewall\", \"delete\": \"azure-firewall\", \"collection\": + {\"list\": \"azure-firewall\", \"show\": \"azure-firewall\", \"delete\": \"azure-firewall\"}}, + \"application-rule\": {\"create\": \"azure-firewall\", \"list\": \"azure-firewall\", + \"show\": \"azure-firewall\", \"delete\": \"azure-firewall\", \"collection\": + {\"list\": \"azure-firewall\", \"show\": \"azure-firewall\", \"delete\": \"azure-firewall\"}}, + \"list-fqdn-tags\": \"azure-firewall\", \"policy\": {\"create\": \"azure-firewall\", + \"delete\": \"azure-firewall\", \"list\": \"azure-firewall\", \"show\": \"azure-firewall\", + \"update\": \"azure-firewall\", \"intrusion-detection\": {\"add\": \"azure-firewall\", + \"remove\": \"azure-firewall\", \"list\": \"azure-firewall\"}, \"rule-collection-group\": + {\"create\": \"azure-firewall\", \"update\": \"azure-firewall\", \"delete\": + \"azure-firewall\", \"show\": \"azure-firewall\", \"list\": \"azure-firewall\", + \"collection\": {\"add-nat-collection\": \"azure-firewall\", \"add-filter-collection\": + \"azure-firewall\", \"remove\": \"azure-firewall\", \"list\": \"azure-firewall\", + \"rule\": {\"add\": \"azure-firewall\", \"update\": \"azure-firewall\", \"remove\": + \"azure-firewall\"}}}}}, \"cross-connection\": {\"show\": \"express-route-cross-connection\", + \"list-arp-tables\": \"express-route-cross-connection\", \"list-route-tables\": + \"express-route-cross-connection\", \"summarize-route-table\": \"express-route-cross-connection\", + \"list\": \"express-route-cross-connection\", \"update\": \"express-route-cross-connection\", + \"wait\": \"express-route-cross-connection\", \"peering\": {\"create\": \"express-route-cross-connection\", + \"delete\": \"express-route-cross-connection\", \"show\": \"express-route-cross-connection\", + \"list\": \"express-route-cross-connection\", \"update\": \"express-route-cross-connection\"}}, + \"front-door\": {\"show\": \"front-door\", \"create\": \"front-door\", \"delete\": + \"front-door\", \"list\": \"front-door\", \"update\": \"front-door\", \"check-custom-domain\": + \"front-door\", \"check-name-availability\": \"front-door\", \"wait\": \"front-door\", + \"purge-endpoint\": \"front-door\", \"backend-pool\": {\"create\": \"front-door\", + \"list\": \"front-door\", \"show\": \"front-door\", \"delete\": \"front-door\", + \"backend\": {\"add\": \"front-door\", \"update\": \"front-door\", \"list\": + \"front-door\", \"remove\": \"front-door\"}}, \"frontend-endpoint\": {\"create\": + \"front-door\", \"list\": \"front-door\", \"show\": \"front-door\", \"delete\": + \"front-door\", \"disable-https\": \"front-door\", \"enable-https\": \"front-door\", + \"wait\": \"front-door\"}, \"probe\": {\"create\": \"front-door\", \"list\": + \"front-door\", \"show\": \"front-door\", \"delete\": \"front-door\", \"update\": + \"front-door\"}, \"load-balancing\": {\"create\": \"front-door\", \"list\": + \"front-door\", \"show\": \"front-door\", \"delete\": \"front-door\", \"update\": + \"front-door\"}, \"routing-rule\": {\"create\": \"front-door\", \"list\": + \"front-door\", \"show\": \"front-door\", \"delete\": \"front-door\", \"update\": + \"front-door\"}, \"waf-policy\": {\"create\": \"front-door\", \"delete\": + \"front-door\", \"list\": \"front-door\", \"show\": \"front-door\", \"update\": + \"front-door\", \"managed-rules\": {\"add\": \"front-door\", \"remove\": \"front-door\", + \"list\": \"front-door\", \"override\": {\"add\": \"front-door\", \"remove\": + \"front-door\", \"list\": \"front-door\"}, \"exclusion\": {\"add\": \"front-door\", + \"remove\": \"front-door\", \"list\": \"front-door\"}}, \"managed-rule-definition\": + {\"list\": \"front-door\"}, \"rule\": {\"create\": \"front-door\", \"update\": + \"front-door\", \"delete\": \"front-door\", \"list\": \"front-door\", \"show\": + \"front-door\", \"match-condition\": {\"add\": \"front-door\", \"remove\": + \"front-door\", \"list\": \"front-door\"}}}, \"rules-engine\": {\"show\": + \"front-door\", \"list\": \"front-door\", \"delete\": \"front-door\", \"rule\": + {\"create\": \"front-door\", \"delete\": \"front-door\", \"show\": \"front-door\", + \"list\": \"front-door\", \"update\": \"front-door\", \"condition\": {\"add\": + \"front-door\", \"remove\": \"front-door\", \"list\": \"front-door\"}, \"action\": + {\"add\": \"front-door\", \"remove\": \"front-door\", \"list\": \"front-door\"}}}}, + \"ip-group\": {\"create\": \"ip-group\", \"update\": \"ip-group\", \"list\": + \"ip-group\", \"delete\": \"ip-group\", \"show\": \"ip-group\"}, \"vnet\": + {\"tap\": {\"create\": \"virtual-network-tap\", \"delete\": \"virtual-network-tap\", + \"list\": \"virtual-network-tap\", \"show\": \"virtual-network-tap\", \"update\": + \"virtual-network-tap\"}}, \"nic\": {\"vtap-config\": {\"create\": \"virtual-network-tap\", + \"delete\": \"virtual-network-tap\", \"list\": \"virtual-network-tap\", \"show\": + \"virtual-network-tap\"}}, \"vwan\": {\"create\": \"virtual-wan\", \"delete\": + \"virtual-wan\", \"show\": \"virtual-wan\", \"list\": \"virtual-wan\", \"update\": + \"virtual-wan\"}, \"vhub\": {\"create\": \"virtual-wan\", \"delete\": \"virtual-wan\", + \"show\": \"virtual-wan\", \"list\": \"virtual-wan\", \"update\": \"virtual-wan\", + \"get-effective-routes\": \"virtual-wan\", \"connection\": {\"create\": \"virtual-wan\", + \"delete\": \"virtual-wan\", \"show\": \"virtual-wan\", \"list\": \"virtual-wan\", + \"update\": \"virtual-wan\", \"wait\": \"virtual-wan\"}, \"route\": {\"add\": + \"virtual-wan\", \"list\": \"virtual-wan\", \"remove\": \"virtual-wan\", \"reset\": + \"virtual-wan\"}, \"route-table\": {\"create\": \"virtual-wan\", \"update\": + \"virtual-wan\", \"show\": \"virtual-wan\", \"list\": \"virtual-wan\", \"delete\": + \"virtual-wan\", \"wait\": \"virtual-wan\", \"route\": {\"add\": \"virtual-wan\", + \"list\": \"virtual-wan\", \"remove\": \"virtual-wan\"}}}, \"vpn-gateway\": + {\"create\": \"virtual-wan\", \"delete\": \"virtual-wan\", \"list\": \"virtual-wan\", + \"show\": \"virtual-wan\", \"update\": \"virtual-wan\", \"connection\": {\"create\": + \"virtual-wan\", \"list\": \"virtual-wan\", \"show\": \"virtual-wan\", \"delete\": + \"virtual-wan\", \"update\": \"virtual-wan\", \"wait\": \"virtual-wan\", \"ipsec-policy\": + {\"add\": \"virtual-wan\", \"list\": \"virtual-wan\", \"remove\": \"virtual-wan\"}}}, + \"vpn-site\": {\"create\": \"virtual-wan\", \"delete\": \"virtual-wan\", \"list\": + \"virtual-wan\", \"show\": \"virtual-wan\", \"update\": \"virtual-wan\", \"download\": + \"virtual-wan\"}, \"vpn-server-config\": {\"create\": \"virtual-wan\", \"set\": + \"virtual-wan\", \"show\": \"virtual-wan\", \"delete\": \"virtual-wan\", \"list\": + \"virtual-wan\", \"wait\": \"virtual-wan\", \"ipsec-policy\": {\"add\": \"virtual-wan\", + \"list\": \"virtual-wan\", \"remove\": \"virtual-wan\", \"wait\": \"virtual-wan\"}}, + \"p2s-vpn-gateway\": {\"create\": \"virtual-wan\", \"delete\": \"virtual-wan\", + \"list\": \"virtual-wan\", \"show\": \"virtual-wan\", \"update\": \"virtual-wan\", + \"wait\": \"virtual-wan\", \"connection\": {\"list\": \"virtual-wan\", \"show\": + \"virtual-wan\"}, \"vpn-client\": {\"generate\": \"virtual-wan\"}}}, \"iot\": + {\"hub\": {\"query\": \"azure-iot\", \"invoke-device-method\": \"azure-iot\", + \"invoke-module-method\": \"azure-iot\", \"generate-sas-token\": \"azure-iot\", + \"monitor-events\": \"azure-iot\", \"monitor-feedback\": \"azure-iot\", \"device-identity\": + {\"create\": \"azure-iot\", \"show\": \"azure-iot\", \"list\": \"azure-iot\", + \"delete\": \"azure-iot\", \"update\": \"azure-iot\", \"renew-key\": \"azure-iot\", + \"import\": \"azure-iot\", \"export\": \"azure-iot\", \"children\": {\"add\": + \"azure-iot\", \"remove\": \"azure-iot\", \"list\": \"azure-iot\"}, \"parent\": + {\"show\": \"azure-iot\", \"set\": \"azure-iot\"}, \"connection-string\": + {\"show\": \"azure-iot\"}}, \"module-identity\": {\"create\": \"azure-iot\", + \"show\": \"azure-iot\", \"list\": \"azure-iot\", \"delete\": \"azure-iot\", + \"update\": \"azure-iot\", \"renew-key\": \"azure-iot\", \"connection-string\": + {\"show\": \"azure-iot\"}}, \"module-twin\": {\"show\": \"azure-iot\", \"replace\": + \"azure-iot\", \"update\": \"azure-iot\"}, \"device-twin\": {\"show\": \"azure-iot\", + \"replace\": \"azure-iot\", \"update\": \"azure-iot\"}, \"configuration\": + {\"show-metric\": \"azure-iot\", \"create\": \"azure-iot\", \"show\": \"azure-iot\", + \"list\": \"azure-iot\", \"delete\": \"azure-iot\", \"update\": \"azure-iot\"}, + \"distributed-tracing\": {\"show\": \"azure-iot\", \"update\": \"azure-iot\"}, + \"connection-string\": {\"show\": \"azure-iot\"}, \"job\": {\"create\": \"azure-iot\", + \"show\": \"azure-iot\", \"list\": \"azure-iot\", \"cancel\": \"azure-iot\"}, + \"digital-twin\": {\"invoke-command\": \"azure-iot\", \"show\": \"azure-iot\", + \"update\": \"azure-iot\"}}, \"edge\": {\"set-modules\": \"azure-iot\", \"deployment\": + {\"show-metric\": \"azure-iot\", \"create\": \"azure-iot\", \"show\": \"azure-iot\", + \"list\": \"azure-iot\", \"delete\": \"azure-iot\", \"update\": \"azure-iot\"}}, + \"device\": {\"send-d2c-message\": \"azure-iot\", \"simulate\": \"azure-iot\", + \"upload-file\": \"azure-iot\", \"c2d-message\": {\"complete\": \"azure-iot\", + \"abandon\": \"azure-iot\", \"reject\": \"azure-iot\", \"receive\": \"azure-iot\", + \"send\": \"azure-iot\", \"purge\": \"azure-iot\"}}, \"dps\": {\"compute-device-key\": + \"azure-iot\", \"enrollment\": {\"create\": \"azure-iot\", \"list\": \"azure-iot\", + \"show\": \"azure-iot\", \"update\": \"azure-iot\", \"delete\": \"azure-iot\"}, + \"enrollment-group\": {\"create\": \"azure-iot\", \"list\": \"azure-iot\", + \"show\": \"azure-iot\", \"update\": \"azure-iot\", \"delete\": \"azure-iot\"}, + \"registration\": {\"list\": \"azure-iot\", \"show\": \"azure-iot\", \"delete\": + \"azure-iot\"}}, \"central\": {\"diagnostics\": {\"monitor-events\": \"azure-iot\", + \"validate-messages\": \"azure-iot\", \"monitor-properties\": \"azure-iot\", + \"validate-properties\": \"azure-iot\", \"registration-summary\": \"azure-iot\"}, + \"user\": {\"create\": \"azure-iot\", \"list\": \"azure-iot\", \"show\": \"azure-iot\", + \"delete\": \"azure-iot\"}, \"api-token\": {\"create\": \"azure-iot\", \"list\": + \"azure-iot\", \"show\": \"azure-iot\", \"delete\": \"azure-iot\"}, \"device\": + {\"list\": \"azure-iot\", \"show\": \"azure-iot\", \"create\": \"azure-iot\", + \"delete\": \"azure-iot\", \"registration-info\": \"azure-iot\", \"show-credentials\": + \"azure-iot\", \"compute-device-key\": \"azure-iot\", \"manual-failover\": + \"azure-iot\", \"manual-failback\": \"azure-iot\", \"command\": {\"run\": + \"azure-iot\", \"history\": \"azure-iot\"}, \"twin\": {\"show\": \"azure-iot\"}}, + \"device-template\": {\"list\": \"azure-iot\", \"show\": \"azure-iot\", \"create\": + \"azure-iot\", \"delete\": \"azure-iot\"}, \"device-group\": {\"list\": \"azure-iot\"}, + \"role\": {\"show\": \"azure-iot\", \"list\": \"azure-iot\"}}, \"product\": + {\"requirement\": {\"list\": \"azure-iot\"}, \"test\": {\"create\": \"azure-iot\", + \"update\": \"azure-iot\", \"show\": \"azure-iot\", \"search\": \"azure-iot\", + \"case\": {\"list\": \"azure-iot\", \"update\": \"azure-iot\"}, \"task\": + {\"create\": \"azure-iot\", \"delete\": \"azure-iot\", \"show\": \"azure-iot\"}, + \"run\": {\"show\": \"azure-iot\", \"submit\": \"azure-iot\"}}}}, \"dt\": + {\"create\": \"azure-iot\", \"show\": \"azure-iot\", \"list\": \"azure-iot\", + \"delete\": \"azure-iot\", \"wait\": \"azure-iot\", \"reset\": \"azure-iot\", + \"endpoint\": {\"show\": \"azure-iot\", \"list\": \"azure-iot\", \"delete\": + \"azure-iot\", \"wait\": \"azure-iot\", \"create\": {\"eventgrid\": \"azure-iot\", + \"servicebus\": \"azure-iot\", \"eventhub\": \"azure-iot\"}}, \"route\": {\"show\": + \"azure-iot\", \"list\": \"azure-iot\", \"delete\": \"azure-iot\", \"create\": + \"azure-iot\"}, \"role-assignment\": {\"create\": \"azure-iot\", \"delete\": + \"azure-iot\", \"list\": \"azure-iot\"}, \"twin\": {\"query\": \"azure-iot\", + \"create\": \"azure-iot\", \"show\": \"azure-iot\", \"update\": \"azure-iot\", + \"delete\": \"azure-iot\", \"delete-all\": \"azure-iot\", \"component\": {\"show\": + \"azure-iot\", \"update\": \"azure-iot\"}, \"relationship\": {\"create\": + \"azure-iot\", \"show\": \"azure-iot\", \"list\": \"azure-iot\", \"update\": + \"azure-iot\", \"delete\": \"azure-iot\", \"delete-all\": \"azure-iot\"}, + \"telemetry\": {\"send\": \"azure-iot\"}}, \"model\": {\"create\": \"azure-iot\", + \"show\": \"azure-iot\", \"list\": \"azure-iot\", \"update\": \"azure-iot\", + \"delete\": \"azure-iot\", \"delete-all\": \"azure-iot\"}, \"network\": {\"private-link\": + {\"show\": \"azure-iot\", \"list\": \"azure-iot\"}, \"private-endpoint\": + {\"connection\": {\"set\": \"azure-iot\", \"show\": \"azure-iot\", \"list\": + \"azure-iot\", \"delete\": \"azure-iot\", \"wait\": \"azure-iot\"}}}}, \"baremetalinstance\": + {\"list\": \"baremetal-infrastructure\", \"show\": \"baremetal-infrastructure\", + \"restart\": \"baremetal-infrastructure\", \"start\": \"baremetal-infrastructure\", + \"shutdown\": \"baremetal-infrastructure\", \"update\": \"baremetal-infrastructure\", + \"delete\": \"baremetal-infrastructure\"}, \"blockchain\": {\"member\": {\"list\": + \"blockchain\", \"show\": \"blockchain\", \"create\": \"blockchain\", \"update\": + \"blockchain\", \"delete\": \"blockchain\", \"list-api-key\": \"blockchain\", + \"list-consortium-member\": \"blockchain\", \"regenerate-api-key\": \"blockchain\", + \"wait\": \"blockchain\"}, \"consortium\": {\"list\": \"blockchain\"}, \"transaction-node\": + {\"list\": \"blockchain\", \"show\": \"blockchain\", \"create\": \"blockchain\", + \"update\": \"blockchain\", \"delete\": \"blockchain\", \"list-api-key\": + \"blockchain\", \"regenerate-api-key\": \"blockchain\", \"wait\": \"blockchain\"}}, + \"blueprint\": {\"create\": \"blueprint\", \"update\": \"blueprint\", \"delete\": + \"blueprint\", \"show\": \"blueprint\", \"list\": \"blueprint\", \"import\": + \"blueprint\", \"export\": \"blueprint\", \"resource-group\": {\"add\": \"blueprint\", + \"update\": \"blueprint\", \"remove\": \"blueprint\", \"show\": \"blueprint\", + \"list\": \"blueprint\"}, \"artifact\": {\"delete\": \"blueprint\", \"show\": + \"blueprint\", \"list\": \"blueprint\", \"policy\": {\"create\": \"blueprint\", + \"update\": \"blueprint\"}, \"role\": {\"create\": \"blueprint\", \"update\": + \"blueprint\"}, \"template\": {\"create\": \"blueprint\", \"update\": \"blueprint\"}}, + \"publish\": \"blueprint\", \"version\": {\"delete\": \"blueprint\", \"show\": + \"blueprint\", \"list\": \"blueprint\", \"artifact\": {\"show\": \"blueprint\", + \"list\": \"blueprint\"}}, \"assignment\": {\"create\": \"blueprint\", \"update\": + \"blueprint\", \"delete\": \"blueprint\", \"show\": \"blueprint\", \"list\": + \"blueprint\", \"wait\": \"blueprint\", \"who\": \"blueprint\"}}, \"cli-translator\": + {\"arm\": {\"translate\": \"cli-translator\"}}, \"cloud-service\": {\"role-instance\": + {\"list\": \"cloud-service\", \"show\": \"cloud-service\", \"delete\": \"cloud-service\", + \"rebuild\": \"cloud-service\", \"reimage\": \"cloud-service\", \"restart\": + \"cloud-service\", \"show-instance-view\": \"cloud-service\", \"show-remote-desktop-file\": + \"cloud-service\"}, \"role\": {\"list\": \"cloud-service\", \"show\": \"cloud-service\"}, + \"list\": \"cloud-service\", \"show\": \"cloud-service\", \"create\": \"cloud-service\", + \"update\": \"cloud-service\", \"delete\": \"cloud-service\", \"delete-instance\": + \"cloud-service\", \"list-all\": \"cloud-service\", \"power-off\": \"cloud-service\", + \"rebuild\": \"cloud-service\", \"reimage\": \"cloud-service\", \"restart\": + \"cloud-service\", \"show-instance-view\": \"cloud-service\", \"start\": \"cloud-service\", + \"wait\": \"cloud-service\", \"update-domain\": {\"list-update-domain\": \"cloud-service\", + \"show-update-domain\": \"cloud-service\", \"walk-update-domain\": \"cloud-service\"}}, + \"codespace\": {\"plan\": {\"list\": \"codespaces\", \"create\": \"codespaces\", + \"show\": \"codespaces\", \"delete\": \"codespaces\"}, \"secret\": {\"list\": + \"codespaces\", \"update\": \"codespaces\", \"create\": \"codespaces\", \"delete\": + \"codespaces\"}, \"list\": \"codespaces\", \"show\": \"codespaces\", \"create\": + \"codespaces\", \"open\": \"codespaces\", \"delete\": \"codespaces\", \"resume\": + \"codespaces\", \"suspend\": \"codespaces\", \"update\": \"codespaces\", \"location\": + {\"list\": \"codespaces\", \"show\": \"codespaces\"}}, \"communication\": + {\"list\": \"communication\", \"show\": \"communication\", \"create\": \"communication\", + \"update\": \"communication\", \"delete\": \"communication\", \"link-notification-hub\": + \"communication\", \"list-key\": \"communication\", \"regenerate-key\": \"communication\", + \"wait\": \"communication\"}, \"confluent\": {\"terms\": {\"list\": \"confluent\"}, + \"organization\": {\"list\": \"confluent\", \"show\": \"confluent\", \"create\": + \"confluent\", \"update\": \"confluent\", \"delete\": \"confluent\", \"wait\": + \"confluent\"}, \"offer-detail\": {\"show\": \"confluent\"}}, \"connectedk8s\": + {\"connect\": \"connectedk8s\", \"update\": \"connectedk8s\", \"upgrade\": + \"connectedk8s\", \"delete\": \"connectedk8s\", \"enable-features\": \"connectedk8s\", + \"disable-features\": \"connectedk8s\", \"list\": \"connectedk8s\", \"show\": + \"connectedk8s\", \"proxy\": \"connectedk8s\"}, \"connectedmachine\": {\"list\": + \"connectedmachine\", \"show\": \"connectedmachine\", \"delete\": \"connectedmachine\", + \"upgrade-extension\": \"connectedmachine\", \"extension\": {\"list\": \"connectedmachine\", + \"show\": \"connectedmachine\", \"create\": \"connectedmachine\", \"update\": + \"connectedmachine\", \"delete\": \"connectedmachine\", \"wait\": \"connectedmachine\"}, + \"private-endpoint-connection\": {\"list\": \"connectedmachine\", \"show\": + \"connectedmachine\", \"update\": \"connectedmachine\", \"delete\": \"connectedmachine\", + \"wait\": \"connectedmachine\"}, \"private-link-resource\": {\"list\": \"connectedmachine\", + \"show\": \"connectedmachine\"}, \"private-link-scope\": {\"list\": \"connectedmachine\", + \"show\": \"connectedmachine\", \"create\": \"connectedmachine\", \"update\": + \"connectedmachine\", \"delete\": \"connectedmachine\", \"show-validation-detail\": + \"connectedmachine\", \"show-validation-detail-for-machine\": \"connectedmachine\", + \"update-tag\": \"connectedmachine\", \"wait\": \"connectedmachine\"}}, \"cosmosdb\": + {\"restorable-database-account\": {\"show\": \"cosmosdb-preview\", \"list\": + \"cosmosdb-preview\"}, \"show\": \"cosmosdb-preview\", \"restore\": \"cosmosdb-preview\", + \"create\": \"cosmosdb-preview\", \"update\": \"cosmosdb-preview\", \"list\": + \"cosmosdb-preview\", \"sql\": {\"restorable-database\": {\"list\": \"cosmosdb-preview\"}, + \"restorable-container\": {\"list\": \"cosmosdb-preview\"}, \"restorable-resource\": + {\"list\": \"cosmosdb-preview\"}}, \"mongodb\": {\"restorable-database\": + {\"list\": \"cosmosdb-preview\"}, \"restorable-collection\": {\"list\": \"cosmosdb-preview\"}, + \"restorable-resource\": {\"list\": \"cosmosdb-preview\"}}}, \"managed-cassandra\": + {\"cluster\": {\"create\": \"cosmosdb-preview\", \"update\": \"cosmosdb-preview\", + \"node-status\": \"cosmosdb-preview\", \"list\": \"cosmosdb-preview\", \"show\": + \"cosmosdb-preview\", \"delete\": \"cosmosdb-preview\"}, \"datacenter\": {\"create\": + \"cosmosdb-preview\", \"update\": \"cosmosdb-preview\", \"list\": \"cosmosdb-preview\", + \"show\": \"cosmosdb-preview\", \"delete\": \"cosmosdb-preview\"}}, \"costmanagement\": + {\"query\": \"costmanagement\", \"export\": {\"list\": \"costmanagement\", + \"show\": \"costmanagement\", \"create\": \"costmanagement\", \"update\": + \"costmanagement\", \"delete\": \"costmanagement\"}}, \"csvmware\": {\"vm\": + {\"create\": \"csvmware\", \"list\": \"csvmware\", \"show\": \"csvmware\", + \"update\": \"csvmware\", \"delete\": \"csvmware\", \"start\": \"csvmware\", + \"stop\": \"csvmware\", \"disk\": {\"add\": \"csvmware\", \"show\": \"csvmware\", + \"list\": \"csvmware\", \"delete\": \"csvmware\"}, \"nic\": {\"add\": \"csvmware\", + \"show\": \"csvmware\", \"list\": \"csvmware\", \"delete\": \"csvmware\"}}, + \"vm-template\": {\"show\": \"csvmware\", \"list\": \"csvmware\"}, \"virtual-network\": + {\"show\": \"csvmware\", \"list\": \"csvmware\"}, \"resource-pool\": {\"show\": + \"csvmware\", \"list\": \"csvmware\"}, \"private-cloud\": {\"list\": \"csvmware\", + \"show\": \"csvmware\"}}, \"custom-providers\": {\"resource-provider\": {\"create\": + \"custom-providers\", \"update\": \"custom-providers\", \"delete\": \"custom-providers\", + \"show\": \"custom-providers\", \"list\": \"custom-providers\"}}, \"customlocation\": + {\"create\": \"customlocation\", \"show\": \"customlocation\", \"delete\": + \"customlocation\", \"list\": \"customlocation\", \"list-enabled-resource-types\": + \"customlocation\", \"update\": \"customlocation\", \"patch\": \"customlocation\"}, + \"databox\": {\"job\": {\"create\": \"databox\", \"update\": \"databox\", + \"delete\": \"databox\", \"show\": \"databox\", \"list\": \"databox\", \"cancel\": + \"databox\", \"list-credentials\": \"databox\"}}, \"databricks\": {\"workspace\": + {\"create\": \"databricks\", \"update\": \"databricks\", \"delete\": \"databricks\", + \"show\": \"databricks\", \"list\": \"databricks\", \"wait\": \"databricks\", + \"vnet-peering\": {\"create\": \"databricks\", \"update\": \"databricks\", + \"delete\": \"databricks\", \"list\": \"databricks\", \"show\": \"databricks\", + \"wait\": \"databricks\"}}}, \"datadog\": {\"terms\": {\"list\": \"datadog\", + \"create\": \"datadog\", \"update\": \"datadog\"}, \"monitor\": {\"list\": + \"datadog\", \"show\": \"datadog\", \"create\": \"datadog\", \"update\": \"datadog\", + \"delete\": \"datadog\", \"get-default-key\": \"datadog\", \"list-api-key\": + \"datadog\", \"list-host\": \"datadog\", \"list-linked-resource\": \"datadog\", + \"list-monitored-resource\": \"datadog\", \"refresh-set-password-link\": \"datadog\", + \"set-default-key\": \"datadog\", \"wait\": \"datadog\"}, \"tag-rule\": {\"list\": + \"datadog\", \"show\": \"datadog\", \"create\": \"datadog\", \"update\": \"datadog\"}, + \"sso-config\": {\"list\": \"datadog\", \"show\": \"datadog\", \"create\": + \"datadog\", \"update\": \"datadog\", \"wait\": \"datadog\"}}, \"datafactory\": + {\"list\": \"datafactory\", \"show\": \"datafactory\", \"create\": \"datafactory\", + \"update\": \"datafactory\", \"delete\": \"datafactory\", \"configure-factory-repo\": + \"datafactory\", \"get-data-plane-access\": \"datafactory\", \"get-git-hub-access-token\": + \"datafactory\", \"activity-run\": {\"query-by-pipeline-run\": \"datafactory\"}, + \"dataset\": {\"list\": \"datafactory\", \"show\": \"datafactory\", \"create\": + \"datafactory\", \"update\": \"datafactory\", \"delete\": \"datafactory\"}, + \"integration-runtime\": {\"list\": \"datafactory\", \"show\": \"datafactory\", + \"linked-integration-runtime\": {\"create\": \"datafactory\"}, \"managed\": + {\"create\": \"datafactory\"}, \"self-hosted\": {\"create\": \"datafactory\"}, + \"update\": \"datafactory\", \"delete\": \"datafactory\", \"get-connection-info\": + \"datafactory\", \"get-monitoring-data\": \"datafactory\", \"get-status\": + \"datafactory\", \"list-auth-key\": \"datafactory\", \"regenerate-auth-key\": + \"datafactory\", \"remove-link\": \"datafactory\", \"start\": \"datafactory\", + \"stop\": \"datafactory\", \"sync-credentials\": \"datafactory\", \"upgrade\": + \"datafactory\", \"wait\": \"datafactory\"}, \"integration-runtime-node\": + {\"show\": \"datafactory\", \"update\": \"datafactory\", \"delete\": \"datafactory\", + \"get-ip-address\": \"datafactory\"}, \"linked-service\": {\"list\": \"datafactory\", + \"show\": \"datafactory\", \"create\": \"datafactory\", \"update\": \"datafactory\", + \"delete\": \"datafactory\"}, \"managed-private-endpoint\": {\"list\": \"datafactory\", + \"show\": \"datafactory\", \"create\": \"datafactory\", \"update\": \"datafactory\", + \"delete\": \"datafactory\"}, \"managed-virtual-network\": {\"list\": \"datafactory\", + \"show\": \"datafactory\", \"create\": \"datafactory\", \"update\": \"datafactory\"}, + \"pipeline\": {\"list\": \"datafactory\", \"show\": \"datafactory\", \"create\": + \"datafactory\", \"update\": \"datafactory\", \"delete\": \"datafactory\", + \"create-run\": \"datafactory\"}, \"pipeline-run\": {\"show\": \"datafactory\", + \"cancel\": \"datafactory\", \"query-by-factory\": \"datafactory\"}, \"trigger\": + {\"list\": \"datafactory\", \"show\": \"datafactory\", \"create\": \"datafactory\", + \"update\": \"datafactory\", \"delete\": \"datafactory\", \"get-event-subscription-status\": + \"datafactory\", \"query-by-factory\": \"datafactory\", \"start\": \"datafactory\", + \"stop\": \"datafactory\", \"subscribe-to-event\": \"datafactory\", \"unsubscribe-from-event\": + \"datafactory\", \"wait\": \"datafactory\"}, \"trigger-run\": {\"cancel\": + \"datafactory\", \"query-by-factory\": \"datafactory\", \"rerun\": \"datafactory\"}}, + \"dataprotection\": {\"backup-vault\": {\"show\": \"dataprotection\", \"create\": + \"dataprotection\", \"update\": \"dataprotection\", \"delete\": \"dataprotection\", + \"wait\": \"dataprotection\", \"list\": \"dataprotection\"}, \"backup-policy\": + {\"list\": \"dataprotection\", \"show\": \"dataprotection\", \"create\": \"dataprotection\", + \"delete\": \"dataprotection\", \"get-default-policy-template\": \"dataprotection\", + \"trigger\": {\"create-schedule\": \"dataprotection\", \"set\": \"dataprotection\"}, + \"retention-rule\": {\"create-lifecycle\": \"dataprotection\", \"set\": \"dataprotection\", + \"remove\": \"dataprotection\"}, \"tag\": {\"create-absolute-criteria\": \"dataprotection\", + \"create-generic-criteria\": \"dataprotection\", \"set\": \"dataprotection\", + \"remove\": \"dataprotection\"}}, \"backup-instance\": {\"list\": \"dataprotection\", + \"show\": \"dataprotection\", \"create\": \"dataprotection\", \"delete\": + \"dataprotection\", \"adhoc-backup\": \"dataprotection\", \"restore\": {\"trigger\": + \"dataprotection\", \"initialize-for-data-recovery\": \"dataprotection\", + \"initialize-for-data-recovery-as-files\": \"dataprotection\", \"initialize-for-item-recovery\": + \"dataprotection\"}, \"validate-for-backup\": \"dataprotection\", \"validate-for-restore\": + \"dataprotection\", \"wait\": \"dataprotection\", \"initialize\": \"dataprotection\", + \"update-policy\": \"dataprotection\", \"list-from-resourcegraph\": \"dataprotection\"}, + \"recovery-point\": {\"list\": \"dataprotection\", \"show\": \"dataprotection\"}, + \"job\": {\"list\": \"dataprotection\", \"show\": \"dataprotection\", \"list-from-resourcegraph\": + \"dataprotection\"}, \"restorable-time-range\": {\"find\": \"dataprotection\"}}, + \"datashare\": {\"account\": {\"list\": \"datashare\", \"show\": \"datashare\", + \"create\": \"datashare\", \"update\": \"datashare\", \"delete\": \"datashare\", + \"wait\": \"datashare\"}, \"consumer\": {\"invitation\": {\"list\": \"datashare\", + \"show\": \"datashare\", \"reject\": \"datashare\"}, \"dataset-mapping\": + {\"list\": \"datashare\", \"show\": \"datashare\", \"create\": \"datashare\", + \"delete\": \"datashare\"}, \"share-subscription\": {\"list\": \"datashare\", + \"show\": \"datashare\", \"create\": \"datashare\", \"delete\": \"datashare\", + \"list-source-share-synchronization-setting\": \"datashare\", \"wait\": \"datashare\", + \"synchronization\": {\"list\": \"datashare\", \"list-detail\": \"datashare\", + \"start\": \"datashare\", \"cancel\": \"datashare\", \"wait\": \"datashare\"}, + \"list-source-dataset\": \"datashare\"}, \"trigger\": {\"list\": \"datashare\", + \"show\": \"datashare\", \"create\": \"datashare\", \"delete\": \"datashare\", + \"wait\": \"datashare\"}}, \"dataset\": {\"list\": \"datashare\", \"show\": + \"datashare\", \"create\": \"datashare\", \"delete\": \"datashare\", \"wait\": + \"datashare\"}, \"invitation\": {\"list\": \"datashare\", \"show\": \"datashare\", + \"create\": \"datashare\", \"delete\": \"datashare\"}, \"list\": \"datashare\", + \"show\": \"datashare\", \"create\": \"datashare\", \"delete\": \"datashare\", + \"wait\": \"datashare\", \"synchronization\": {\"list-detail\": \"datashare\", + \"list\": \"datashare\"}, \"provider-share-subscription\": {\"list\": \"datashare\", + \"show\": \"datashare\", \"revoke\": \"datashare\", \"reinstate\": \"datashare\", + \"wait\": \"datashare\"}, \"synchronization-setting\": {\"list\": \"datashare\", + \"show\": \"datashare\", \"create\": \"datashare\", \"delete\": \"datashare\", + \"wait\": \"datashare\"}}, \"mysql\": {\"up\": \"db-up\", \"down\": \"db-up\", + \"show-connection-string\": \"db-up\", \"flexible-server\": {\"connect\": + \"rdbms-connect\", \"execute\": \"rdbms-connect\"}}, \"functionapp\": {\"app\": + {\"up\": \"deploy-to-azure\"}}, \"container\": {\"app\": {\"up\": \"deploy-to-azure\"}}, + \"desktopvirtualization\": {\"workspace\": {\"list\": \"desktopvirtualization\", + \"show\": \"desktopvirtualization\", \"create\": \"desktopvirtualization\", + \"update\": \"desktopvirtualization\", \"delete\": \"desktopvirtualization\"}, + \"applicationgroup\": {\"list\": \"desktopvirtualization\", \"show\": \"desktopvirtualization\", + \"create\": \"desktopvirtualization\", \"update\": \"desktopvirtualization\", + \"delete\": \"desktopvirtualization\"}, \"hostpool\": {\"list\": \"desktopvirtualization\", + \"show\": \"desktopvirtualization\", \"create\": \"desktopvirtualization\", + \"update\": \"desktopvirtualization\", \"delete\": \"desktopvirtualization\"}}, + \"disk-pool\": {\"list\": \"diskpool\", \"show\": \"diskpool\", \"create\": + \"diskpool\", \"update\": \"diskpool\", \"delete\": \"diskpool\", \"list-outbound-network-dependency-endpoint\": + \"diskpool\", \"list-skus\": \"diskpool\", \"start\": \"diskpool\", \"stop\": + \"diskpool\", \"wait\": \"diskpool\", \"iscsi-target\": {\"list\": \"diskpool\", + \"show\": \"diskpool\", \"create\": \"diskpool\", \"update\": \"diskpool\", + \"delete\": \"diskpool\", \"wait\": \"diskpool\"}}, \"dms\": {\"project\": + {\"create\": \"dms-preview\", \"task\": {\"create\": \"dms-preview\", \"cancel\": + \"dms-preview\", \"restart\": \"dms-preview\", \"stop\": \"dms-preview\"}}}, + \"dnc\": {\"controller\": {\"show\": \"dnc\", \"create\": \"dnc\", \"delete\": + \"dnc\", \"wait\": \"dnc\"}, \"orchestrator-instance-service\": {\"show\": + \"dnc\", \"create\": \"dnc\", \"delete\": \"dnc\", \"wait\": \"dnc\"}, \"delegated-subnet-service\": + {\"show\": \"dnc\", \"create\": \"dnc\", \"delete\": \"dnc\", \"wait\": \"dnc\"}}, + \"eventgrid\": {\"topic\": {\"show\": \"eventgrid\", \"key\": {\"list\": \"eventgrid\", + \"regenerate\": \"eventgrid\"}, \"delete\": \"eventgrid\", \"list\": \"eventgrid\", + \"create\": \"eventgrid\", \"update\": \"eventgrid\", \"private-endpoint-connection\": + {\"show\": \"eventgrid\", \"list\": \"eventgrid\", \"delete\": \"eventgrid\", + \"approve\": \"eventgrid\", \"reject\": \"eventgrid\"}, \"private-link-resource\": + {\"show\": \"eventgrid\", \"list\": \"eventgrid\"}}, \"extension-topic\": + {\"show\": \"eventgrid\"}, \"domain\": {\"topic\": {\"show\": \"eventgrid\", + \"list\": \"eventgrid\", \"delete\": \"eventgrid\", \"create\": \"eventgrid\"}, + \"show\": \"eventgrid\", \"key\": {\"list\": \"eventgrid\", \"regenerate\": + \"eventgrid\"}, \"list\": \"eventgrid\", \"create\": \"eventgrid\", \"delete\": + \"eventgrid\", \"update\": \"eventgrid\", \"private-endpoint-connection\": + {\"show\": \"eventgrid\", \"list\": \"eventgrid\", \"delete\": \"eventgrid\", + \"approve\": \"eventgrid\", \"reject\": \"eventgrid\"}, \"private-link-resource\": + {\"show\": \"eventgrid\", \"list\": \"eventgrid\"}}, \"system-topic\": {\"show\": + \"eventgrid\", \"delete\": \"eventgrid\", \"list\": \"eventgrid\", \"create\": + \"eventgrid\", \"update\": \"eventgrid\", \"event-subscription\": {\"show\": + \"eventgrid\", \"delete\": \"eventgrid\", \"list\": \"eventgrid\", \"create\": + \"eventgrid\", \"update\": \"eventgrid\"}}, \"partner\": {\"registration\": + {\"show\": \"eventgrid\", \"delete\": \"eventgrid\", \"list\": \"eventgrid\", + \"create\": \"eventgrid\"}, \"namespace\": {\"show\": \"eventgrid\", \"delete\": + \"eventgrid\", \"list\": \"eventgrid\", \"create\": \"eventgrid\", \"key\": + {\"list\": \"eventgrid\", \"regenerate\": \"eventgrid\"}, \"event-channel\": + {\"show\": \"eventgrid\", \"delete\": \"eventgrid\", \"list\": \"eventgrid\", + \"create\": \"eventgrid\"}}, \"topic\": {\"show\": \"eventgrid\", \"delete\": + \"eventgrid\", \"activate\": \"eventgrid\", \"deactivate\": \"eventgrid\", + \"list\": \"eventgrid\", \"event-subscription\": {\"show\": \"eventgrid\", + \"delete\": \"eventgrid\", \"list\": \"eventgrid\", \"create\": \"eventgrid\", + \"update\": \"eventgrid\"}}}, \"event-subscription\": {\"create\": \"eventgrid\", + \"show\": \"eventgrid\", \"delete\": \"eventgrid\", \"list\": \"eventgrid\", + \"update\": \"eventgrid\"}, \"topic-type\": {\"list\": \"eventgrid\", \"show\": + \"eventgrid\", \"list-event-types\": \"eventgrid\"}}, \"footprint\": {\"profile\": + {\"list\": \"footprint\", \"show\": \"footprint\", \"create\": \"footprint\", + \"update\": \"footprint\", \"delete\": \"footprint\"}, \"measurement-endpoint\": + {\"list\": \"footprint\", \"show\": \"footprint\", \"create\": \"footprint\", + \"update\": \"footprint\", \"delete\": \"footprint\"}, \"measurement-endpoint-condition\": + {\"list\": \"footprint\", \"show\": \"footprint\", \"create\": \"footprint\", + \"update\": \"footprint\", \"delete\": \"footprint\"}, \"experiment\": {\"list\": + \"footprint\", \"show\": \"footprint\", \"create\": \"footprint\", \"update\": + \"footprint\", \"delete\": \"footprint\"}}, \"fzf\": {\"install\": \"fzf\", + \"group\": \"fzf\", \"location\": \"fzf\", \"subscription\": \"fzf\"}, \"guestconfig\": + {\"guest-configuration-assignment\": {\"list\": \"guestconfig\", \"show\": + \"guestconfig\", \"create\": \"guestconfig\", \"update\": \"guestconfig\", + \"delete\": \"guestconfig\", \"wait\": \"guestconfig\"}, \"guest-configuration-assignment-report\": + {\"list\": \"guestconfig\", \"show\": \"guestconfig\"}, \"guest-configuration-hcrp-assignment\": + {\"list\": \"guestconfig\", \"show\": \"guestconfig\", \"create\": \"guestconfig\", + \"update\": \"guestconfig\", \"delete\": \"guestconfig\", \"wait\": \"guestconfig\"}, + \"guest-configuration-hcrp-assignment-report\": {\"list\": \"guestconfig\", + \"show\": \"guestconfig\"}}, \"dedicated-hsm\": {\"list\": \"hardware-security-modules\", + \"show\": \"hardware-security-modules\", \"create\": \"hardware-security-modules\", + \"update\": \"hardware-security-modules\", \"delete\": \"hardware-security-modules\", + \"wait\": \"hardware-security-modules\"}, \"healthbot\": {\"list\": \"healthbot\", + \"show\": \"healthbot\", \"create\": \"healthbot\", \"update\": \"healthbot\", + \"delete\": \"healthbot\", \"wait\": \"healthbot\"}, \"healthcareapis\": {\"service\": + {\"list\": \"healthcareapis\", \"show\": \"healthcareapis\", \"create\": \"healthcareapis\", + \"update\": \"healthcareapis\", \"delete\": \"healthcareapis\", \"wait\": + \"healthcareapis\"}, \"acr\": {\"list\": \"healthcareapis\", \"add\": \"healthcareapis\", + \"reset\": \"healthcareapis\", \"remove\": \"healthcareapis\"}, \"operation-result\": + {\"show\": \"healthcareapis\"}, \"private-endpoint-connection\": {\"list\": + \"healthcareapis\", \"show\": \"healthcareapis\", \"create\": \"healthcareapis\", + \"update\": \"healthcareapis\", \"delete\": \"healthcareapis\", \"wait\": + \"healthcareapis\"}, \"private-link-resource\": {\"list\": \"healthcareapis\", + \"show\": \"healthcareapis\"}}, \"hpc-cache\": {\"skus\": {\"list\": \"hpc-cache\"}, + \"usage-model\": {\"list\": \"hpc-cache\"}, \"create\": \"hpc-cache\", \"update\": + \"hpc-cache\", \"delete\": \"hpc-cache\", \"show\": \"hpc-cache\", \"list\": + \"hpc-cache\", \"flush\": \"hpc-cache\", \"start\": \"hpc-cache\", \"stop\": + \"hpc-cache\", \"upgrade-firmware\": \"hpc-cache\", \"wait\": \"hpc-cache\", + \"blob-storage-target\": {\"add\": \"hpc-cache\", \"update\": \"hpc-cache\"}, + \"storage-target\": {\"remove\": \"hpc-cache\", \"show\": \"hpc-cache\", \"list\": + \"hpc-cache\"}, \"nfs-storage-target\": {\"add\": \"hpc-cache\", \"update\": + \"hpc-cache\"}}, \"image\": {\"copy\": \"image-copy-extension\"}, \"import-export\": + {\"list\": \"import-export\", \"show\": \"import-export\", \"create\": \"import-export\", + \"update\": \"import-export\", \"delete\": \"import-export\", \"bit-locker-key\": + {\"list\": \"import-export\"}, \"location\": {\"list\": \"import-export\", + \"show\": \"import-export\"}}, \"internet-analyzer\": {\"profile\": {\"create\": + \"internet-analyzer\", \"update\": \"internet-analyzer\", \"delete\": \"internet-analyzer\", + \"list\": \"internet-analyzer\", \"show\": \"internet-analyzer\"}, \"preconfigured-endpoint\": + {\"list\": \"internet-analyzer\"}, \"test\": {\"create\": \"internet-analyzer\", + \"update\": \"internet-analyzer\", \"delete\": \"internet-analyzer\", \"list\": + \"internet-analyzer\", \"show\": \"internet-analyzer\"}, \"show-scorecard\": + \"internet-analyzer\", \"show-timeseries\": \"internet-analyzer\"}, \"k8s-configuration\": + {\"create\": \"k8s-configuration\", \"update\": \"k8s-configuration\", \"delete\": + \"k8s-configuration\", \"list\": \"k8s-configuration\", \"show\": \"k8s-configuration\"}, + \"k8s-extension\": {\"create\": \"k8s-extension\", \"delete\": \"k8s-extension\", + \"list\": \"k8s-extension\", \"show\": \"k8s-extension\"}, \"k8sconfiguration\": + {\"create\": \"k8sconfiguration\", \"update\": \"k8sconfiguration\", \"delete\": + \"k8sconfiguration\", \"list\": \"k8sconfiguration\", \"show\": \"k8sconfiguration\"}, + \"kusto\": {\"cluster\": {\"list\": \"kusto\", \"show\": \"kusto\", \"create\": + \"kusto\", \"update\": \"kusto\", \"delete\": \"kusto\", \"add-language-extension\": + \"kusto\", \"detach-follower-database\": \"kusto\", \"diagnose-virtual-network\": + \"kusto\", \"list-follower-database\": \"kusto\", \"list-language-extension\": + \"kusto\", \"list-sku\": \"kusto\", \"remove-language-extension\": \"kusto\", + \"start\": \"kusto\", \"stop\": \"kusto\", \"wait\": \"kusto\"}, \"cluster-principal-assignment\": + {\"list\": \"kusto\", \"show\": \"kusto\", \"create\": \"kusto\", \"update\": + \"kusto\", \"delete\": \"kusto\", \"wait\": \"kusto\"}, \"database\": {\"list\": + \"kusto\", \"show\": \"kusto\", \"create\": \"kusto\", \"update\": \"kusto\", + \"delete\": \"kusto\", \"add-principal\": \"kusto\", \"list-principal\": \"kusto\", + \"remove-principal\": \"kusto\", \"wait\": \"kusto\"}, \"database-principal-assignment\": + {\"list\": \"kusto\", \"show\": \"kusto\", \"create\": \"kusto\", \"update\": + \"kusto\", \"delete\": \"kusto\", \"wait\": \"kusto\"}, \"script\": {\"list\": + \"kusto\", \"show\": \"kusto\", \"create\": \"kusto\", \"update\": \"kusto\", + \"delete\": \"kusto\", \"wait\": \"kusto\"}, \"attached-database-configuration\": + {\"list\": \"kusto\", \"show\": \"kusto\", \"create\": \"kusto\", \"update\": + \"kusto\", \"delete\": \"kusto\", \"wait\": \"kusto\"}, \"data-connection\": + {\"list\": \"kusto\", \"show\": \"kusto\", \"event-grid\": {\"create\": \"kusto\", + \"update\": \"kusto\", \"data-connection-validation\": \"kusto\"}, \"event-hub\": + {\"create\": \"kusto\", \"update\": \"kusto\", \"data-connection-validation\": + \"kusto\"}, \"iot-hub\": {\"create\": \"kusto\", \"update\": \"kusto\", \"data-connection-validation\": + \"kusto\"}, \"delete\": \"kusto\", \"wait\": \"kusto\"}, \"operation-result\": + {\"show\": \"kusto\"}}, \"logic\": {\"workflow\": {\"list\": \"logic\", \"show\": + \"logic\", \"create\": \"logic\", \"update\": \"logic\", \"delete\": \"logic\"}, + \"integration-account\": {\"list\": \"logic\", \"show\": \"logic\", \"create\": + \"logic\", \"update\": \"logic\", \"delete\": \"logic\", \"import\": \"logic\"}}, + \"maintenance\": {\"public-configuration\": {\"list\": \"maintenance\", \"show\": + \"maintenance\"}, \"applyupdate\": {\"list\": \"maintenance\", \"show\": \"maintenance\", + \"create\": \"maintenance\", \"update\": \"maintenance\", \"show-parent\": + \"maintenance\", \"get-parent\": \"maintenance\"}, \"assignment\": {\"list\": + \"maintenance\", \"create\": \"maintenance\", \"update\": \"maintenance\", + \"delete\": \"maintenance\", \"list-parent\": \"maintenance\"}, \"configuration\": + {\"list\": \"maintenance\", \"show\": \"maintenance\", \"create\": \"maintenance\", + \"update\": \"maintenance\", \"delete\": \"maintenance\"}, \"configuration-for-resource-group\": + {\"list\": \"maintenance\"}, \"applyupdate-for-resource-group\": {\"list\": + \"maintenance\"}, \"update\": {\"list\": \"maintenance\", \"list-parent\": + \"maintenance\"}}, \"managementpartner\": {\"delete\": \"managementpartner\", + \"create\": \"managementpartner\", \"update\": \"managementpartner\", \"show\": + \"managementpartner\"}, \"mesh\": {\"deployment\": {\"create\": \"mesh\"}, + \"generate\": {\"armtemplate\": \"mesh\"}, \"app\": {\"list\": \"mesh\", \"show\": + \"mesh\", \"delete\": \"mesh\"}, \"service\": {\"list\": \"mesh\", \"show\": + \"mesh\"}, \"service-replica\": {\"list\": \"mesh\", \"show\": \"mesh\"}, + \"code-package-log\": {\"get\": \"mesh\"}, \"network\": {\"show\": \"mesh\", + \"delete\": \"mesh\", \"list\": \"mesh\"}, \"volume\": {\"create\": \"mesh\", + \"list\": \"mesh\", \"show\": \"mesh\", \"delete\": \"mesh\"}, \"secret\": + {\"show\": \"mesh\", \"delete\": \"mesh\", \"list\": \"mesh\"}, \"secretvalue\": + {\"show\": \"mesh\", \"delete\": \"mesh\", \"list\": \"mesh\"}, \"gateway\": + {\"show\": \"mesh\", \"delete\": \"mesh\", \"list\": \"mesh\"}}, \"spatial-anchors-account\": + {\"create\": \"mixed-reality\", \"list\": \"mixed-reality\", \"show\": \"mixed-reality\", + \"update\": \"mixed-reality\", \"delete\": \"mixed-reality\", \"key\": {\"show\": + \"mixed-reality\", \"renew\": \"mixed-reality\"}}, \"remote-rendering-account\": + {\"create\": \"mixed-reality\", \"update\": \"mixed-reality\", \"list\": \"mixed-reality\", + \"show\": \"mixed-reality\", \"delete\": \"mixed-reality\", \"key\": {\"show\": + \"mixed-reality\", \"renew\": \"mixed-reality\"}}, \"netappfiles\": {\"account\": + {\"show\": \"netappfiles-preview\", \"list\": \"netappfiles-preview\", \"delete\": + \"netappfiles-preview\", \"create\": \"netappfiles-preview\", \"set\": \"netappfiles-preview\", + \"update\": \"netappfiles-preview\"}, \"pool\": {\"show\": \"netappfiles-preview\", + \"list\": \"netappfiles-preview\", \"delete\": \"netappfiles-preview\", \"create\": + \"netappfiles-preview\", \"update\": \"netappfiles-preview\"}, \"volume\": + {\"show\": \"netappfiles-preview\", \"list\": \"netappfiles-preview\", \"delete\": + \"netappfiles-preview\", \"create\": \"netappfiles-preview\", \"update\": + \"netappfiles-preview\"}, \"mount-target\": {\"list\": \"netappfiles-preview\"}, + \"snapshot\": {\"show\": \"netappfiles-preview\", \"list\": \"netappfiles-preview\", + \"delete\": \"netappfiles-preview\", \"create\": \"netappfiles-preview\"}}, + \"next\": \"next\", \"notification-hub\": {\"namespace\": {\"create\": \"notification-hub\", + \"update\": \"notification-hub\", \"delete\": \"notification-hub\", \"show\": + \"notification-hub\", \"list\": \"notification-hub\", \"check-availability\": + \"notification-hub\", \"wait\": \"notification-hub\", \"authorization-rule\": + {\"show\": \"notification-hub\", \"list\": \"notification-hub\", \"create\": + \"notification-hub\", \"delete\": \"notification-hub\", \"list-keys\": \"notification-hub\", + \"regenerate-keys\": \"notification-hub\"}}, \"create\": \"notification-hub\", + \"update\": \"notification-hub\", \"delete\": \"notification-hub\", \"show\": + \"notification-hub\", \"list\": \"notification-hub\", \"check-availability\": + \"notification-hub\", \"test-send\": \"notification-hub\", \"authorization-rule\": + {\"list\": \"notification-hub\", \"show\": \"notification-hub\", \"create\": + \"notification-hub\", \"delete\": \"notification-hub\", \"list-keys\": \"notification-hub\", + \"regenerate-keys\": \"notification-hub\"}, \"credential\": {\"list\": \"notification-hub\", + \"gcm\": {\"update\": \"notification-hub\"}, \"apns\": {\"update\": \"notification-hub\"}, + \"wns\": {\"update\": \"notification-hub\"}, \"mpns\": {\"update\": \"notification-hub\"}, + \"adm\": {\"update\": \"notification-hub\"}, \"baidu\": {\"update\": \"notification-hub\"}}}, + \"offazure\": {\"hyperv\": {\"cluster\": {\"list\": \"offazure\", \"show\": + \"offazure\"}, \"host\": {\"list\": \"offazure\", \"show\": \"offazure\"}, + \"machine\": {\"list\": \"offazure\", \"show\": \"offazure\"}, \"run-as-account\": + {\"list\": \"offazure\", \"show\": \"offazure\"}, \"site\": {\"show\": \"offazure\", + \"create\": \"offazure\", \"delete\": \"offazure\"}}, \"vmware\": {\"machine\": + {\"list\": \"offazure\", \"show\": \"offazure\"}, \"run-as-account\": {\"list\": + \"offazure\", \"show\": \"offazure\"}, \"site\": {\"show\": \"offazure\", + \"create\": \"offazure\", \"delete\": \"offazure\"}, \"vcenter\": {\"list\": + \"offazure\", \"show\": \"offazure\"}}}, \"peering\": {\"legacy\": {\"list\": + \"peering\"}, \"asn\": {\"list\": \"peering\", \"show\": \"peering\", \"create\": + \"peering\", \"delete\": \"peering\"}, \"location\": {\"list\": \"peering\"}, + \"registered-asn\": {\"list\": \"peering\", \"show\": \"peering\", \"create\": + \"peering\", \"update\": \"peering\", \"delete\": \"peering\"}, \"registered-prefix\": + {\"list\": \"peering\", \"show\": \"peering\", \"create\": \"peering\", \"update\": + \"peering\", \"delete\": \"peering\"}, \"peering\": {\"list\": \"peering\", + \"show\": \"peering\", \"create\": \"peering\", \"update\": \"peering\", \"delete\": + \"peering\"}, \"received-route\": {\"list\": \"peering\"}, \"service\": {\"country\": + {\"list\": \"peering\"}, \"location\": {\"list\": \"peering\"}, \"prefix\": + {\"list\": \"peering\", \"show\": \"peering\", \"create\": \"peering\", \"update\": + \"peering\", \"delete\": \"peering\"}, \"provider\": {\"list\": \"peering\"}, + \"list\": \"peering\", \"show\": \"peering\", \"create\": \"peering\", \"update\": + \"peering\", \"delete\": \"peering\"}}, \"portal\": {\"dashboard\": {\"list\": + \"portal\", \"show\": \"portal\", \"create\": \"portal\", \"update\": \"portal\", + \"delete\": \"portal\", \"import\": \"portal\"}}, \"powerbi\": {\"embedded-capacity\": + {\"create\": \"powerbidedicated\", \"update\": \"powerbidedicated\", \"delete\": + \"powerbidedicated\", \"show\": \"powerbidedicated\", \"list\": \"powerbidedicated\", + \"wait\": \"powerbidedicated\"}}, \"providerhub\": {\"custom-rollout\": {\"list\": + \"providerhub\", \"show\": \"providerhub\", \"create\": \"providerhub\"}, + \"default-rollout\": {\"list\": \"providerhub\", \"show\": \"providerhub\", + \"create\": \"providerhub\", \"delete\": \"providerhub\", \"stop\": \"providerhub\"}, + \"manifest\": {\"checkin\": \"providerhub\", \"generate\": \"providerhub\"}, + \"notification-registration\": {\"list\": \"providerhub\", \"show\": \"providerhub\", + \"create\": \"providerhub\", \"delete\": \"providerhub\"}, \"operation\": + {\"list\": \"providerhub\", \"create\": \"providerhub\", \"delete\": \"providerhub\"}, + \"provider-registration\": {\"list\": \"providerhub\", \"show\": \"providerhub\", + \"create\": \"providerhub\", \"delete\": \"providerhub\", \"generate-operation\": + \"providerhub\"}, \"resource-type-registration\": {\"list\": \"providerhub\", + \"show\": \"providerhub\", \"create\": \"providerhub\", \"delete\": \"providerhub\"}, + \"sku\": {\"list\": \"providerhub\", \"show\": \"providerhub\", \"create\": + \"providerhub\", \"delete\": \"providerhub\", \"show-nested-resource-type-first\": + \"providerhub\", \"show-nested-resource-type-second\": \"providerhub\", \"show-nested-resource-type-third\": + \"providerhub\"}}, \"purview\": {\"account\": {\"list\": \"purview\", \"show\": + \"purview\", \"create\": \"purview\", \"update\": \"purview\", \"delete\": + \"purview\", \"add-root-collection-admin\": \"purview\", \"list-key\": \"purview\", + \"wait\": \"purview\"}, \"default-account\": {\"show\": \"purview\", \"remove\": + \"purview\", \"set\": \"purview\"}}, \"quantum\": {\"workspace\": {\"create\": + \"quantum\", \"delete\": \"quantum\", \"list\": \"quantum\", \"show\": \"quantum\", + \"set\": \"quantum\", \"clear\": \"quantum\", \"quotas\": \"quantum\"}, \"target\": + {\"list\": \"quantum\", \"show\": \"quantum\", \"set\": \"quantum\", \"clear\": + \"quantum\"}, \"job\": {\"list\": \"quantum\", \"show\": \"quantum\", \"submit\": + \"quantum\", \"wait\": \"quantum\", \"output\": \"quantum\", \"cancel\": \"quantum\"}, + \"run\": \"quantum\", \"execute\": \"quantum\", \"offerings\": {\"list\": + \"quantum\", \"accept-terms\": \"quantum\", \"show-terms\": \"quantum\"}}, + \"redisenterprise\": {\"operation-status\": {\"show\": \"redisenterprise\"}, + \"list\": \"redisenterprise\", \"show\": \"redisenterprise\", \"create\": + \"redisenterprise\", \"update\": \"redisenterprise\", \"delete\": \"redisenterprise\", + \"wait\": \"redisenterprise\", \"database\": {\"list\": \"redisenterprise\", + \"show\": \"redisenterprise\", \"create\": \"redisenterprise\", \"update\": + \"redisenterprise\", \"delete\": \"redisenterprise\", \"export\": \"redisenterprise\", + \"import\": \"redisenterprise\", \"list-keys\": \"redisenterprise\", \"regenerate-key\": + \"redisenterprise\", \"wait\": \"redisenterprise\"}}, \"graph\": {\"query\": + \"resource-graph\", \"shared-query\": {\"create\": \"resource-graph\", \"list\": + \"resource-graph\", \"delete\": \"resource-graph\", \"show\": \"resource-graph\"}}, + \"resource-mover\": {\"move-collection\": {\"list\": \"resource-mover\", \"show\": + \"resource-mover\", \"create\": \"resource-mover\", \"update\": \"resource-mover\", + \"delete\": \"resource-mover\", \"bulk-remove\": \"resource-mover\", \"commit\": + \"resource-mover\", \"discard\": \"resource-mover\", \"initiate-move\": \"resource-mover\", + \"list-required-for\": \"resource-mover\", \"prepare\": \"resource-mover\", + \"resolve-dependency\": \"resource-mover\", \"wait\": \"resource-mover\", + \"list-unresolved-dependency\": \"resource-mover\"}, \"move-resource\": {\"list\": + \"resource-mover\", \"show\": \"resource-mover\", \"delete\": \"resource-mover\", + \"add\": \"resource-mover\", \"wait\": \"resource-mover\"}}, \"hanainstance\": + {\"create\": \"sap-hana\", \"list\": \"sap-hana\", \"show\": \"sap-hana\", + \"restart\": \"sap-hana\", \"start\": \"sap-hana\", \"shutdown\": \"sap-hana\", + \"update\": \"sap-hana\", \"delete\": \"sap-hana\"}, \"sapmonitor\": {\"list\": + \"sap-hana\", \"show\": \"sap-hana\", \"create\": \"sap-hana\", \"update\": + \"sap-hana\", \"delete\": \"sap-hana\", \"provider-instance\": {\"list\": + \"sap-hana\", \"show\": \"sap-hana\", \"create\": \"sap-hana\", \"delete\": + \"sap-hana\"}}, \"sentinel\": {\"alert-rule\": {\"list\": \"sentinel\", \"show\": + \"sentinel\", \"create\": \"sentinel\", \"update\": \"sentinel\", \"delete\": + \"sentinel\", \"get-action\": \"sentinel\"}, \"action\": {\"list\": \"sentinel\"}, + \"alert-rule-template\": {\"list\": \"sentinel\", \"show\": \"sentinel\"}, + \"bookmark\": {\"list\": \"sentinel\", \"show\": \"sentinel\", \"create\": + \"sentinel\", \"update\": \"sentinel\", \"delete\": \"sentinel\"}, \"data-connector\": + {\"list\": \"sentinel\", \"show\": \"sentinel\", \"create\": \"sentinel\", + \"update\": \"sentinel\", \"delete\": \"sentinel\"}, \"incident\": {\"list\": + \"sentinel\", \"show\": \"sentinel\", \"create\": \"sentinel\", \"update\": + \"sentinel\", \"delete\": \"sentinel\"}, \"incident-comment\": {\"list\": + \"sentinel\", \"show\": \"sentinel\", \"create\": \"sentinel\"}}, \"serial-console\": + {\"connect\": \"serial-console\", \"enable\": \"serial-console\", \"disable\": + \"serial-console\", \"send\": {\"nmi\": \"serial-console\", \"reset\": \"serial-console\", + \"sysrq\": \"serial-console\"}}, \"spring-cloud\": {\"create\": \"spring-cloud\", + \"update\": \"spring-cloud\", \"delete\": \"spring-cloud\", \"list\": \"spring-cloud\", + \"show\": \"spring-cloud\", \"test-endpoint\": {\"enable\": \"spring-cloud\", + \"disable\": \"spring-cloud\", \"renew-key\": \"spring-cloud\", \"list\": + \"spring-cloud\"}, \"config-server\": {\"set\": \"spring-cloud\", \"clear\": + \"spring-cloud\", \"show\": \"spring-cloud\", \"git\": {\"set\": \"spring-cloud\", + \"repo\": {\"add\": \"spring-cloud\", \"remove\": \"spring-cloud\", \"update\": + \"spring-cloud\", \"list\": \"spring-cloud\"}}}, \"app\": {\"create\": \"spring-cloud\", + \"update\": \"spring-cloud\", \"deploy\": \"spring-cloud\", \"scale\": \"spring-cloud\", + \"show-deploy-log\": \"spring-cloud\", \"set-deployment\": \"spring-cloud\", + \"unset-deployment\": \"spring-cloud\", \"delete\": \"spring-cloud\", \"list\": + \"spring-cloud\", \"show\": \"spring-cloud\", \"start\": \"spring-cloud\", + \"stop\": \"spring-cloud\", \"restart\": \"spring-cloud\", \"logs\": \"spring-cloud\", + \"identity\": {\"assign\": \"spring-cloud\", \"remove\": \"spring-cloud\", + \"show\": \"spring-cloud\"}, \"log\": {\"tail\": \"spring-cloud\"}, \"deployment\": + {\"create\": \"spring-cloud\", \"list\": \"spring-cloud\", \"show\": \"spring-cloud\", + \"delete\": \"spring-cloud\"}, \"binding\": {\"list\": \"spring-cloud\", \"show\": + \"spring-cloud\", \"cosmos\": {\"add\": \"spring-cloud\", \"update\": \"spring-cloud\"}, + \"mysql\": {\"add\": \"spring-cloud\", \"update\": \"spring-cloud\"}, \"redis\": + {\"add\": \"spring-cloud\", \"update\": \"spring-cloud\"}, \"remove\": \"spring-cloud\"}, + \"custom-domain\": {\"bind\": \"spring-cloud\", \"show\": \"spring-cloud\", + \"list\": \"spring-cloud\", \"update\": \"spring-cloud\", \"unbind\": \"spring-cloud\"}}, + \"certificate\": {\"add\": \"spring-cloud\", \"show\": \"spring-cloud\", \"list\": + \"spring-cloud\", \"remove\": \"spring-cloud\"}, \"app-insights\": {\"update\": + \"spring-cloud\", \"show\": \"spring-cloud\"}}, \"ssh\": {\"vm\": \"ssh\", + \"config\": \"ssh\", \"cert\": \"ssh\"}, \"stack-hci\": {\"cluster\": {\"list\": + \"stack-hci\", \"show\": \"stack-hci\", \"create\": \"stack-hci\", \"update\": + \"stack-hci\", \"delete\": \"stack-hci\"}}, \"storage\": {\"blob\": {\"list\": + \"storage-blob-preview\", \"delete\": \"storage-blob-preview\", \"download\": + \"storage-blob-preview\", \"exists\": \"storage-blob-preview\", \"generate-sas\": + \"storage-blob-preview\", \"metadata\": {\"show\": \"storage-blob-preview\", + \"update\": \"storage-blob-preview\"}, \"set-tier\": \"storage-blob-preview\", + \"snapshot\": \"storage-blob-preview\", \"show\": \"storage-blob-preview\", + \"undelete\": \"storage-blob-preview\", \"upload\": \"storage-blob-preview\", + \"upload-batch\": \"storage-blob-preview\", \"download-batch\": \"storage-blob-preview\", + \"delete-batch\": \"storage-blob-preview\", \"copy\": {\"start-batch\": \"storage-blob-preview\"}, + \"query\": \"storage-blob-preview\", \"set-legal-hold\": \"storage-blob-preview\", + \"immutability-policy\": {\"set\": \"storage-blob-preview\", \"delete\": \"storage-blob-preview\"}, + \"filter\": \"storage-blob-preview\", \"lease\": {\"acquire\": \"storage-blob-preview\", + \"break\": \"storage-blob-preview\", \"change\": \"storage-blob-preview\", + \"renew\": \"storage-blob-preview\", \"release\": \"storage-blob-preview\"}, + \"service-properties\": {\"delete-policy\": {\"show\": \"storage-blob-preview\", + \"update\": \"storage-blob-preview\"}, \"show\": \"storage-blob-preview\", + \"update\": \"storage-blob-preview\"}, \"tag\": {\"list\": \"storage-blob-preview\", + \"set\": \"storage-blob-preview\"}, \"access\": {\"set\": \"storage-preview\", + \"update\": \"storage-preview\", \"show\": \"storage-preview\"}, \"directory\": + {\"create\": \"storage-preview\", \"delete\": \"storage-preview\", \"move\": + \"storage-preview\", \"show\": \"storage-preview\", \"list\": \"storage-preview\", + \"exists\": \"storage-preview\", \"metadata\": {\"show\": \"storage-preview\", + \"update\": \"storage-preview\"}, \"upload\": \"storage-preview\", \"download\": + \"storage-preview\", \"access\": {\"set\": \"storage-preview\", \"update\": + \"storage-preview\", \"show\": \"storage-preview\"}}}, \"container\": {\"generate-sas\": + \"storage-blob-preview\", \"list\": \"storage-blob-preview\", \"restore\": + \"storage-blob-preview\"}, \"account\": {\"blob-inventory-policy\": {\"create\": + \"storage-preview\", \"update\": \"storage-preview\", \"delete\": \"storage-preview\", + \"show\": \"storage-preview\"}, \"file-service-properties\": {\"show\": \"storage-preview\", + \"update\": \"storage-preview\"}, \"network-rule\": {\"add\": \"storage-preview\", + \"list\": \"storage-preview\", \"remove\": \"storage-preview\"}}, \"azcopy\": + {\"blob\": {\"upload\": \"storage-preview\", \"download\": \"storage-preview\", + \"delete\": \"storage-preview\", \"sync\": \"storage-preview\"}, \"run-command\": + \"storage-preview\"}, \"file\": {\"upload\": \"storage-preview\", \"upload-batch\": + \"storage-preview\"}, \"fs\": {\"service-properties\": {\"show\": \"storage-preview\", + \"update\": \"storage-preview\"}, \"list-deleted-path\": \"storage-preview\", + \"undelete-path\": \"storage-preview\"}}, \"storagesync\": {\"create\": \"storagesync\", + \"delete\": \"storagesync\", \"show\": \"storagesync\", \"list\": \"storagesync\", + \"sync-group\": {\"create\": \"storagesync\", \"delete\": \"storagesync\", + \"show\": \"storagesync\", \"list\": \"storagesync\", \"cloud-endpoint\": + {\"create\": \"storagesync\", \"delete\": \"storagesync\", \"show\": \"storagesync\", + \"list\": \"storagesync\", \"wait\": \"storagesync\"}, \"server-endpoint\": + {\"create\": \"storagesync\", \"update\": \"storagesync\", \"delete\": \"storagesync\", + \"show\": \"storagesync\", \"list\": \"storagesync\", \"wait\": \"storagesync\"}}, + \"registered-server\": {\"delete\": \"storagesync\", \"show\": \"storagesync\", + \"list\": \"storagesync\", \"wait\": \"storagesync\"}}, \"stream-analytics\": + {\"job\": {\"create\": \"stream-analytics\", \"update\": \"stream-analytics\", + \"delete\": \"stream-analytics\", \"show\": \"stream-analytics\", \"list\": + \"stream-analytics\", \"start\": \"stream-analytics\", \"stop\": \"stream-analytics\", + \"wait\": \"stream-analytics\"}, \"input\": {\"create\": \"stream-analytics\", + \"delete\": \"stream-analytics\", \"show\": \"stream-analytics\", \"list\": + \"stream-analytics\", \"test\": \"stream-analytics\"}, \"output\": {\"create\": + \"stream-analytics\", \"delete\": \"stream-analytics\", \"show\": \"stream-analytics\", + \"list\": \"stream-analytics\", \"test\": \"stream-analytics\"}, \"transformation\": + {\"create\": \"stream-analytics\", \"update\": \"stream-analytics\", \"show\": + \"stream-analytics\"}, \"function\": {\"create\": \"stream-analytics\", \"delete\": + \"stream-analytics\", \"show\": \"stream-analytics\", \"list\": \"stream-analytics\", + \"test\": \"stream-analytics\"}, \"quota\": {\"show\": \"stream-analytics\"}}, + \"support\": {\"services\": {\"list\": \"support\", \"show\": \"support\", + \"problem-classifications\": {\"list\": \"support\", \"show\": \"support\"}}, + \"tickets\": {\"list\": \"support\", \"show\": \"support\", \"create\": \"support\", + \"update\": \"support\", \"communications\": {\"list\": \"support\", \"show\": + \"support\", \"create\": \"support\"}}}, \"tsi\": {\"environment\": {\"list\": + \"timeseriesinsights\", \"show\": \"timeseriesinsights\", \"delete\": \"timeseriesinsights\", + \"wait\": \"timeseriesinsights\", \"gen1\": {\"create\": \"timeseriesinsights\", + \"update\": \"timeseriesinsights\"}, \"gen2\": {\"create\": \"timeseriesinsights\", + \"update\": \"timeseriesinsights\"}}, \"event-source\": {\"list\": \"timeseriesinsights\", + \"show\": \"timeseriesinsights\", \"delete\": \"timeseriesinsights\", \"eventhub\": + {\"create\": \"timeseriesinsights\", \"update\": \"timeseriesinsights\"}, + \"iothub\": {\"create\": \"timeseriesinsights\", \"update\": \"timeseriesinsights\"}}, + \"reference-data-set\": {\"list\": \"timeseriesinsights\", \"show\": \"timeseriesinsights\", + \"create\": \"timeseriesinsights\", \"update\": \"timeseriesinsights\", \"delete\": + \"timeseriesinsights\"}, \"access-policy\": {\"list\": \"timeseriesinsights\", + \"show\": \"timeseriesinsights\", \"create\": \"timeseriesinsights\", \"update\": + \"timeseriesinsights\", \"delete\": \"timeseriesinsights\"}}, \"vmware\": + {\"private-cloud\": {\"list\": \"vmware\", \"show\": \"vmware\", \"create\": + \"vmware\", \"update\": \"vmware\", \"delete\": \"vmware\", \"listadmincredentials\": + \"vmware\", \"addidentitysource\": \"vmware\", \"deleteidentitysource\": \"vmware\", + \"rotate-vcenter-password\": \"vmware\", \"rotate-nsxt-password\": \"vmware\"}, + \"cluster\": {\"create\": \"vmware\", \"update\": \"vmware\", \"list\": \"vmware\", + \"delete\": \"vmware\", \"show\": \"vmware\"}, \"authorization\": {\"create\": + \"vmware\", \"list\": \"vmware\", \"delete\": \"vmware\", \"show\": \"vmware\"}, + \"hcx-enterprise-site\": {\"create\": \"vmware\", \"list\": \"vmware\", \"delete\": + \"vmware\", \"show\": \"vmware\"}, \"location\": {\"checkquotaavailability\": + \"vmware\", \"checktrialavailability\": \"vmware\"}, \"datastore\": {\"list\": + \"vmware\", \"show\": \"vmware\", \"delete\": \"vmware\", \"netapp-volume\": + {\"create\": \"vmware\"}, \"disk-pool-volume\": {\"create\": \"vmware\"}}, + \"addon\": {\"list\": \"vmware\", \"vr\": {\"create\": \"vmware\", \"show\": + \"vmware\", \"update\": \"vmware\", \"delete\": \"vmware\"}, \"hcx\": {\"create\": + \"vmware\", \"show\": \"vmware\", \"update\": \"vmware\", \"delete\": \"vmware\"}, + \"srm\": {\"create\": \"vmware\", \"show\": \"vmware\", \"update\": \"vmware\", + \"delete\": \"vmware\"}}, \"global-reach-connection\": {\"create\": \"vmware\", + \"list\": \"vmware\", \"delete\": \"vmware\", \"show\": \"vmware\"}, \"cloud-link\": + {\"create\": \"vmware\", \"list\": \"vmware\", \"delete\": \"vmware\", \"show\": + \"vmware\"}, \"script-cmdlet\": {\"list\": \"vmware\", \"show\": \"vmware\"}, + \"script-package\": {\"list\": \"vmware\", \"show\": \"vmware\"}, \"script-execution\": + {\"create\": \"vmware\", \"list\": \"vmware\", \"delete\": \"vmware\", \"show\": + \"vmware\"}}, \"webpubsub\": {\"create\": \"webpubsub\", \"delete\": \"webpubsub\", + \"list\": \"webpubsub\", \"show\": \"webpubsub\", \"restart\": \"webpubsub\", + \"update\": \"webpubsub\", \"key\": {\"show\": \"webpubsub\", \"regenerate\": + \"webpubsub\"}, \"network-rule\": {\"show\": \"webpubsub\", \"update\": \"webpubsub\"}, + \"event-handler\": {\"show\": \"webpubsub\", \"update\": \"webpubsub\", \"clear\": + \"webpubsub\", \"hub\": {\"remove\": \"webpubsub\", \"update\": \"webpubsub\"}}, + \"client\": {\"start\": \"webpubsub\"}, \"service\": {\"broadcast\": \"webpubsub\", + \"connection\": {\"exist\": \"webpubsub\", \"close\": \"webpubsub\", \"send\": + \"webpubsub\"}, \"group\": {\"add-connection\": \"webpubsub\", \"remove-connection\": + \"webpubsub\", \"send\": \"webpubsub\", \"add-user\": \"webpubsub\", \"remove-user\": + \"webpubsub\"}, \"user\": {\"send\": \"webpubsub\", \"exist\": \"webpubsub\"}, + \"permission\": {\"grant\": \"webpubsub\", \"revoke\": \"webpubsub\", \"check\": + \"webpubsub\"}}}}" + headers: + content-length: + - '69379' + content-md5: + - 6wX0Fz0PerOXV85a5RH+Bw== + content-type: + - application/octet-stream + date: + - Fri, 24 Sep 2021 06:28:38 GMT + etag: + - '0x8D97F10640BAA3F' + last-modified: + - Fri, 24 Sep 2021 04:04:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-type: + - BlockBlob + x-ms-lease-status: + - unlocked + x-ms-version: + - '2009-09-19' + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_nonaad_and_update_with_managed_aad.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_nonaad_and_update_with_managed_aad.yaml new file mode 100644 index 00000000000..ef25bd4e4c5 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_nonaad_and_update_with_managed_aad.yaml @@ -0,0 +1,958 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:29:02Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:29:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-cliteste7i7f7d6t-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}}, + "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1575' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-cliteste7i7f7d6t-8db766\",\n \"fqdn\": + \"cliakstest-cliteste7i7f7d6t-8db766-f750818b.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100\n },\n \"identity\": + {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/55379cd6-8a04-45cc-aad7-f9c83afb2598?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2750' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/55379cd6-8a04-45cc-aad7-f9c83afb2598?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d69c3755-048a-cc45-aad7-f9c83afb2598\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:07.79Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/55379cd6-8a04-45cc-aad7-f9c83afb2598?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d69c3755-048a-cc45-aad7-f9c83afb2598\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:07.79Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:30:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/55379cd6-8a04-45cc-aad7-f9c83afb2598?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d69c3755-048a-cc45-aad7-f9c83afb2598\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:07.79Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:30:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/55379cd6-8a04-45cc-aad7-f9c83afb2598?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d69c3755-048a-cc45-aad7-f9c83afb2598\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:07.79Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:31:07 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/55379cd6-8a04-45cc-aad7-f9c83afb2598?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d69c3755-048a-cc45-aad7-f9c83afb2598\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:07.79Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:31:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/55379cd6-8a04-45cc-aad7-f9c83afb2598?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d69c3755-048a-cc45-aad7-f9c83afb2598\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:07.79Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/55379cd6-8a04-45cc-aad7-f9c83afb2598?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d69c3755-048a-cc45-aad7-f9c83afb2598\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:29:07.79Z\",\n \"endTime\": + \"2021-09-24T08:32:10.0408551Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '165' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type --node-count --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-cliteste7i7f7d6t-8db766\",\n \"fqdn\": + \"cliakstest-cliteste7i7f7d6t-8db766-f750818b.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/e1a10ab6-3e17-4c52-b139-e635e6c79160\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3413' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-cliteste7i7f7d6t-8db766\",\n \"fqdn\": + \"cliakstest-cliteste7i7f7d6t-8db766-f750818b.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/e1a10ab6-3e17-4c52-b139-e635e6c79160\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3413' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "1.20.9", "dnsPrefix": "cliakstest-cliteste7i7f7d6t-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": + "Managed", "maxPods": 110, "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.20.9", "enableNodePublicIP": false, + "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": + {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", "enableRBAC": + true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "Standard", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/e1a10ab6-3e17-4c52-b139-e635e6c79160"}]}}, + "aadProfile": {"managed": true, "adminGroupObjectIDs": ["00000000-0000-0000-0000-000000000001"], + "tenantID": "00000000-0000-0000-0000-000000000002"}, "identityProfile": {"kubeletidentity": + {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}}, + "location": "westus2", "sku": {"name": "Basic", "tier": "Free"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2532' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-cliteste7i7f7d6t-8db766\",\n \"fqdn\": + \"cliakstest-cliteste7i7f7d6t-8db766-f750818b.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/e1a10ab6-3e17-4c52-b139-e635e6c79160\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"tenantID\": \"00000000-0000-0000-0000-000000000002\"\n },\n + \ \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/33b749ff-827f-4754-81d8-24c82ff1f42d?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3592' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/33b749ff-827f-4754-81d8-24c82ff1f42d?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ff49b733-7f82-5447-81d8-24c82ff1f42d\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:32:43.4666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:33:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/33b749ff-827f-4754-81d8-24c82ff1f42d?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ff49b733-7f82-5447-81d8-24c82ff1f42d\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:32:43.4666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:33:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/33b749ff-827f-4754-81d8-24c82ff1f42d?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ff49b733-7f82-5447-81d8-24c82ff1f42d\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:32:43.4666666Z\",\n \"endTime\": + \"2021-09-24T08:33:50.3769329Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-aad --aad-admin-group-object-ids --aad-tenant-id + -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-cliteste7i7f7d6t-8db766\",\n \"fqdn\": + \"cliakstest-cliteste7i7f7d6t-8db766-f750818b.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/e1a10ab6-3e17-4c52-b139-e635e6c79160\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"aadProfile\": + {\n \"managed\": true,\n \"adminGroupObjectIDs\": [\n \"00000000-0000-0000-0000-000000000001\"\n + \ ],\n \"tenantID\": \"00000000-0000-0000-0000-000000000002\"\n },\n + \ \"maxAgentPools\": 100,\n \"identityProfile\": {\n \"kubeletidentity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3594' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_none_private_dns_zone.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_none_private_dns_zone.yaml new file mode 100644 index 00000000000..160a67be18f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_none_private_dns_zone.yaml @@ -0,0 +1,908 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:29:21Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:29:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestg2lntwwus-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "apiServerAccessProfile": {"enablePrivateCluster": true, "privateDNSZone": "none"}}, + "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1659' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestg2lntwwus-8db766\",\n \"privateFQDN\": + \"cliakstest-clitestg2lntwwus-8db766-f9145b30.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100,\n \"privateLinkResources\": + [\n {\n \"name\": \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\",\n + \ \"groupId\": \"management\",\n \"requiredMembers\": [\n \"management\"\n + \ ]\n }\n ],\n \"apiServerAccessProfile\": {\n \"enablePrivateCluster\": + true,\n \"privateDNSZone\": \"none\"\n }\n },\n \"identity\": {\n \"type\": + \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3093' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:30:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:30:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:31:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:31:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:33:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:33:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/d8e61fd1-19f3-4a1f-b8c0-1e216c976273?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"d11fe6d8-f319-1f4a-b8c0-1e216c976273\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:29:26.7766666Z\",\n \"endTime\": + \"2021-09-24T08:35:35.0688618Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --node-count --load-balancer-sku --enable-private-cluster + --private-dns-zone --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestg2lntwwus-8db766\",\n \"privateFQDN\": + \"cliakstest-clitestg2lntwwus-8db766-f9145b30.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 1,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/6681b2f6-9f2d-44a7-81ee-601622ddc350\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"privateLinkResources\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/privateLinkResources/management\",\n + \ \"name\": \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\",\n + \ \"groupId\": \"management\",\n \"requiredMembers\": [\n \"management\"\n + \ ]\n }\n ],\n \"apiServerAccessProfile\": {\n \"enablePrivateCluster\": + true,\n \"privateDNSZone\": \"none\"\n },\n \"identityProfile\": {\n + \ \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3957' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --yes --no-wait + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2020-11-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/eefa7074-d113-4aba-a6b7-901fce29f0ce?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 24 Sep 2021 08:36:00 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/eefa7074-d113-4aba-a6b7-901fce29f0ce?api-version=2016-03-30 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_private_cluster_public_fqdn.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_private_cluster_public_fqdn.yaml new file mode 100644 index 00000000000..ee554a06752 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_private_cluster_public_fqdn.yaml @@ -0,0 +1,1222 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:29:18Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:29:19 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestdnpepllpg-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "apiServerAccessProfile": {"enablePrivateCluster": true}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1633' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestdnpepllpg-8db766\",\n \"privateFQDN\": + \"cliakstest-clitestdnpepllpg-8db766-50c67cd6.0482ff76-53af-40f2-8317-69b57ccb398c.privatelink.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": + false,\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100,\n \"privateLinkResources\": + [\n {\n \"name\": \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\",\n + \ \"groupId\": \"management\",\n \"requiredMembers\": [\n \"management\"\n + \ ]\n }\n ],\n \"apiServerAccessProfile\": {\n \"enablePrivateCluster\": + true,\n \"privateDNSZone\": \"system\"\n }\n },\n \"identity\": {\n + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3140' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:29:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:30:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:30:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:31:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:31:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:32:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:33:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:33:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/3fccafde-a74f-4e1f-82a0-0903e7b7038f?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"deafcc3f-4fa7-1f4e-82a0-0903e7b7038f\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:29:22.9166666Z\",\n \"endTime\": + \"2021-09-24T08:36:42.1342288Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-private-cluster --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestdnpepllpg-8db766\",\n \"privateFQDN\": + \"cliakstest-clitestdnpepllpg-8db766-50c67cd6.0482ff76-53af-40f2-8317-69b57ccb398c.privatelink.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": + false,\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/469eb575-650b-4182-b539-bd01c079ba99\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"privateLinkResources\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/privateLinkResources/management\",\n + \ \"name\": \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\",\n + \ \"groupId\": \"management\",\n \"requiredMembers\": [\n \"management\"\n + \ ]\n }\n ],\n \"apiServerAccessProfile\": {\n \"enablePrivateCluster\": + true,\n \"privateDNSZone\": \"system\"\n },\n \"identityProfile\": + {\n \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4004' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:54 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-public-fqdn + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestdnpepllpg-8db766\",\n \"privateFQDN\": + \"cliakstest-clitestdnpepllpg-8db766-50c67cd6.0482ff76-53af-40f2-8317-69b57ccb398c.privatelink.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": + false,\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/469eb575-650b-4182-b539-bd01c079ba99\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"privateLinkResources\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001/privateLinkResources/management\",\n + \ \"name\": \"management\",\n \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\",\n + \ \"groupId\": \"management\",\n \"requiredMembers\": [\n \"management\"\n + \ ]\n }\n ],\n \"apiServerAccessProfile\": {\n \"enablePrivateCluster\": + true,\n \"privateDNSZone\": \"system\"\n },\n \"identityProfile\": + {\n \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4004' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "1.20.9", "dnsPrefix": "cliakstest-clitestdnpepllpg-8db766", "agentPoolProfiles": + [{"count": 1, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": + "Managed", "maxPods": 110, "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.20.9", "enableNodePublicIP": false, + "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": + {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000001_westus2", "enableRBAC": + true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": + "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": + "10.0.0.10", "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", + "loadBalancerSku": "Standard", "loadBalancerProfile": {"managedOutboundIPs": + {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/469eb575-650b-4182-b539-bd01c079ba99"}]}}, + "apiServerAccessProfile": {"enablePrivateCluster": true, "privateDNSZone": "system"}, + "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}}, + "location": "westus2", "sku": {"name": "Basic", "tier": "Free"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2468' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --disable-public-fqdn + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000001\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestdnpepllpg-8db766\",\n \"privateFQDN\": + \"cliakstest-clitestdnpepllpg-8db766-50c67cd6.0482ff76-53af-40f2-8317-69b57ccb398c.privatelink.westus2.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": + false,\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000001_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.Network/publicIPAddresses/469eb575-650b-4182-b539-bd01c079ba99\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"privateLinkResources\": [\n {\n \"name\": \"management\",\n + \ \"type\": \"Microsoft.ContainerService/managedClusters/privateLinkResources\",\n + \ \"groupId\": \"management\",\n \"requiredMembers\": [\n \"management\"\n + \ ],\n \"privateLinkServiceID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hcp-underlay-westus2-cx-78/providers/Microsoft.Network/privateLinkServices/a60bc5aa9e27c47d094f1c3d267bf49e\"\n + \ }\n ],\n \"apiServerAccessProfile\": {\n \"enablePrivateCluster\": + true,\n \"privateDNSZone\": \"system\"\n },\n \"identityProfile\": + {\n \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000001_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000001-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8e35878c-c4e4-4f4e-8445-ec676771422e?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '4008' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-public-fqdn + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8e35878c-c4e4-4f4e-8445-ec676771422e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8c87358e-e4c4-4e4f-8445-ec676771422e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:36:58.2733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-public-fqdn + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8e35878c-c4e4-4f4e-8445-ec676771422e?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8c87358e-e4c4-4e4f-8445-ec676771422e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:36:58.2733333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_using_azurecni_with_pod_identity_enabled.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_using_azurecni_with_pod_identity_enabled.yaml new file mode 100644 index 00000000000..27960b745bf --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_using_azurecni_with_pod_identity_enabled.yaml @@ -0,0 +1,108 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-pod-identity + --network-plugin --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T07:55:45Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 07:55:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestc2trtn3ao-8db766", "agentPoolProfiles": + [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "podIdentityProfile": {"enabled": + true}, "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": + {"networkPlugin": "azure", "outboundType": "loadBalancer", "loadBalancerSku": + "standard"}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1490' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-pod-identity + --network-plugin --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"code\": \"PodIdentityAddonFeatureFlagNotEnabled\",\n \"message\": + \"PodIdentity addon is not allowed since feature 'Microsoft.ContainerService/EnablePodIdentityPreview' + is not enabled. Please see https://aka.ms/aks/previews for how to enable features.\"\n + }" + headers: + cache-control: + - no-cache + content-length: + - '254' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 07:55:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_auto_upgrade_channel.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_auto_upgrade_channel.yaml new file mode 100644 index 00000000000..b21edb7a502 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_auto_upgrade_channel.yaml @@ -0,0 +1,108 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --auto-upgrade-channel + --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T06:56:39Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 06:56:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestbwmpdk6vp-8db766", "agentPoolProfiles": + [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "autoUpgradeProfile": {"upgradeChannel": "rapid"}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1626' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --auto-upgrade-channel + --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"code\": \"BadRequest\",\n \"message\": \"Feature Microsoft.ContainerService/AutoUpgradePreview + is not enabled. Please see https://aka.ms/aks/previews for how to enable features.\"\n + }" + headers: + cache-control: + - no-cache + content-length: + - '180' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 06:56:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 400 + message: Bad Request +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_confcom_addon.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_confcom_addon.yaml new file mode 100644 index 00000000000..6e231492f62 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_confcom_addon.yaml @@ -0,0 +1,553 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:34:16Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:34:17 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestw3olmd6o2-8db766", "agentPoolProfiles": + [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {"ACCSGXDevicePlugin": {"enabled": + true, "config": {"ACCSGXQuoteHelperEnabled": "false"}}}, "enableRBAC": true, + "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": + "standard"}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1663' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestw3olmd6o2-8db766\",\n \"fqdn\": + \"cliakstest-clitestw3olmd6o2-8db766-59887fa4.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ACCSGXDevicePlugin\": {\n \"enabled\": true,\n \"config\": + {\n \"ACCSGXQuoteHelperEnabled\": \"false\"\n }\n }\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100\n },\n \"identity\": + {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a000498f-4e1d-416b-971f-10ca77d79f86?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2900' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a000498f-4e1d-416b-971f-10ca77d79f86?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8f4900a0-1d4e-6b41-971f-10ca77d79f86\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:34:20.6866666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:34:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a000498f-4e1d-416b-971f-10ca77d79f86?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8f4900a0-1d4e-6b41-971f-10ca77d79f86\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:34:20.6866666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a000498f-4e1d-416b-971f-10ca77d79f86?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8f4900a0-1d4e-6b41-971f-10ca77d79f86\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:34:20.6866666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:35:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a000498f-4e1d-416b-971f-10ca77d79f86?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8f4900a0-1d4e-6b41-971f-10ca77d79f86\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:34:20.6866666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a000498f-4e1d-416b-971f-10ca77d79f86?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8f4900a0-1d4e-6b41-971f-10ca77d79f86\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:34:20.6866666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a000498f-4e1d-416b-971f-10ca77d79f86?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8f4900a0-1d4e-6b41-971f-10ca77d79f86\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:34:20.6866666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a000498f-4e1d-416b-971f-10ca77d79f86?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"8f4900a0-1d4e-6b41-971f-10ca77d79f86\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-24T08:34:20.6866666Z\",\n \"endTime\": + \"2021-09-24T08:37:26.0591372Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestw3olmd6o2-8db766\",\n \"fqdn\": + \"cliakstest-clitestw3olmd6o2-8db766-59887fa4.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ACCSGXDevicePlugin\": {\n \"enabled\": true,\n \"config\": + {\n \"ACCSGXQuoteHelperEnabled\": \"false\"\n },\n \"identity\": + {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/accsgxdeviceplugin-cliakstest000002\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\": + {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n + \ \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": + 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/50a658c1-876c-4ca3-b11b-924a7e802d2c\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3936' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_confcom_addon_helper_enabled.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_confcom_addon_helper_enabled.yaml new file mode 100644 index 00000000000..734798b5dc7 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_confcom_addon_helper_enabled.yaml @@ -0,0 +1,284 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --enable-sgxquotehelper + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:36:02Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:36:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": + "", "dnsPrefix": "cliakstest-clitestxcswxsnwm-8db766", "agentPoolProfiles": + [{"count": 3, "vmSize": "Standard_DS2_v2", "osType": "Linux", "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "name": "nodepool1"}], + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {"ACCSGXDevicePlugin": {"enabled": + true, "config": {"ACCSGXQuoteHelperEnabled": "true"}}}, "enableRBAC": true, + "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", + "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": + "standard"}}, "location": "westus2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1662' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --enable-sgxquotehelper + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2020-11-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitestxcswxsnwm-8db766\",\n \"fqdn\": + \"cliakstest-clitestxcswxsnwm-8db766-73395fbb.hcp.westus2.azmk8s.io\",\n \"agentPoolProfiles\": + [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": + \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n + \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n + \ \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": false,\n + \ \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.06\"\n }\n ],\n \"linuxProfile\": + {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"addonProfiles\": + {\n \"ACCSGXDevicePlugin\": {\n \"enabled\": true,\n \"config\": + {\n \"ACCSGXQuoteHelperEnabled\": \"true\"\n }\n }\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100\n },\n \"identity\": + {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/b8dfb061-ac93-4e21-aca3-cc1706a13dd9?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '2899' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --enable-sgxquotehelper + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/b8dfb061-ac93-4e21-aca3-cc1706a13dd9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"61b0dfb8-93ac-214e-aca3-cc1706a13dd9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:36:08.1233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:36:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --enable-sgxquotehelper + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/b8dfb061-ac93-4e21-aca3-cc1706a13dd9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"61b0dfb8-93ac-214e-aca3-cc1706a13dd9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:36:08.1233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-managed-identity -a --enable-sgxquotehelper + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.7.4 + (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/b8dfb061-ac93-4e21-aca3-cc1706a13dd9?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"61b0dfb8-93ac-214e-aca3-cc1706a13dd9\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-24T08:36:08.1233333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:38 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_http_proxy_config.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_http_proxy_config.yaml new file mode 100644 index 00000000000..1374c33819a --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_http_proxy_config.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --http-proxy-config --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:37:54Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:37:54 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_managed_disk.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_managed_disk.yaml new file mode 100644 index 00000000000..523bccea3c9 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_managed_disk.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --vm-set-type -c --node-osdisk-type --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T06:33:01Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 06:33:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_monitoring_aad_auth_msi.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_monitoring_aad_auth_msi.yaml new file mode 100644 index 00000000000..4870ecf35f2 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_monitoring_aad_auth_msi.yaml @@ -0,0 +1,631 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-addons + --enable-msi-auth-for-monitoring --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:37:56Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:37:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-addons + --enable-msi-auth-for-monitoring --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T08:37:56Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:37:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-addons + --enable-msi-auth-for-monitoring --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: HEAD + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/DefaultResourceGroup-WUS2?api-version=2019-10-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Fri, 24 Sep 2021 08:37:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-addons + --enable-msi-auth-for-monitoring --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/DefaultResourceGroup-WUS2/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-8db766eb-2889-473d-8fda-6a754f5887d1-WUS2?api-version=2015-11-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": + \"605559c8-659c-4f57-b11d-287f0cc01430\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\": + \"Fri, 24 Sep 2021 08:19:09 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n + \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n + \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n + \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": + \"Fri, 24 Sep 2021 13:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n + \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": + \"Enabled\",\r\n \"createdDate\": \"Fri, 24 Sep 2021 08:19:09 GMT\",\r\n + \ \"modifiedDate\": \"Fri, 24 Sep 2021 08:19:10 GMT\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-wus2/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8db766eb-2889-473d-8fda-6a754f5887d1-wus2\",\r\n + \ \"name\": \"DefaultWorkspace-8db766eb-2889-473d-8fda-6a754f5887d1-WUS2\",\r\n + \ \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \"location\": + \"westus2\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1161' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:57 GMT + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-addons + --enable-msi-auth-for-monitoring --node-count --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-wus2/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8db766eb-2889-473d-8fda-6a754f5887d1-wus2?api-version=2015-11-01-preview + response: + body: + string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": + \"605559c8-659c-4f57-b11d-287f0cc01430\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\": + \"Fri, 24 Sep 2021 08:19:09 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n + \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n + \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n + \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\": + \"Fri, 24 Sep 2021 13:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n + \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\": + \"Enabled\",\r\n \"createdDate\": \"Fri, 24 Sep 2021 08:19:09 GMT\",\r\n + \ \"modifiedDate\": \"Fri, 24 Sep 2021 08:19:10 GMT\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-wus2/providers/microsoft.operationalinsights/workspaces/defaultworkspace-8db766eb-2889-473d-8fda-6a754f5887d1-wus2\",\r\n + \ \"name\": \"DefaultWorkspace-8db766eb-2889-473d-8fda-6a754f5887d1-WUS2\",\r\n + \ \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n \"location\": + \"westus2\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1161' + content-type: + - application/json + date: + - Fri, 24 Sep 2021 08:37:58 GMT + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-addons + --enable-msi-auth-for-monitoring --node-count --ssh-key-value + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) AZURECLI/2.28.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-11-01 + response: + body: + string: "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\",\"name\":\"eastus\",\"displayName\":\"East + US\",\"regionalDisplayName\":\"(US) East US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-79.8164\",\"latitude\":\"37.3719\",\"physicalLocation\":\"Virginia\",\"pairedRegion\":[{\"name\":\"westus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2\",\"name\":\"eastus2\",\"displayName\":\"East + US 2\",\"regionalDisplayName\":\"(US) East US 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-78.3889\",\"latitude\":\"36.6681\",\"physicalLocation\":\"Virginia\",\"pairedRegion\":[{\"name\":\"centralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\",\"name\":\"southcentralus\",\"displayName\":\"South + Central US\",\"regionalDisplayName\":\"(US) South Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-98.5\",\"latitude\":\"29.4167\",\"physicalLocation\":\"Texas\",\"pairedRegion\":[{\"name\":\"northcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2\",\"name\":\"westus2\",\"displayName\":\"West + US 2\",\"regionalDisplayName\":\"(US) West US 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-119.852\",\"latitude\":\"47.233\",\"physicalLocation\":\"Washington\",\"pairedRegion\":[{\"name\":\"westcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus3\",\"name\":\"westus3\",\"displayName\":\"West + US 3\",\"regionalDisplayName\":\"(US) West US 3\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-112.074036\",\"latitude\":\"33.448376\",\"physicalLocation\":\"Phoenix\",\"pairedRegion\":[{\"name\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast\",\"name\":\"australiaeast\",\"displayName\":\"Australia + East\",\"regionalDisplayName\":\"(Asia Pacific) Australia East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"151.2094\",\"latitude\":\"-33.86\",\"physicalLocation\":\"New + South Wales\",\"pairedRegion\":[{\"name\":\"australiasoutheast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia\",\"name\":\"southeastasia\",\"displayName\":\"Southeast + Asia\",\"regionalDisplayName\":\"(Asia Pacific) Southeast Asia\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"103.833\",\"latitude\":\"1.283\",\"physicalLocation\":\"Singapore\",\"pairedRegion\":[{\"name\":\"eastasia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope\",\"name\":\"northeurope\",\"displayName\":\"North + Europe\",\"regionalDisplayName\":\"(Europe) North Europe\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"-6.2597\",\"latitude\":\"53.3478\",\"physicalLocation\":\"Ireland\",\"pairedRegion\":[{\"name\":\"westeurope\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedencentral\",\"name\":\"swedencentral\",\"displayName\":\"Sweden + Central\",\"regionalDisplayName\":\"(Europe) Sweden Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"17.14127\",\"latitude\":\"60.67488\",\"physicalLocation\":\"G\xE4vle\",\"pairedRegion\":[{\"name\":\"swedensouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/swedensouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth\",\"name\":\"uksouth\",\"displayName\":\"UK + South\",\"regionalDisplayName\":\"(Europe) UK South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"-0.799\",\"latitude\":\"50.941\",\"physicalLocation\":\"London\",\"pairedRegion\":[{\"name\":\"ukwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope\",\"name\":\"westeurope\",\"displayName\":\"West + Europe\",\"regionalDisplayName\":\"(Europe) West Europe\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"4.9\",\"latitude\":\"52.3667\",\"physicalLocation\":\"Netherlands\",\"pairedRegion\":[{\"name\":\"northeurope\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus\",\"name\":\"centralus\",\"displayName\":\"Central + US\",\"regionalDisplayName\":\"(US) Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-93.6208\",\"latitude\":\"41.5908\",\"physicalLocation\":\"Iowa\",\"pairedRegion\":[{\"name\":\"eastus2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus\",\"name\":\"northcentralus\",\"displayName\":\"North + Central US\",\"regionalDisplayName\":\"(US) North Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-87.6278\",\"latitude\":\"41.8819\",\"physicalLocation\":\"Illinois\",\"pairedRegion\":[{\"name\":\"southcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus\",\"name\":\"westus\",\"displayName\":\"West + US\",\"regionalDisplayName\":\"(US) West US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"US\",\"longitude\":\"-122.417\",\"latitude\":\"37.783\",\"physicalLocation\":\"California\",\"pairedRegion\":[{\"name\":\"eastus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricanorth\",\"name\":\"southafricanorth\",\"displayName\":\"South + Africa North\",\"regionalDisplayName\":\"(Africa) South Africa North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Africa\",\"longitude\":\"28.218370\",\"latitude\":\"-25.731340\",\"physicalLocation\":\"Johannesburg\",\"pairedRegion\":[{\"name\":\"southafricawest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricawest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia\",\"name\":\"centralindia\",\"displayName\":\"Central + India\",\"regionalDisplayName\":\"(Asia Pacific) Central India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"73.9197\",\"latitude\":\"18.5822\",\"physicalLocation\":\"Pune\",\"pairedRegion\":[{\"name\":\"southindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia\",\"name\":\"eastasia\",\"displayName\":\"East + Asia\",\"regionalDisplayName\":\"(Asia Pacific) East Asia\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"114.188\",\"latitude\":\"22.267\",\"physicalLocation\":\"Hong + Kong\",\"pairedRegion\":[{\"name\":\"southeastasia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast\",\"name\":\"japaneast\",\"displayName\":\"Japan + East\",\"regionalDisplayName\":\"(Asia Pacific) Japan East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"139.77\",\"latitude\":\"35.68\",\"physicalLocation\":\"Tokyo, + Saitama\",\"pairedRegion\":[{\"name\":\"japanwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiawest\",\"name\":\"jioindiawest\",\"displayName\":\"Jio + India West\",\"regionalDisplayName\":\"(Asia Pacific) Jio India West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"70.05773\",\"latitude\":\"22.470701\",\"physicalLocation\":\"Jamnagar\",\"pairedRegion\":[{\"name\":\"jioindiacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral\",\"name\":\"koreacentral\",\"displayName\":\"Korea + Central\",\"regionalDisplayName\":\"(Asia Pacific) Korea Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"126.9780\",\"latitude\":\"37.5665\",\"physicalLocation\":\"Seoul\",\"pairedRegion\":[{\"name\":\"koreasouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral\",\"name\":\"canadacentral\",\"displayName\":\"Canada + Central\",\"regionalDisplayName\":\"(Canada) Canada Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Canada\",\"longitude\":\"-79.383\",\"latitude\":\"43.653\",\"physicalLocation\":\"Toronto\",\"pairedRegion\":[{\"name\":\"canadaeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francecentral\",\"name\":\"francecentral\",\"displayName\":\"France + Central\",\"regionalDisplayName\":\"(Europe) France Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"2.3730\",\"latitude\":\"46.3772\",\"physicalLocation\":\"Paris\",\"pairedRegion\":[{\"name\":\"francesouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francesouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanywestcentral\",\"name\":\"germanywestcentral\",\"displayName\":\"Germany + West Central\",\"regionalDisplayName\":\"(Europe) Germany West Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.682127\",\"latitude\":\"50.110924\",\"physicalLocation\":\"Frankfurt\",\"pairedRegion\":[{\"name\":\"germanynorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanynorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwayeast\",\"name\":\"norwayeast\",\"displayName\":\"Norway + East\",\"regionalDisplayName\":\"(Europe) Norway East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"10.752245\",\"latitude\":\"59.913868\",\"physicalLocation\":\"Norway\",\"pairedRegion\":[{\"name\":\"norwaywest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwaywest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandnorth\",\"name\":\"switzerlandnorth\",\"displayName\":\"Switzerland + North\",\"regionalDisplayName\":\"(Europe) Switzerland North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.564572\",\"latitude\":\"47.451542\",\"physicalLocation\":\"Zurich\",\"pairedRegion\":[{\"name\":\"switzerlandwest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandwest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaenorth\",\"name\":\"uaenorth\",\"displayName\":\"UAE + North\",\"regionalDisplayName\":\"(Middle East) UAE North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"Middle + East\",\"longitude\":\"55.316666\",\"latitude\":\"25.266666\",\"physicalLocation\":\"Dubai\",\"pairedRegion\":[{\"name\":\"uaecentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaecentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth\",\"name\":\"brazilsouth\",\"displayName\":\"Brazil + South\",\"regionalDisplayName\":\"(South America) Brazil South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Recommended\",\"geographyGroup\":\"South + America\",\"longitude\":\"-46.633\",\"latitude\":\"-23.55\",\"physicalLocation\":\"Sao + Paulo State\",\"pairedRegion\":[{\"name\":\"southcentralus\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralusstage\",\"name\":\"centralusstage\",\"displayName\":\"Central + US (Stage)\",\"regionalDisplayName\":\"(US) Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastusstage\",\"name\":\"eastusstage\",\"displayName\":\"East + US (Stage)\",\"regionalDisplayName\":\"(US) East US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2stage\",\"name\":\"eastus2stage\",\"displayName\":\"East + US 2 (Stage)\",\"regionalDisplayName\":\"(US) East US 2 (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralusstage\",\"name\":\"northcentralusstage\",\"displayName\":\"North + Central US (Stage)\",\"regionalDisplayName\":\"(US) North Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralusstage\",\"name\":\"southcentralusstage\",\"displayName\":\"South + Central US (Stage)\",\"regionalDisplayName\":\"(US) South Central US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westusstage\",\"name\":\"westusstage\",\"displayName\":\"West + US (Stage)\",\"regionalDisplayName\":\"(US) West US (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2stage\",\"name\":\"westus2stage\",\"displayName\":\"West + US 2 (Stage)\",\"regionalDisplayName\":\"(US) West US 2 (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/asia\",\"name\":\"asia\",\"displayName\":\"Asia\",\"regionalDisplayName\":\"Asia\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/asiapacific\",\"name\":\"asiapacific\",\"displayName\":\"Asia + Pacific\",\"regionalDisplayName\":\"Asia Pacific\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australia\",\"name\":\"australia\",\"displayName\":\"Australia\",\"regionalDisplayName\":\"Australia\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazil\",\"name\":\"brazil\",\"displayName\":\"Brazil\",\"regionalDisplayName\":\"Brazil\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canada\",\"name\":\"canada\",\"displayName\":\"Canada\",\"regionalDisplayName\":\"Canada\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/europe\",\"name\":\"europe\",\"displayName\":\"Europe\",\"regionalDisplayName\":\"Europe\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/france\",\"name\":\"france\",\"displayName\":\"France\",\"regionalDisplayName\":\"France\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germany\",\"name\":\"germany\",\"displayName\":\"Germany\",\"regionalDisplayName\":\"Germany\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/global\",\"name\":\"global\",\"displayName\":\"Global\",\"regionalDisplayName\":\"Global\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/india\",\"name\":\"india\",\"displayName\":\"India\",\"regionalDisplayName\":\"India\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japan\",\"name\":\"japan\",\"displayName\":\"Japan\",\"regionalDisplayName\":\"Japan\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/korea\",\"name\":\"korea\",\"displayName\":\"Korea\",\"regionalDisplayName\":\"Korea\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norway\",\"name\":\"norway\",\"displayName\":\"Norway\",\"regionalDisplayName\":\"Norway\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafrica\",\"name\":\"southafrica\",\"displayName\":\"South + Africa\",\"regionalDisplayName\":\"South Africa\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerland\",\"name\":\"switzerland\",\"displayName\":\"Switzerland\",\"regionalDisplayName\":\"Switzerland\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uae\",\"name\":\"uae\",\"displayName\":\"United + Arab Emirates\",\"regionalDisplayName\":\"United Arab Emirates\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uk\",\"name\":\"uk\",\"displayName\":\"United + Kingdom\",\"regionalDisplayName\":\"United Kingdom\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/unitedstates\",\"name\":\"unitedstates\",\"displayName\":\"United + States\",\"regionalDisplayName\":\"United States\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasiastage\",\"name\":\"eastasiastage\",\"displayName\":\"East + Asia (Stage)\",\"regionalDisplayName\":\"(Asia Pacific) East Asia (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasiastage\",\"name\":\"southeastasiastage\",\"displayName\":\"Southeast + Asia (Stage)\",\"regionalDisplayName\":\"(Asia Pacific) Southeast Asia (Stage)\",\"metadata\":{\"regionType\":\"Logical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centraluseuap\",\"name\":\"centraluseuap\",\"displayName\":\"Central + US EUAP\",\"regionalDisplayName\":\"(US) Central US EUAP\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-93.6208\",\"latitude\":\"41.5908\",\"pairedRegion\":[{\"name\":\"eastus2euap\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2euap\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2euap\",\"name\":\"eastus2euap\",\"displayName\":\"East + US 2 EUAP\",\"regionalDisplayName\":\"(US) East US 2 EUAP\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-78.3889\",\"latitude\":\"36.6681\",\"pairedRegion\":[{\"name\":\"centraluseuap\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centraluseuap\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus\",\"name\":\"westcentralus\",\"displayName\":\"West + Central US\",\"regionalDisplayName\":\"(US) West Central US\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"US\",\"longitude\":\"-110.234\",\"latitude\":\"40.890\",\"physicalLocation\":\"Wyoming\",\"pairedRegion\":[{\"name\":\"westus2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricawest\",\"name\":\"southafricawest\",\"displayName\":\"South + Africa West\",\"regionalDisplayName\":\"(Africa) South Africa West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Africa\",\"longitude\":\"18.843266\",\"latitude\":\"-34.075691\",\"physicalLocation\":\"Cape + Town\",\"pairedRegion\":[{\"name\":\"southafricanorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricanorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral\",\"name\":\"australiacentral\",\"displayName\":\"Australia + Central\",\"regionalDisplayName\":\"(Asia Pacific) Australia Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"149.1244\",\"latitude\":\"-35.3075\",\"physicalLocation\":\"Canberra\",\"pairedRegion\":[{\"name\":\"australiacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral2\",\"name\":\"australiacentral2\",\"displayName\":\"Australia + Central 2\",\"regionalDisplayName\":\"(Asia Pacific) Australia Central 2\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"149.1244\",\"latitude\":\"-35.3075\",\"physicalLocation\":\"Canberra\",\"pairedRegion\":[{\"name\":\"australiacentral2\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral2\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast\",\"name\":\"australiasoutheast\",\"displayName\":\"Australia + Southeast\",\"regionalDisplayName\":\"(Asia Pacific) Australia Southeast\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"144.9631\",\"latitude\":\"-37.8136\",\"physicalLocation\":\"Victoria\",\"pairedRegion\":[{\"name\":\"australiaeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest\",\"name\":\"japanwest\",\"displayName\":\"Japan + West\",\"regionalDisplayName\":\"(Asia Pacific) Japan West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"135.5022\",\"latitude\":\"34.6939\",\"physicalLocation\":\"Osaka\",\"pairedRegion\":[{\"name\":\"japaneast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiacentral\",\"name\":\"jioindiacentral\",\"displayName\":\"Jio + India Central\",\"regionalDisplayName\":\"(Asia Pacific) Jio India Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"79.08886\",\"latitude\":\"21.146633\",\"physicalLocation\":\"Nagpur\",\"pairedRegion\":[{\"name\":\"jioindiawest\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/jioindiawest\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth\",\"name\":\"koreasouth\",\"displayName\":\"Korea + South\",\"regionalDisplayName\":\"(Asia Pacific) Korea South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"129.0756\",\"latitude\":\"35.1796\",\"physicalLocation\":\"Busan\",\"pairedRegion\":[{\"name\":\"koreacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\",\"name\":\"southindia\",\"displayName\":\"South + India\",\"regionalDisplayName\":\"(Asia Pacific) South India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"80.1636\",\"latitude\":\"12.9822\",\"physicalLocation\":\"Chennai\",\"pairedRegion\":[{\"name\":\"centralindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westindia\",\"name\":\"westindia\",\"displayName\":\"West + India\",\"regionalDisplayName\":\"(Asia Pacific) West India\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Asia + Pacific\",\"longitude\":\"72.868\",\"latitude\":\"19.088\",\"physicalLocation\":\"Mumbai\",\"pairedRegion\":[{\"name\":\"southindia\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast\",\"name\":\"canadaeast\",\"displayName\":\"Canada + East\",\"regionalDisplayName\":\"(Canada) Canada East\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Canada\",\"longitude\":\"-71.217\",\"latitude\":\"46.817\",\"physicalLocation\":\"Quebec\",\"pairedRegion\":[{\"name\":\"canadacentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francesouth\",\"name\":\"francesouth\",\"displayName\":\"France + South\",\"regionalDisplayName\":\"(Europe) France South\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"2.1972\",\"latitude\":\"43.8345\",\"physicalLocation\":\"Marseille\",\"pairedRegion\":[{\"name\":\"francecentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francecentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanynorth\",\"name\":\"germanynorth\",\"displayName\":\"Germany + North\",\"regionalDisplayName\":\"(Europe) Germany North\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"8.806422\",\"latitude\":\"53.073635\",\"physicalLocation\":\"Berlin\",\"pairedRegion\":[{\"name\":\"germanywestcentral\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanywestcentral\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwaywest\",\"name\":\"norwaywest\",\"displayName\":\"Norway + West\",\"regionalDisplayName\":\"(Europe) Norway West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"5.733107\",\"latitude\":\"58.969975\",\"physicalLocation\":\"Norway\",\"pairedRegion\":[{\"name\":\"norwayeast\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwayeast\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandwest\",\"name\":\"switzerlandwest\",\"displayName\":\"Switzerland + West\",\"regionalDisplayName\":\"(Europe) Switzerland West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"6.143158\",\"latitude\":\"46.204391\",\"physicalLocation\":\"Geneva\",\"pairedRegion\":[{\"name\":\"switzerlandnorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandnorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest\",\"name\":\"ukwest\",\"displayName\":\"UK + West\",\"regionalDisplayName\":\"(Europe) UK West\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Europe\",\"longitude\":\"-3.084\",\"latitude\":\"53.427\",\"physicalLocation\":\"Cardiff\",\"pairedRegion\":[{\"name\":\"uksouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaecentral\",\"name\":\"uaecentral\",\"displayName\":\"UAE + Central\",\"regionalDisplayName\":\"(Middle East) UAE Central\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"Middle + East\",\"longitude\":\"54.366669\",\"latitude\":\"24.466667\",\"physicalLocation\":\"Abu + Dhabi\",\"pairedRegion\":[{\"name\":\"uaenorth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaenorth\"}]}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsoutheast\",\"name\":\"brazilsoutheast\",\"displayName\":\"Brazil + Southeast\",\"regionalDisplayName\":\"(South America) Brazil Southeast\",\"metadata\":{\"regionType\":\"Physical\",\"regionCategory\":\"Other\",\"geographyGroup\":\"South + America\",\"longitude\":\"-43.2075\",\"latitude\":\"-22.90278\",\"physicalLocation\":\"Rio\",\"pairedRegion\":[{\"name\":\"brazilsouth\",\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth\"}]}}]}" + headers: + cache-control: + - no-cache + content-length: + - '28530' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:37:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --enable-managed-identity --enable-addons + --enable-msi-auth-for-monitoring --node-count --ssh-key-value + User-Agent: + - python/3.7.4 (Windows-10-10.0.19041-SP0) AZURECLI/2.28.1 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Insights?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights","namespace":"microsoft.insights","authorizations":[{"applicationId":"6bccf540-eb86-4037-af03-7fa058c2db75","roleDefinitionId":"89dcede2-9219-403a-9723-d3c6473f9472"},{"applicationId":"11c174dc-1945-4a9a-a36b-c79a0f246b9b","roleDefinitionId":"dd9d4347-f397-45f2-b538-85f21c90037b"},{"applicationId":"035f9e1d-4f00-4419-bf50-bf2d87eb4878","roleDefinitionId":"323795fe-ba3d-4f5a-ad42-afb4e1ea9485"},{"applicationId":"f5c26e74-f226-4ae8-85f0-b4af0080ac9e","roleDefinitionId":"529d7ae6-e892-4d43-809d-8547aeb90643"},{"applicationId":"b503eb83-1222-4dcc-b116-b98ed5216e05","roleDefinitionId":"68699c37-c689-44d4-9248-494b782d46ae"},{"applicationId":"ca7f3f0b-7d91-482c-8e09-c5d840d0eac5","roleDefinitionId":"5d5a2e56-9835-44aa-93db-d2f19e155438"},{"applicationId":"3af5a1e8-2459-45cb-8683-bcd6cccbcc13","roleDefinitionId":"b1309299-720d-4159-9897-6158a61aee41"},{"applicationId":"6a0a243c-0886-468a-a4c2-eff52c7445da","roleDefinitionId":"d2eda64b-c5e6-4930-8642-2d80ecd7c2e2"},{"applicationId":"707be275-6b9d-4ee7-88f9-c0c2bd646e0f","roleDefinitionId":"fa027d90-6ba0-4c33-9a54-59edaf2327e7"},{"applicationId":"461e8683-5575-4561-ac7f-899cc907d62a","roleDefinitionId":"68699c37-c689-44d4-9248-494b782d46ae"},{"applicationId":"562db366-1b96-45d2-aa4a-f2148cef2240","roleDefinitionId":"4109c8be-c1c8-4be0-af52-9d3c76c140ab"},{"applicationId":"e933bd07-d2ee-4f1d-933c-3752b819567b","roleDefinitionId":"abbcfd44-e662-419a-9b5a-478f8e2f57c9"},{"applicationId":"f6b60513-f290-450e-a2f3-9930de61c5e7","roleDefinitionId":"4ef11659-08ac-48af-98a7-25fb6b1e1bc4"},{"applicationId":"12743ff8-d3de-49d0-a4ce-6c91a4245ea0","roleDefinitionId":"207b20a7-6802-4ae4-aaa2-1a36dd45bba0"},{"applicationId":"58ef1dbd-684c-47d6-8ffc-61ea7a197b95","roleDefinitionId":"dd9d4347-f397-45f2-b538-85f21c90037b"}],"resourceTypes":[{"resourceType":"components","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Canada Central","Central India","Japan East","Australia + East","Korea Central","France Central","Central US","East US 2","East Asia","West + US","South Africa North","North Central US","Brazil South","Switzerland North","Norway + East","Norway West","Australia Southeast","Australia Central 2","Germany West + Central","Switzerland West","UAE Central","UK West","Japan West","Brazil Southeast","UAE + North","Australia Central","France South","South India","West US 3","Korea + South","Canada East","Jio India West"],"apiVersions":["2020-02-02-preview","2020-02-02","2018-05-01-preview","2015-05-01","2014-12-01-preview","2014-08-01","2014-04-01"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"components/query","locations":[],"apiVersions":["2018-04-20"],"capabilities":"None"},{"resourceType":"components/metadata","locations":[],"apiVersions":["2018-04-20"],"capabilities":"None"},{"resourceType":"components/metrics","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Central India","Canada Central","Japan East","Australia + East","Korea Central","France Central","East US 2","East Asia","West US","Central + US","South Africa North","North Central US","Brazil South","Switzerland North","Australia + Southeast","Norway East","Norway West"],"apiVersions":["2018-04-20","2014-04-01"],"capabilities":"None"},{"resourceType":"components/events","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Central India","Canada Central","Japan East","Australia + East","Korea Central","France Central","East US 2","East Asia","West US","Central + US","South Africa North","North Central US"],"apiVersions":["2018-04-20"],"capabilities":"None"},{"resourceType":"webtests","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Central India","Canada Central","Japan East","Australia + East","Korea Central","France Central","Central US","East US 2","East Asia","West + US","South Africa North","North Central US","Brazil South","Switzerland North","Norway + East","Norway West","Australia Southeast","Australia Central 2","Germany West + Central","Switzerland West","UAE Central","UK West","Brazil Southeast","Japan + West","UAE North","Australia Central","France South","South India","West US + 3","Korea South","Canada East","Jio India West"],"apiVersions":["2018-05-01-preview","2015-05-01","2014-08-01","2014-04-01"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"webtests/getTestResultFile","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Central India","Canada Central","Japan East","Australia + East","Korea Central","France Central","East US 2","East Asia","West US","Central + US","South Africa North","North Central US"],"apiVersions":["2020-02-10-preview"],"capabilities":"None"},{"resourceType":"scheduledqueryrules","locations":["West + Central US","Australia East","Central US","East US","East US 2","France Central","Japan + East","North Europe","South Africa North","Southeast Asia","UK South","West + Europe","West US 2","Central India","Canada Central","Australia Southeast","South + Central US","Australia Central","Korea Central","East Asia","West US","North + Central US","Brazil South","UK West","Switzerland North","Switzerland West","UAE + Central","Germany West Central","Australia Central 2","Brazil SouthEast","Norway + East","UAE North","Japan West","South India","France South","Norway West"],"apiVersions":["2021-02-01-preview","2020-05-01-preview","2018-04-16","2017-09-01-preview"],"defaultApiVersion":"2018-04-16","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"components/pricingPlans","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2"],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"migrateToNewPricingModel","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2"],"apiVersions":["2017-10-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"rollbackToLegacyPricingModel","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2"],"apiVersions":["2017-10-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"listMigrationdate","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2"],"apiVersions":["2017-10-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"logprofiles","locations":[],"apiVersions":["2016-03-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2016-03-01"}],"capabilities":"None"},{"resourceType":"migratealertrules","locations":[],"apiVersions":["2018-03-01"],"capabilities":"None"},{"resourceType":"metricalerts","locations":["Global"],"apiVersions":["2018-03-01","2017-09-01-preview"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"alertrules","locations":["West US","East + US","North Europe","West Europe","East Asia","Southeast Asia","Japan East","Japan + West","North Central US","South Central US","East US 2","Central US","Australia + East","Australia Southeast","Brazil South","UK South","UK West","South India","Central + India","West India","Canada East","Canada Central","West Central US","West + US 2","Korea South","Korea Central","Australia Central","Australia Central + 2","France Central","South Africa North","UAE North"],"apiVersions":["2016-03-01","2015-04-01","2014-04-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2016-03-01"}],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"autoscalesettings","locations":["West + US","East US","North Europe","South Central US","East US 2","Central US","Australia + Southeast","Brazil South","UK South","UK West","South India","Central India","West + India","Canada East","Canada Central","West Central US","West US 2","Korea + South","Korea Central","Australia Central","Australia Central 2","France Central","West + Europe","East Asia","Southeast Asia","Japan East","Japan West","North Central + US","Australia East","South Africa North","UAE North","Switzerland North","Germany + West Central","Norway East","West US 3","Jio India West"],"apiVersions":["2015-04-01","2014-04-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2015-04-01"}],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"eventtypes","locations":[],"apiVersions":["2017-03-01-preview","2016-09-01-preview","2015-04-01","2014-11-01","2014-04-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2015-04-01"}],"capabilities":"SupportsExtension"},{"resourceType":"locations","locations":["East + US"],"apiVersions":["2015-04-01","2014-04-01"],"capabilities":"None"},{"resourceType":"locations/operationResults","locations":[],"apiVersions":["2015-04-01","2014-04-01"],"capabilities":"None"},{"resourceType":"vmInsightsOnboardingStatuses","locations":[],"apiVersions":["2018-11-27-preview"],"capabilities":"SupportsExtension"},{"resourceType":"operations","locations":[],"apiVersions":["2015-04-01","2014-06-01","2014-04-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2015-04-01"}],"capabilities":"None"},{"resourceType":"diagnosticSettings","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","Japan + East","Japan West","North Central US","South Central US","East US 2","Central + US","Australia East","Australia Southeast","Brazil South","UK South","UK West","South + India","Central India","West India","Canada East","Canada Central","West Central + US","West US 2","Korea South","Korea Central","Australia Central","Australia + Central 2","France Central","South Africa North","UAE North","Switzerland + North","Germany West Central","Norway East","West US 3","Jio India West"],"apiVersions":["2021-05-01-preview","2017-05-01-preview","2016-09-01","2015-07-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2016-09-01"}],"capabilities":"SupportsExtension"},{"resourceType":"diagnosticSettingsCategories","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","Japan + East","Japan West","North Central US","South Central US","East US 2","Central + US","Australia East","Australia Southeast","Brazil South","UK South","UK West","South + India","Central India","West India","Canada East","Canada Central","West Central + US","West US 2","Korea South","Korea Central","Australia Central","Australia + Central 2","France Central","South Africa North","UAE North","Switzerland + North","Germany West Central","Norway East","West US 3","Jio India West"],"apiVersions":["2021-05-01-preview","2017-05-01-preview"],"capabilities":"SupportsExtension"},{"resourceType":"extendedDiagnosticSettings","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","Japan + East","Japan West","North Central US","South Central US","East US 2","Central + US","Australia East","Australia Southeast","Brazil South","UK South","UK West","South + India","Central India","West India","Canada East","Canada Central","West Central + US","West US 2","Korea South","Korea Central","Australia Central","Australia + Central 2","France Central","South Africa North","UAE North","Switzerland + North","Germany West Central","Norway East","West US 3","Jio India West"],"apiVersions":["2017-02-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2017-02-01"}],"capabilities":"SupportsExtension"},{"resourceType":"metricDefinitions","locations":["East + US","West US","West Europe","East Asia","Southeast Asia","Japan East","Japan + West","North Central US","South Central US","East US 2","Canada East","Canada + Central","Central US","Australia East","Australia Southeast","Australia Central","Australia + Central 2","Brazil South","Brazil Southeast","South India","Central India","West + India","North Europe","West US 2","Jio India West","West US 3","West Central + US","Korea South","Korea Central","UK South","UK West","France Central","South + Africa North","South Africa West","UAE North","Switzerland North","Germany + West Central","Norway East"],"apiVersions":["2018-01-01","2017-12-01-preview","2017-09-01-preview","2017-05-01-preview"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2018-01-01"}],"capabilities":"SupportsExtension"},{"resourceType":"logDefinitions","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","Japan + East","Japan West","North Central US","South Central US","East US 2","Central + US","Australia East","Australia Southeast","Brazil South","UK South","UK West","South + India","Central India","West India","Canada East","Canada Central","West Central + US","West US 2","Korea South","Korea Central","Australia Central","Australia + Central 2","France Central"],"apiVersions":["2015-07-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2015-07-01"}],"capabilities":"SupportsExtension"},{"resourceType":"eventCategories","locations":[],"apiVersions":["2015-04-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2015-04-01"}],"capabilities":"None"},{"resourceType":"metrics","locations":["East + US","West US","West Europe","East Asia","Southeast Asia","Japan East","Japan + West","North Central US","South Central US","East US 2","Canada East","Canada + Central","Central US","Australia East","Australia Southeast","Australia Central","Australia + Central 2","Brazil South","Brazil Southeast","South India","Central India","West + India","North Europe","West US 2","Jio India West","West US 3","West Central + US","Korea South","Korea Central","UK South","UK West","France Central","South + Africa North","South Africa West","UAE North","Switzerland North","Germany + West Central","Norway East"],"apiVersions":["2021-05-01","2019-07-01","2018-01-01","2017-12-01-preview","2017-09-01-preview","2017-05-01-preview","2016-09-01","2016-06-01"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2018-01-01"}],"capabilities":"SupportsExtension"},{"resourceType":"metricbatch","locations":[],"apiVersions":["2019-01-01-preview"],"capabilities":"None"},{"resourceType":"metricNamespaces","locations":["East + US","West US","West Europe","East Asia","Southeast Asia","Japan East","Japan + West","North Central US","South Central US","East US 2","Canada East","Canada + Central","Central US","Australia East","Australia Southeast","Australia Central","Australia + Central 2","Brazil South","Brazil Southeast","South India","Central India","West + India","North Europe","West US 2","Jio India West","West US 3","West Central + US","Korea South","Korea Central","UK South","UK West","France Central","South + Africa North","South Africa West","UAE North","Switzerland North","Germany + West Central","Norway East"],"apiVersions":["2017-12-01-preview"],"capabilities":"SupportsExtension"},{"resourceType":"actiongroups","locations":["Global"],"apiVersions":["2019-06-01","2019-03-01","2018-09-01","2018-03-01","2017-04-01","2017-03-01-preview"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2017-04-01"}],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"activityLogAlerts","locations":["Global"],"apiVersions":["2020-10-01","2017-04-01","2017-03-01-preview"],"apiProfiles":[{"profileVersion":"2018-06-01-profile","apiVersion":"2017-04-01"}],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"baseline","locations":["East US","West + US","West Europe","East Asia","Southeast Asia","Japan East","Japan West","North + Central US","South Central US","East US 2","Canada East","Canada Central","Central + US","Australia East","Australia Southeast","Australia Central","Australia + Central 2","Brazil South","South India","Central India","West India","North + Europe","Norway East","Germany West Central","Switzerland North","West US + 2","West Central US","Korea South","Korea Central","UK South","UK West","France + Central","South Africa North","UAE North"],"apiVersions":["2018-09-01","2017-11-01-preview"],"capabilities":"SupportsExtension"},{"resourceType":"metricbaselines","locations":["East + US","West US","West Europe","East Asia","Southeast Asia","Japan East","Japan + West","North Central US","South Central US","East US 2","Canada East","Canada + Central","Central US","Australia East","Australia Southeast","Australia Central","Australia + Central 2","Brazil South","South India","Central India","West India","North + Europe","Norway East","Germany West Central","Switzerland North","West US + 2","West Central US","Korea South","Korea Central","UK South","UK West","France + Central","South Africa North","UAE North"],"apiVersions":["2019-03-01","2018-09-01"],"capabilities":"SupportsExtension"},{"resourceType":"calculatebaseline","locations":[],"apiVersions":["2018-09-01","2017-11-01-preview"],"capabilities":"SupportsExtension"},{"resourceType":"workbooks","locations":["West + Europe","South Central US","East US","North Europe","Southeast Asia","West + US 2","Japan East","Australia East","Korea Central","France Central","Central + US","East US 2","East Asia","West US","Canada Central","Central India","UK + South","UK West","South Africa North","North Central US","Brazil South","Switzerland + North","Norway East","Norway West","Australia Southeast","Australia Central + 2","Germany West Central","Switzerland West","UAE Central","Japan West","Brazil + Southeast","UAE North","Australia Central","France South","South India","West + Central US","West US 3","Korea South","Canada East","Jio India West"],"apiVersions":["2021-03-08","2020-10-20","2020-02-12","2018-06-17-preview","2018-06-01-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"workbooktemplates","locations":["West + Europe","South Central US","East US","North Europe","Southeast Asia","West + US 2","Japan East","Australia East","Korea Central","France Central","Central + US","East US 2","East Asia","West US","Canada Central","Central India","UK + South","UK West","South Africa North","North Central US","Brazil South","Switzerland + North","Norway East","Norway West","Australia Southeast","Australia Central + 2","Germany West Central","Switzerland West","UAE Central","Japan West","Brazil + Southeast","UAE North","Australia Central","France South","South India","West + Central US","West US 3","Korea South","Canada East","Jio India West"],"apiVersions":["2020-11-20","2019-10-17-preview"],"capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"myWorkbooks","locations":["West + Europe","South Central US","East US","North Europe","Southeast Asia","West + US 2","UK South","Canada Central","Central India","Japan East","Australia + East","Korea Central","France Central","Central US","East US 2","East Asia","West + US","South Africa North","North Central US","Brazil South","Switzerland North","Norway + East","Norway West","Australia Southeast"],"apiVersions":["2021-03-08","2020-10-20","2020-02-12","2018-06-17-preview","2018-06-15-preview","2018-06-01-preview","2016-06-15-preview"],"capabilities":"SupportsExtension"},{"resourceType":"logs","locations":["East + US","East US 2","West US","Central US","North Central US","South Central US","North + Europe","West Europe","East Asia","Southeast Asia","Japan East","Japan West","Australia + East","Australia Southeast","Brazil South","South India","Central India","West + India","Canada Central","Canada East","West US 2","West Central US","UK South","UK + West","Korea Central","Korea South","France Central","France South","Australia + Central","South Africa North"],"apiVersions":["2018-08-01-preview","2018-03-01-preview"],"capabilities":"SupportsExtension"},{"resourceType":"transactions","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Central India","Canada Central","Japan East","Australia + East","Korea Central","France Central","East US 2","East Asia","West US","Central + US","South Africa North","North Central US"],"apiVersions":["2019-10-17-preview"],"capabilities":"SupportsExtension"},{"resourceType":"topology","locations":["East + US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Central India","Canada Central","Japan East","Australia + East","Korea Central","France Central","East US 2","East Asia","West US","Central + US","South Africa North","North Central US"],"apiVersions":["2019-10-17-preview"],"capabilities":"SupportsExtension"},{"resourceType":"generateLiveToken","locations":[],"apiVersions":["2020-06-02-preview"],"capabilities":"SupportsExtension"},{"resourceType":"dataCollectionRules","locations":["Australia + Southeast","Canada Central","Japan East","Australia East","Central India","Germany + West Central","North Central US","South Central US","East US","Central US","West + Europe","West US 2","Southeast Asia","East US 2","UK South","North Europe","West + US","Australia Central","West Central US","East Asia","UK West","Korea Central","France + Central","South Africa North","Switzerland North","Australia Central 2","Brazil + Southeast","France South","Norway West","UAE North","Japan West","Norway East","Switzerland + West","Brazil South"],"apiVersions":["2021-04-01","2019-11-01-preview"],"defaultApiVersion":"2021-04-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dataCollectionRuleAssociations","locations":["Australia + Southeast","Canada Central","Japan East","Australia East","Central India","Germany + West Central","North Central US","South Central US","East US","Central US","West + Europe","West US 2","Southeast Asia","East US 2","UK South","North Europe","West + US","Australia Central","West Central US","East Asia","UK West","Korea Central","France + Central","South Africa North","Switzerland North","Brazil South","Australia + Central 2","Brazil Southeast","Canada East","France South","Korea South","Norway + West","UAE North","Japan West","Norway East","Switzerland West"],"apiVersions":["2021-04-01","2019-11-01-preview"],"defaultApiVersion":"2021-04-01","capabilities":"SupportsExtension"},{"resourceType":"dataCollectionEndpoints","locations":["Australia + Southeast","Canada Central","Japan East","Australia East","Central India","Germany + West Central","North Central US","South Central US","East US","Central US","West + Europe","West US 2","Southeast Asia","East US 2","UK South","North Europe","West + US","Australia Central","West Central US","East Asia","UK West","Korea Central","France + Central","South Africa North","Switzerland North","Brazil South","Australia + Central 2","Brazil Southeast","Canada East","France South","Korea South","Norway + West","UAE North","Japan West","Norway East","Switzerland West"],"apiVersions":["2021-04-01"],"defaultApiVersion":"2021-04-01","capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"dataCollectionEndpoints/scopedPrivateLinkProxies","locations":["Australia + Southeast","Canada Central","Japan East","Australia East","Central India","Germany + West Central","North Central US","South Central US","East US","Central US","West + Europe","West US 2","Southeast Asia","East US 2","UK South","North Europe","West + US","Australia Central","West Central US","East Asia","UK West","Korea Central","France + Central","South Africa North","Switzerland North","Brazil South","Australia + Central 2","Brazil Southeast","Canada East","France South","Korea South","Norway + West","UAE North","Japan West","Norway East","Switzerland West"],"apiVersions":["2021-04-01"],"defaultApiVersion":"2021-04-01","capabilities":"None"},{"resourceType":"privateLinkScopes","locations":["Global"],"apiVersions":["2021-09-01","2021-07-01-preview","2019-10-17-preview"],"defaultApiVersion":"2019-10-17-preview","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"privateLinkScopes/privateEndpointConnections","locations":["Global"],"apiVersions":["2021-09-01","2021-07-01-preview","2019-10-17-preview"],"defaultApiVersion":"2019-10-17-preview","capabilities":"None"},{"resourceType":"privateLinkScopes/privateEndpointConnectionProxies","locations":["Global"],"apiVersions":["2021-09-01","2021-07-01-preview","2019-10-17-preview"],"defaultApiVersion":"2019-10-17-preview","capabilities":"None"},{"resourceType":"privateLinkScopes/scopedResources","locations":["Global"],"apiVersions":["2021-09-01","2021-07-01-preview","2019-10-17-preview"],"defaultApiVersion":"2019-10-17-preview","capabilities":"None"},{"resourceType":"components/linkedstorageaccounts","locations":["East + US","West Central US","South Central US","North Europe","West Europe","Southeast + Asia","West US 2","UK South","Canada Central","Central India","Japan East","Australia + East","Korea Central","France Central","Central US","East US 2","East Asia","West + US","South Africa North","North Central US","Brazil South","Switzerland North","Norway + East","Norway West","Australia Southeast"],"apiVersions":["2020-03-01-preview"],"capabilities":"None"},{"resourceType":"privateLinkScopeOperationStatuses","locations":["Global"],"apiVersions":["2021-09-01","2021-07-01-preview","2019-10-17-preview"],"defaultApiVersion":"2019-10-17-preview","capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + headers: + cache-control: + - no-cache + content-length: + - '26054' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 08:37:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_node_config.yaml b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_node_config.yaml new file mode 100644 index 00000000000..8e1ea5af31b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/recordings/test_aks_create_with_node_config.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --kubelet-config --linux-os-config --aks-custom-headers + --ssh-key-value -o + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2019-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-09-24T06:35:10Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '313' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 24 Sep 2021 06:35:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_aks_commands.py new file mode 100644 index 00000000000..f947c519b4a --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_aks_commands.py @@ -0,0 +1,1627 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import unittest +import os +import tempfile + +from azure.cli.testsdk import ( + ResourceGroupPreparer, RoleBasedServicePrincipalPreparer, ScenarioTest, live_only) +from azure.cli.command_modules.acs._format import version_to_tuple +from azure_devtools.scenario_tests import AllowLargeResponse + +from .recording_processors import KeyReplacer +from .custom_preparers import AKSCustomResourceGroupPreparer + + +def _get_test_data_file(filename): + curr_dir = os.path.dirname(os.path.realpath(__file__)) + return os.path.join(curr_dir, 'data', filename) + + +class AzureKubernetesServiceScenarioTest(ScenarioTest): + def __init__(self, method_name): + super(AzureKubernetesServiceScenarioTest, self).__init__( + method_name, recording_processors=[KeyReplacer()] + ) + + def _get_versions(self, location): + """Return the previous and current Kubernetes minor release versions, such as ("1.11.6", "1.12.4").""" + versions = self.cmd( + "az aks get-versions -l westus2 --query 'orchestrators[].orchestratorVersion'").get_output_in_json() + # sort by semantic version, from newest to oldest + versions = sorted(versions, key=version_to_tuple, reverse=True) + upgrade_version = versions[0] + # find the first version that doesn't start with the latest major.minor. + prefix = upgrade_version[:upgrade_version.rfind('.')] + create_version = next(x for x in versions if not x.startswith(prefix)) + return create_version, upgrade_version + + @classmethod + def generate_ssh_keys(cls): + # If the `--ssh-key-value` option is not specified, the validator will try to read the ssh-key from the "~/.ssh" directory, + # and if no key exists, it will call the method provided by azure-cli.core to generate one under the "~/.ssh" directory. + # In order to avoid misuse of personal ssh-key during testing and the race condition that is prone to occur when key creation + # is handled by azure-cli when performing test cases concurrently, we provide this function as a workround. + + # In the scenario of runner and AKS check-in pipeline, a temporary ssh-key will be generated in advance under the + # "tests/latest/data/.ssh" sub-directory of the acs module in the cloned azure-cli repository when setting up the + # environment. Each test case will read the ssh-key from a pre-generated file during execution, so there will be no + # race conditions caused by concurrent reading and writing/creating of the same file. + acs_base_dir = os.getenv("ACS_BASE_DIR", None) + if acs_base_dir: + pre_generated_ssh_key_path = os.path.join(acs_base_dir, "tests/latest/data/.ssh/id_rsa.pub") + if os.path.exists(pre_generated_ssh_key_path): + return pre_generated_ssh_key_path.replace('\\', '\\\\') + + # In the CLI check-in pipeline scenario, the following fake ssh-key will be used. Each test case will read the ssh-key from + # a different temporary file during execution, so there will be no race conditions caused by concurrent reading and + # writing/creating of the same file. + TEST_SSH_KEY_PUB = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== test@example.com\n" # pylint: disable=line-too-long + _, pathname = tempfile.mkstemp() + with open(pathname, 'w') as key_file: + key_file.write(TEST_SSH_KEY_PUB) + return pathname.replace('\\', '\\\\') + + @live_only() # live only is required for test environment setup like `az login` + @AllowLargeResponse() + def test_get_version(self): + versions_cmd = 'aks get-versions -l westus2' + self.cmd(versions_cmd, checks=[ + self.check( + 'type', 'Microsoft.ContainerService/locations/orchestrators'), + self.check('orchestrators[0].orchestratorType', 'Kubernetes') + ]) + + @live_only() # live only is required for test environment setup like `az login` + @AllowLargeResponse() + def test_get_os_options(self): + osOptions_cmd = 'aks get-os-options -l westus2' + self.cmd(osOptions_cmd, checks=[ + self.check( + 'type', 'Microsoft.ContainerService/locations/osOptions') + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_and_update_with_managed_aad(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--vm-set-type VirtualMachineScaleSets -c 1 ' \ + '--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile.managed', True), + self.check( + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001') + ]) + + update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ + '--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000002 ' \ + '--aad-tenant-id 00000000-0000-0000-0000-000000000003 -o json' + self.cmd(update_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile.managed', True), + self.check( + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000002'), + self.check('aadProfile.tenantId', + '00000000-0000-0000-0000-000000000003') + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_aadv1_and_update_with_managed_aad(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--vm-set-type VirtualMachineScaleSets -c 1 ' \ + '--aad-server-app-id 00000000-0000-0000-0000-000000000001 ' \ + '--aad-server-app-secret fake-secret ' \ + '--aad-client-app-id 00000000-0000-0000-0000-000000000002 ' \ + '--aad-tenant-id d5b55040-0c14-48cc-a028-91457fc190d9 ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile.managed', None), + self.check('aadProfile.serverAppId', + '00000000-0000-0000-0000-000000000001'), + self.check('aadProfile.clientAppId', + '00000000-0000-0000-0000-000000000002'), + self.check('aadProfile.tenantId', + 'd5b55040-0c14-48cc-a028-91457fc190d9') + ]) + + update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ + '--enable-aad ' \ + '--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000003 ' \ + '--aad-tenant-id 00000000-0000-0000-0000-000000000004 -o json' + self.cmd(update_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile.managed', True), + self.check( + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000003'), + self.check('aadProfile.tenantId', + '00000000-0000-0000-0000-000000000004') + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_nonaad_and_update_with_managed_aad(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--vm-set-type VirtualMachineScaleSets --node-count=1 ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile', None) + ]) + + update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ + '--enable-aad ' \ + '--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 ' \ + '--aad-tenant-id 00000000-0000-0000-0000-000000000002 -o json' + self.cmd(update_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile.managed', True), + self.check( + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001'), + self.check('aadProfile.tenantId', + '00000000-0000-0000-0000-000000000002') + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_and_update_with_managed_aad_enable_azure_rbac(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--vm-set-type VirtualMachineScaleSets -c 1 ' \ + '--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile.managed', True), + self.check( + 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001') + ]) + + update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ + '--enable-azure-rbac -o json' + self.cmd(update_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile.enableAzureRbac', True) + ]) + + update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ + '--disable-azure-rbac -o json' + self.cmd(update_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('aadProfile.enableAzureRbac', False) + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_ingress_appgw_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '-a ingress-appgw --appgw-subnet-cidr 10.2.0.0/16 ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ingressApplicationGateway.enabled', True), + self.check( + 'addonProfiles.ingressApplicationGateway.config.subnetCIDR', "10.2.0.0/16") + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_ingress_appgw_addon_with_deprecated_subet_prefix(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '-a ingress-appgw --appgw-subnet-prefix 10.2.0.0/16 ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ingressApplicationGateway.enabled', True), + self.check( + 'addonProfiles.ingressApplicationGateway.config.subnetCIDR', "10.2.0.0/16") + ]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_byo_subnet_with_ingress_appgw_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + vnet_name = self.create_random_name('cliakstest', 16) + appgw_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'aks_name': aks_name, + 'vnet_name': vnet_name, + 'appgw_name': appgw_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create virtual network + create_vnet = 'network vnet create --resource-group={resource_group} --name={vnet_name} ' \ + '--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json' + vnet = self.cmd(create_vnet, checks=[ + self.check('newVNet.provisioningState', 'Succeeded') + ]).get_output_in_json() + + create_subnet = 'network vnet subnet create -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} ' \ + '--address-prefixes 11.0.1.0/24 -o json' + self.cmd(create_subnet, checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + vnet_id = vnet['newVNet']["id"] + assert vnet_id is not None + self.kwargs.update({ + 'vnet_id': vnet_id, + }) + + # create aks cluster + create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity ' \ + '--vnet-subnet-id {vnet_id}/subnets/aks-subnet -a ingress-appgw ' \ + '--appgw-name gateway --appgw-subnet-id {vnet_id}/subnets/appgw-subnet ' \ + '--yes --ssh-key-value={ssh_key_value} -o json' + aks_cluster = self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ingressApplicationGateway.enabled', True), + self.check( + 'addonProfiles.ingressApplicationGateway.config.applicationGatewayName', "gateway"), + self.check('addonProfiles.ingressApplicationGateway.config.subnetId', + vnet_id + '/subnets/appgw-subnet') + ]).get_output_in_json() + + addon_client_id = aks_cluster["addonProfiles"]["ingressApplicationGateway"]["identity"]["clientId"] + + self.kwargs.update({ + 'addon_client_id': addon_client_id, + }) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_byo_appgw_with_ingress_appgw_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + vnet_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'aks_name': aks_name, + 'vnet_name': vnet_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create virtual network + create_vnet = 'network vnet create --resource-group={resource_group} --name={vnet_name} ' \ + '--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json' + vnet = self.cmd(create_vnet, checks=[ + self.check('newVNet.provisioningState', 'Succeeded') + ]).get_output_in_json() + + create_subnet = 'network vnet subnet create -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} ' \ + '--address-prefixes 11.0.1.0/24 -o json' + self.cmd(create_subnet, checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + vnet_id = vnet['newVNet']["id"] + assert vnet_id is not None + self.kwargs.update({ + 'vnet_id': vnet_id, + }) + + # create public ip for app gateway + create_pip = 'network public-ip create -n appgw-ip -g {resource_group} ' \ + '--allocation-method Static --sku Standard -o json' + self.cmd(create_pip, checks=[ + self.check('publicIp.provisioningState', 'Succeeded') + ]) + + # create app gateway + create_appgw = 'network application-gateway create -n appgw -g {resource_group} ' \ + '--sku Standard_v2 --public-ip-address appgw-ip --subnet {vnet_id}/subnets/appgw-subnet' + self.cmd(create_appgw) + + # construct group id + from msrestazure.tools import parse_resource_id, resource_id + parsed_vnet_id = parse_resource_id(vnet_id) + group_id = resource_id(subscription=parsed_vnet_id["subscription"], + resource_group=parsed_vnet_id["resource_group"]) + appgw_id = group_id + "/providers/Microsoft.Network/applicationGateways/appgw" + + self.kwargs.update({ + 'appgw_id': appgw_id, + 'appgw_group_id': group_id + }) + + # create aks cluster + create_cmd = 'aks create -n {aks_name} -g {resource_group} --enable-managed-identity ' \ + '--vnet-subnet-id {vnet_id}/subnets/aks-subnet ' \ + '-a ingress-appgw --appgw-id {appgw_id} ' \ + '--yes --ssh-key-value={ssh_key_value} -o json' + aks_cluster = self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ingressApplicationGateway.enabled', True), + self.check( + 'addonProfiles.ingressApplicationGateway.config.applicationGatewayId', appgw_id) + ]).get_output_in_json() + + addon_client_id = aks_cluster["addonProfiles"]["ingressApplicationGateway"]["identity"]["clientId"] + + self.kwargs.update({ + 'addon_client_id': addon_client_id, + }) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_openservicemesh_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '-a open-service-mesh --ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.openServiceMesh.enabled', True), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_enable_addon_with_openservicemesh(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.openServiceMesh', None), + ]) + + enable_cmd = 'aks enable-addons --addons open-service-mesh --resource-group={resource_group} --name={name} -o json' + self.cmd(enable_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.openServiceMesh.enabled', True), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_disable_addon_openservicemesh(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '-a open-service-mesh --ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.openServiceMesh.enabled', True), + ]) + + disable_cmd = 'aks disable-addons --addons open-service-mesh --resource-group={resource_group} --name={name} -o json' + self.cmd(disable_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.openServiceMesh.enabled', False), + self.check('addonProfiles.openServiceMesh.config', None) + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_confcom_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '-a confcom --ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), + self.check( + 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_confcom_addon_helper_enabled(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '-a confcom --enable-sgxquotehelper --ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), + self.check( + 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "true") + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_enable_addons_confcom_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ACCSGXDevicePlugin', None) + ]) + + enable_cmd = 'aks enable-addons --addons confcom --resource-group={resource_group} --name={name} -o json' + self.cmd(enable_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), + self.check( + 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_disable_addons_confcom_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ + '-a confcom --ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), + self.check( + 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") + ]) + + disable_cmd = 'aks disable-addons --addons confcom --resource-group={resource_group} --name={name} -o json' + self.cmd(disable_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.ACCSGXDevicePlugin.enabled', False), + self.check('addonProfiles.ACCSGXDevicePlugin.config', None) + ]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_virtual_node_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + vnet_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'aks_name': aks_name, + 'vnet_name': vnet_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create virtual network + create_vnet = 'network vnet create --resource-group={resource_group} --name={vnet_name} ' \ + '--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json' + vnet = self.cmd(create_vnet, checks=[ + self.check('newVNet.provisioningState', 'Succeeded') + ]).get_output_in_json() + + create_subnet = 'network vnet subnet create -n aci-subnet --resource-group={resource_group} --vnet-name {vnet_name} ' \ + '--address-prefixes 11.0.1.0/24 -o json' + self.cmd(create_subnet, checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + vnet_id = vnet['newVNet']["id"] + assert vnet_id is not None + self.kwargs.update({ + 'vnet_id': vnet_id, + }) + + # create aks cluster + create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity ' \ + '--vnet-subnet-id {vnet_id}/subnets/aks-subnet --network-plugin azure ' \ + '-a virtual-node --aci-subnet-name aci-subnet --yes ' \ + '--ssh-key-value={ssh_key_value} -o json' + aks_cluster = self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.aciConnectorLinux.enabled', True), + self.check( + 'addonProfiles.aciConnectorLinux.config.SubnetName', "aci-subnet") + ]).get_output_in_json() + + addon_client_id = aks_cluster["addonProfiles"]["aciConnectorLinux"]["identity"]["clientId"] + + self.kwargs.update({ + 'addon_client_id': addon_client_id, + }) + + # delete + cmd = 'aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait' + self.cmd(cmd, checks=[ + self.is_empty(), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_stop_and_start(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + ]) + + stop_cmd = 'aks stop --resource-group={resource_group} --name={name}' + self.cmd(stop_cmd) + + start_cmd = 'aks start --resource-group={resource_group} --name={name}' + self.cmd(start_cmd) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_managed_disk(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--vm-set-type VirtualMachineScaleSets -c 1 ' \ + '--node-osdisk-type=Managed ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('agentPoolProfiles[0].osDiskType', 'Managed'), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_ephemeral_disk(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--vm-set-type VirtualMachineScaleSets -c 1 ' \ + '--node-osdisk-type=Ephemeral --node-osdisk-size 60 ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('agentPoolProfiles[0].osDiskType', 'Ephemeral'), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_nodepool_get_upgrades(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + node_pool_name = self.create_random_name('c', 6) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'node_pool_name': node_pool_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--nodepool-name {node_pool_name} -c 1 ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + ]) + + # nodepool get-upgrades + self.cmd('aks nodepool get-upgrades ' + '--resource-group={resource_group} ' + '--cluster-name={name} ' + '--nodepool-name={node_pool_name}', + checks=[ + # if rerun the recording, please update latestNodeImageVersion to the latest value + self.check_pattern('latestNodeImageVersion', + 'AKSUbuntu-1804gen2containerd-2021.(0[1-9]|1[012]).(0[1-9]|[12]\d|3[01])'), + self.check( + 'type', "Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles") + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_upgrade_node_image_only_cluster(self, resource_group, resource_group_location): + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + node_pool_name = self.create_random_name('c', 6) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'node_pool_name': node_pool_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--nodepool-name {node_pool_name} ' \ + '--vm-set-type VirtualMachineScaleSets --node-count=1 ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + upgrade_node_image_only_cluster_cmd = 'aks upgrade ' \ + '-g {resource_group} ' \ + '-n {name} ' \ + '--node-image-only ' \ + '--yes' + self.cmd(upgrade_node_image_only_cluster_cmd, checks=[ + self.check( + 'agentPoolProfiles[0].provisioningState', 'UpgradingNodeImageVersion') + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_upgrade_node_image_only_nodepool(self, resource_group, resource_group_location): + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + node_pool_name = self.create_random_name('c', 6) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'node_pool_name': node_pool_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--nodepool-name {node_pool_name} ' \ + '--vm-set-type VirtualMachineScaleSets --node-count=1 ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + upgrade_node_image_only_nodepool_cmd = 'aks nodepool upgrade ' \ + '--resource-group {resource_group} ' \ + '--cluster-name {name} ' \ + '-n {node_pool_name} ' \ + '--node-image-only ' \ + '--no-wait' + self.cmd(upgrade_node_image_only_nodepool_cmd) + + get_nodepool_cmd = 'aks nodepool show ' \ + '--resource-group={resource_group} ' \ + '--cluster-name={name} ' \ + '-n {node_pool_name} ' + self.cmd(get_nodepool_cmd, checks=[ + self.check('provisioningState', 'UpgradingNodeImageVersion') + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_upgrade_nodepool(self, resource_group, resource_group_location): + create_version, upgrade_version = self._get_versions(resource_group_location) + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'dns_name_prefix': self.create_random_name('cliaksdns', 16), + 'location': resource_group_location, + 'resource_type': 'Microsoft.ContainerService/ManagedClusters', + 'windows_admin_username': 'azureuser1', + 'windows_admin_password': 'replace-Password1234$', + 'nodepool2_name': 'npwin', + 'k8s_version': create_version, + 'upgrade_k8s_version': upgrade_version, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create AKS cluster + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ + '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ + '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ + '--kubernetes-version={k8s_version} --ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.exists('fqdn'), + self.exists('nodeResourceGroup'), + self.check('provisioningState', 'Succeeded'), + self.check('windowsProfile.adminUsername', 'azureuser1') + ]) + + # add Windows nodepool + self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # upgrade cluster control plane only + self.cmd('aks upgrade --resource-group={resource_group} --name={name} --kubernetes-version={upgrade_k8s_version} --yes', checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # upgrade Windows nodepool + self.cmd('aks nodepool upgrade --resource-group={resource_group} --cluster-name={name} ' \ + '--name={nodepool2_name} --kubernetes-version={upgrade_k8s_version} ' \ + '--aks-custom-headers WindowsContainerRuntime=containerd', checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # delete AKS cluster + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_windows(self, resource_group, resource_group_location): + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'dns_name_prefix': self.create_random_name('cliaksdns', 16), + 'location': resource_group_location, + 'resource_type': 'Microsoft.ContainerService/ManagedClusters', + 'windows_admin_username': 'azureuser1', + 'windows_admin_password': 'replace-Password1234$', + 'nodepool2_name': 'npwin', + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ + '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ + '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.exists('fqdn'), + self.exists('nodeResourceGroup'), + self.check('provisioningState', 'Succeeded'), + self.check('windowsProfile.adminUsername', 'azureuser1') + ]) + + # nodepool add + self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # update Windows license type + self.cmd('aks update --resource-group={resource_group} --name={name} --enable-ahub', checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('windowsProfile.licenseType', 'Windows_Server') + ]) + + # nodepool delete + self.cmd( + 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait', checks=[self.is_empty()]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_ahub(self, resource_group, resource_group_location): + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'dns_name_prefix': self.create_random_name('cliaksdns', 16), + 'location': resource_group_location, + 'resource_type': 'Microsoft.ContainerService/ManagedClusters', + 'windows_admin_username': 'azureuser1', + 'windows_admin_password': 'replace-Password1234$', + 'nodepool2_name': 'npwin', + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ + '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ + '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure --enable-ahub ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.exists('fqdn'), + self.exists('nodeResourceGroup'), + self.check('provisioningState', 'Succeeded'), + self.check('windowsProfile.adminUsername', 'azureuser1'), + self.check('windowsProfile.licenseType', 'Windows_Server') + ]) + + # nodepool add + self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # update Windows license type + self.cmd('aks update --resource-group={resource_group} --name={name} --disable-ahub', checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('windowsProfile.licenseType', 'None') + ]) + + # nodepool delete + self.cmd( + 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait', checks=[self.is_empty()]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westeurope') + def test_aks_update_to_msi_cluster(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + ]) + + # update to MSI cluster + self.cmd('aks update --resource-group={resource_group} --name={name} --enable-managed-identity --yes', checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('identity.type', 'SystemAssigned') + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + def test_aks_create_with_gitops_addon(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} -a gitops ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.gitops.enabled', True), + ]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + def test_aks_enable_addon_with_gitops(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.gitops', None), + ]) + + enable_cmd = 'aks enable-addons --addons gitops --resource-group={resource_group} --name={name} -o json' + self.cmd(enable_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.gitops.enabled', True), + ]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + def test_aks_disable_addon_gitops(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} -a gitops ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.gitops.enabled', True), + ]) + + disable_cmd = 'aks disable-addons --addons gitops --resource-group={resource_group} --name={name} -o json' + self.cmd(disable_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('addonProfiles.gitops.enabled', False), + self.check('addonProfiles.gitops.config', None) + ]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westeurope') + def test_aks_update_to_msi_cluster_with_addons(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-addons monitoring ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + ]) + + # update to MSI cluster + self.cmd('aks update --resource-group={resource_group} --name={name} --enable-managed-identity --yes', checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('identity.type', 'SystemAssigned') + ]) + + # check egress + endpoints = self.cmd('aks egress-endpoints list --resource-group={resource_group} --name={name}').get_output_in_json() + categories = [e["category"] for e in endpoints] + assert "addon-monitoring" in categories + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_monitoring_aad_auth_msi(self, resource_group, resource_group_location,): + aks_name = self.create_random_name('cliakstest', 16) + self.create_new_cluster_with_monitoring_aad_auth(resource_group, resource_group_location, aks_name, user_assigned_identity=False) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_monitoring_aad_auth_uai(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.create_new_cluster_with_monitoring_aad_auth(resource_group, resource_group_location, aks_name, user_assigned_identity=True) + + def create_new_cluster_with_monitoring_aad_auth(self, resource_group, resource_group_location, aks_name, user_assigned_identity=False): + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + 'ssh_key_value': self.generate_ssh_keys() + }) + + if user_assigned_identity: + uai_cmd = f'identity create -g {resource_group} -n {aks_name}_uai' + resp = self.cmd(uai_cmd).get_output_in_json() + identity_id = resp["id"] + print("********************") + print(f"identity_id: {identity_id}") + print("********************") + + # create + create_cmd = f'aks create --resource-group={resource_group} --name={aks_name} --location={resource_group_location} ' \ + '--enable-managed-identity ' \ + '--enable-addons monitoring ' \ + '--enable-msi-auth-for-monitoring ' \ + '--node-count 1 ' \ + '--ssh-key-value={ssh_key_value} ' + create_cmd += f'--assign-identity {identity_id}' if user_assigned_identity else '' + + response = self.cmd(create_cmd, checks=[ + self.check('addonProfiles.omsagent.enabled', True), + self.check('addonProfiles.omsagent.config.useAADAuth', 'True') + ]).get_output_in_json() + + cluster_resource_id = response["id"] + subscription = cluster_resource_id.split("/")[2] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] + workspace_name = workspace_resource_id.split("/")[-1] + workspace_resource_group = workspace_resource_id.split("/")[4] + + # check that the DCR was created + dataCollectionRuleName = f"DCR-{workspace_name}" + dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{workspace_resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" + get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') + ]) + + # check that the DCR-A was created + dcra_resource_id = f"{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/send-to-{workspace_name}" + get_cmd = f'rest --method get --url https://management.azure.com{dcra_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.dataCollectionRuleId', f'{dcr_resource_id}') + ]) + + # make sure monitoring can be smoothly disabled + self.cmd(f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + + # delete + self.cmd(f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_enable_monitoring_with_aad_auth_msi(self, resource_group, resource_group_location,): + aks_name = self.create_random_name('cliakstest', 16) + self.enable_monitoring_existing_cluster_aad_atuh(resource_group, resource_group_location, aks_name, user_assigned_identity=False) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_enable_monitoring_with_aad_auth_uai(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.enable_monitoring_existing_cluster_aad_atuh(resource_group, resource_group_location, aks_name, user_assigned_identity=True) + + def enable_monitoring_existing_cluster_aad_atuh(self, resource_group, resource_group_location, aks_name, user_assigned_identity=False): + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + 'ssh_key_value': self.generate_ssh_keys() + }) + + if user_assigned_identity: + uai_cmd = f'identity create -g {resource_group} -n {aks_name}_uai' + resp = self.cmd(uai_cmd).get_output_in_json() + identity_id = resp["id"] + print("********************") + print(f"identity_id: {identity_id}") + print("********************") + + # create + create_cmd = f'aks create --resource-group={resource_group} --name={aks_name} --location={resource_group_location} ' \ + '--enable-managed-identity ' \ + '--node-count 1 ' \ + '--ssh-key-value={ssh_key_value} ' + create_cmd += f'--assign-identity {identity_id}' if user_assigned_identity else '' + self.cmd(create_cmd) + + enable_monitoring_cmd = f'aks enable-addons -a monitoring --resource-group={resource_group} --name={aks_name} ' \ + '--enable-msi-auth-for-monitoring ' + + response = self.cmd(enable_monitoring_cmd, checks=[ + self.check('addonProfiles.omsagent.enabled', True), + self.check('addonProfiles.omsagent.config.useAADAuth', 'True') + ]).get_output_in_json() + + cluster_resource_id = response["id"] + subscription = cluster_resource_id.split("/")[2] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] + workspace_name = workspace_resource_id.split("/")[-1] + workspace_resource_group = workspace_resource_id.split("/")[4] + + # check that the DCR was created + dataCollectionRuleName = f"DCR-{workspace_name}" + dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{workspace_resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" + get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') + ]) + + # check that the DCR-A was created + dcra_resource_id = f"{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/send-to-{workspace_name}" + get_cmd = f'rest --method get --url https://management.azure.com{dcra_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.dataCollectionRuleId', f'{dcr_resource_id}') + ]) + + # make sure monitoring can be smoothly disabled + self.cmd(f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + + # delete + self.cmd(f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_monitoring_legacy_auth(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--enable-managed-identity ' \ + '--enable-addons monitoring ' \ + '--node-count 1 ' \ + '--ssh-key-value={ssh_key_value} ' + response = self.cmd(create_cmd, checks=[ + self.check('addonProfiles.omsagent.enabled', True), + self.exists('addonProfiles.omsagent.config.logAnalyticsWorkspaceResourceID'), + self.check('addonProfiles.omsagent.config.useAADAuth', 'False') + ]).get_output_in_json() + + # make sure a DCR was not created + + cluster_resource_id = response["id"] + subscription = cluster_resource_id.split("/")[2] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] + workspace_name = workspace_resource_id.split("/")[-1] + workspace_resource_group = workspace_resource_id.split("/")[4] + + try: + # check that the DCR was created + dataCollectionRuleName = f"DCR-{workspace_name}" + dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{workspace_resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" + get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2019-11-01-preview' + self.cmd(get_cmd, checks=[ + self.check('properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') + ]) + + assert False + except Exception as err: + pass # this is expected + + + # make sure monitoring can be smoothly disabled + self.cmd(f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + + # delete + self.cmd(f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_node_config(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'kc_path': _get_test_data_file('kubeletconfig.json'), + 'oc_path': _get_test_data_file('linuxosconfig.json'), + 'ssh_key_value': self.generate_ssh_keys() + }) + + # use custom feature so it does not require subscription to regiter the feature + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--kubelet-config={kc_path} --linux-os-config={oc_path} ' \ + '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('agentPoolProfiles[0].kubeletConfig.cpuManagerPolicy', 'static'), + self.check('agentPoolProfiles[0].kubeletConfig.containerLogMaxSizeMb', 20), + self.check('agentPoolProfiles[0].linuxOsConfig.swapFileSizeMb', 1500), + self.check('agentPoolProfiles[0].linuxOsConfig.sysctls.netIpv4TcpTwReuse', True) + ]) + + # nodepool add + nodepool_cmd = 'aks nodepool add --resource-group={resource_group} --cluster-name={name} --name=nodepool2 --node-count=1 ' \ + '--kubelet-config={kc_path} --linux-os-config={oc_path} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview' + self.cmd(nodepool_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('kubeletConfig.cpuCfsQuotaPeriod', '200ms'), + self.check('kubeletConfig.podMaxPids', 120), + self.check('kubeletConfig.containerLogMaxSizeMb', 20), + self.check('linuxOsConfig.sysctls.netCoreSomaxconn', 163849) + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_http_proxy_config(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'http_proxy_path': _get_test_data_file('httpproxyconfig.json'), + 'ssh_key_value': self.generate_ssh_keys() + }) + + # use custom feature so it does not require subscription to regiter the feature + create_cmd = 'aks create --resource-group={resource_group} --name={name} --http-proxy-config={http_proxy_path} ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('httpProxyConfig', None), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_none_private_dns_zone(self, resource_group, resource_group_location): + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--node-count=1 --load-balancer-sku=standard ' \ + '--enable-private-cluster --private-dns-zone none ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.exists('privateFqdn'), + self.exists('nodeResourceGroup'), + self.check('provisioningState', 'Succeeded'), + self.check('apiServerAccessProfile.privateDNSZone', 'None'), + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_private_cluster_public_fqdn(self, resource_group, resource_group_location): + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--enable-private-cluster --node-count=1 ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.exists('privateFqdn'), + self.check('provisioningState', 'Succeeded'), + self.check('apiServerAccessProfile.enablePrivateCluster', True), + ]) + + # update + update_cmd = 'aks update --resource-group={resource_group} --name={name} --disable-public-fqdn' + self.cmd(update_cmd, checks=[ + self.exists('privateFqdn'), + self.check('provisioningState', 'Succeeded'), + self.check('apiServerAccessProfile.enablePrivateCluster', False), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_create_with_pod_identity_enabled(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--enable-managed-identity ' \ + '--enable-pod-identity --enable-pod-identity-with-kubenet ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('podIdentityProfile.enabled', True), + self.check('podIdentityProfile.allowNetworkPluginKubenet', True) + ]) + + # update: disable + cmd = 'aks update --resource-group={resource_group} --name={name} --disable-pod-identity' + self.cmd(cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('podIdentityProfile.enabled', None) + ]) + + # update: enable + cmd = 'aks update --resource-group={resource_group} --name={name} --enable-pod-identity --enable-pod-identity-with-kubenet' + self.cmd(cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('podIdentityProfile.enabled', True), + self.check('podIdentityProfile.allowNetworkPluginKubenet', True) + ]) + + # pod identity exception: add + cmd = ('aks pod-identity exception add --cluster-name={name} --resource-group={resource_group} ' + '--namespace test-namespace --name test-name --pod-labels foo=bar') + self.cmd(cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('podIdentityProfile.enabled', True), + self.check( + 'podIdentityProfile.userAssignedIdentityExceptions[0].name', 'test-name'), + self.check( + 'podIdentityProfile.userAssignedIdentityExceptions[0].namespace', 'test-namespace'), + self.check( + 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo', 'bar'), + ]) + + # pod identity exception: update + cmd = ('aks pod-identity exception update --cluster-name={name} --resource-group={resource_group} ' + '--namespace test-namespace --name test-name --pod-labels foo=bar a=b') + self.cmd(cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('podIdentityProfile.enabled', True), + self.check( + 'podIdentityProfile.userAssignedIdentityExceptions[0].name', 'test-name'), + self.check( + 'podIdentityProfile.userAssignedIdentityExceptions[0].namespace', 'test-namespace'), + self.check( + 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo', 'bar'), + self.check( + 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.a', 'b'), + ]) + + # pod identity exception: delete + cmd = ('aks pod-identity exception delete --cluster-name={name} --resource-group={resource_group} ' + '--namespace test-namespace --name test-name') + self.cmd(cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('podIdentityProfile.enabled', True), + self.check( + 'podIdentityProfile.userAssignedIdentityExceptions', None), + ]) + + # delete + cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' + self.cmd(cmd, checks=[ + self.is_empty(), + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_update_with_windows_password(self, resource_group, resource_group_location): + # reset the count so in replay mode the random names will start with 0 + self.test_resources_count = 0 + # kwargs for string formatting + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'dns_name_prefix': self.create_random_name('cliaksdns', 16), + 'location': resource_group_location, + 'resource_type': 'Microsoft.ContainerService/ManagedClusters', + 'windows_admin_username': 'azureuser1', + 'windows_admin_password': self.create_random_name('p@0A', 16), + 'nodepool2_name': 'npwin', + 'new_windows_admin_password': self.create_random_name('n!C3', 16), + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ + '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ + '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ + '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.exists('fqdn'), + self.exists('nodeResourceGroup'), + self.check('provisioningState', 'Succeeded'), + self.check('windowsProfile.adminUsername', 'azureuser1') + ]) + + # nodepool add + self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # update Windows password + self.cmd('aks update --resource-group={resource_group} --name={name} --windows-admin-password {new_windows_admin_password}', checks=[ + self.check('provisioningState', 'Succeeded'), + ]) + + # nodepool delete + self.cmd( + 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait', checks=[self.is_empty()]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_custom_kubelet_identity(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + control_plane_identity_name = self.create_random_name('cliakstest', 16) + kubelet_identity_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'control_plane_identity_name': control_plane_identity_name, + 'kubelet_identity_name': kubelet_identity_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + # create control plane identity + control_plane_identity = 'identity create --resource-group={resource_group} --name={control_plane_identity_name}' + c_identity = self.cmd(control_plane_identity, checks=[ + self.check('name', control_plane_identity_name) + ]).get_output_in_json() + control_plane_identity_resource_id = c_identity["id"] + assert control_plane_identity_resource_id is not None + self.kwargs.update({ + 'control_plane_identity_resource_id': control_plane_identity_resource_id, + }) + + # create kubelet identity + kubelet_identity = 'identity create --resource-group={resource_group} --name={kubelet_identity_name}' + k_identity = self.cmd(kubelet_identity, checks=[ + self.check('name', kubelet_identity_name) + ]).get_output_in_json() + kubelet_identity_resource_id = k_identity["id"] + assert kubelet_identity_resource_id is not None + self.kwargs.update({ + 'kubelet_identity_resource_id': kubelet_identity_resource_id, + }) + + # create + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--node-count=1 --enable-managed-identity ' \ + '--assign-identity {control_plane_identity_resource_id} --assign-kubelet-identity {kubelet_identity_resource_id} ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.exists('identity'), + self.exists('identityProfile'), + self.check('provisioningState', 'Succeeded'), + self.check('identityProfile.kubeletidentity.resourceId', + kubelet_identity_resource_id), + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_disable_local_accounts(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ + '--enable-managed-identity --disable-local-accounts ' \ + '--ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('disableLocalAccounts', True) + ]) + + # update to enable local accounts + self.cmd('aks update --resource-group={resource_group} --name={name} --enable-local-accounts', checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('disableLocalAccounts', False) + ]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + def test_aks_maintenanceconfiguration(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'mc_path': _get_test_data_file('maintenanceconfig.json'), + 'ssh_key_value': self.generate_ssh_keys() + }) + + create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded') + ]) + + # maintenanceconfiguration add + maintenance_configuration_add_cmd = 'aks maintenanceconfiguration add -g {resource_group} --cluster-name {name} -n default --weekday Monday --start-hour 1' + self.cmd( + maintenance_configuration_add_cmd, checks=[ + self.check('timeInWeek[0].day', 'Monday'), + self.check('timeInWeek[0].day', 'Monday'), + self.check('timeInWeek[0].hourSlots | contains(@, `1`)', True)] + ) + + # maintenanceconfiguration update (from config file) + maintenance_configuration_update_cmd = 'aks maintenanceconfiguration update -g {resource_group} --cluster-name {name} -n default --config-file {mc_path}' + self.cmd( + maintenance_configuration_update_cmd, checks=[ + self.check("timeInWeek[*].day | contains(@, 'Tuesday') && contains(@, 'Wednesday')", True), + self.check("timeInWeek[*].hourSlots[*] | contains([0], `2`) && contains([1], `6`)", True), + self.check("notAllowedTime | length(@) == `2`", True)] + ) + + # maintenanceconfiguration show + maintenance_configuration_show_cmd = 'aks maintenanceconfiguration show -g {resource_group} --cluster-name {name} -n default' + self.cmd( + maintenance_configuration_show_cmd, checks=[ + self.check("name == 'default'", True)] + ) + + # maintenanceconfiguration delete + maintenance_configuration_delete_cmd = 'aks maintenanceconfiguration delete -g {resource_group} --cluster-name {name} -n default' + self.cmd( + maintenance_configuration_delete_cmd, checks=[self.is_empty()]) + + # maintenanceconfiguration list + maintenance_configuration_list_cmd = 'aks maintenanceconfiguration list -g {resource_group} --cluster-name {name}' + self.cmd( + maintenance_configuration_list_cmd, checks=[self.is_empty()]) + + # delete + self.cmd( + 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_helpers.py b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_helpers.py new file mode 100644 index 00000000000..abd034a2661 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_helpers.py @@ -0,0 +1,121 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import unittest +from unittest import mock + +from knack import CLI + +from azure.cli.core._config import GLOBAL_CONFIG_DIR, ENV_VAR_PREFIX +from azure.cli.core.cloud import get_active_cloud +from azure.cli.core.profiles import get_sdk, ResourceType, supported_api_version + +import azext_aks_preview._helpers as helpers + +class MockCLI(CLI): + def __init__(self): + super(MockCLI, self).__init__(cli_name='mock_cli', config_dir=GLOBAL_CONFIG_DIR, + config_env_var_prefix=ENV_VAR_PREFIX, commands_loader_cls=MockLoader) + self.cloud = get_active_cloud(self) + + +class MockLoader(object): + def __init__(self, ctx): + self.ctx = ctx + + def get_models(self, *attr_args, **_): + from azure.cli.core.profiles import get_sdk + return get_sdk(self.ctx, ResourceType.MGMT_CONTAINERSERVICE, 'ManagedClusterAPIServerAccessProfile', + mod='models', operation_group='managed_clusters') + + +class MockCmd(object): + def __init__(self, ctx, arguments={}): + self.cli_ctx = ctx + self.loader = MockLoader(self.cli_ctx) + self.arguments = arguments + + def get_models(self, *attr_args, **kwargs): + return get_sdk(self.cli_ctx, ResourceType.MGMT_CONTAINERSERVICE, 'ManagedClusterAPIServerAccessProfile', + mod='models', operation_group='managed_clusters') + + +class TestPopulateApiServerAccessProfile(unittest.TestCase): + def setUp(self): + self.cli = MockCLI() + + def test_single_cidr_with_spaces(self): + api_server_authorized_ip_ranges = "0.0.0.0/32 " + profile = helpers._populate_api_server_access_profile(MockCmd(self.cli), api_server_authorized_ip_ranges) + self.assertListEqual(profile.authorized_ip_ranges, ["0.0.0.0/32"]) + + def test_multi_cidr_with_spaces(self): + api_server_authorized_ip_ranges = " 0.0.0.0/32 , 129.1.1.1/32" + profile = helpers._populate_api_server_access_profile(MockCmd(self.cli), api_server_authorized_ip_ranges) + self.assertListEqual(profile.authorized_ip_ranges, ["0.0.0.0/32", "129.1.1.1/32"]) + + +class TestSetVmSetType(unittest.TestCase): + def test_archaic_k8_version(self): + version = "1.11.9" + vm_type = helpers._set_vm_set_type("", version) + self.assertEqual(vm_type, "AvailabilitySet") + + def test_archaic_k8_version_with_vm_set(self): + version = "1.11.9" + vm_type = helpers._set_vm_set_type("AvailabilitySet", version) + self.assertEqual(vm_type, "AvailabilitySet") + + def test_no_vm_set(self): + version = "1.15.0" + vm_type = helpers._set_vm_set_type("", version) + self.assertEqual(vm_type, "VirtualMachineScaleSets") + + def test_casing_vmss(self): + version = "1.15.0" + vm_type = helpers._set_vm_set_type("virtualmachineScaleSets", version) + self.assertEqual(vm_type, "VirtualMachineScaleSets") + + def test_casing_as(self): + version = "1.15.0" + vm_type = helpers._set_vm_set_type("Availabilityset", version) + self.assertEqual(vm_type, "AvailabilitySet") + + +class TestTrimContainerName(unittest.TestCase): + def test_trim_fqdn_name_containing_hcp(self): + container_name = 'abcdef-dns-ed55ba6d-hcp-centralus-azmk8s-io' + expected_container_name = 'abcdef-dns-ed55ba6d' + trim_container_name = helpers._trim_fqdn_name_containing_hcp(container_name) + self.assertEqual(expected_container_name, trim_container_name) + + def test_trim_fqdn_name_trailing_dash(self): + container_name = 'dns-ed55ba6ad-e48fe2bd-b4bc-4aac-bc23-29bc44154fe1-privatelink-centralus-azmk8s-io' + expected_container_name = 'dns-ed55ba6ad-e48fe2bd-b4bc-4aac-bc23-29bc44154fe1-privatelink' + trim_container_name = helpers._trim_fqdn_name_containing_hcp( + container_name) + self.assertEqual(expected_container_name, trim_container_name) + + def test_trim_fqdn_name_not_containing_hcp(self): + container_name = 'abcdef-dns-ed55ba6d-e48fe2bd-b4bc-4aac-bc23-29bc44154fe1-privatelink-centralus-azmk8s-io' + expected_container_name = 'abcdef-dns-ed55ba6d-e48fe2bd-b4bc-4aac-bc23-29bc44154fe1-privat' + trim_container_name = helpers._trim_fqdn_name_containing_hcp(container_name) + self.assertEqual(expected_container_name, trim_container_name) + + +class TestFuzzyMatch(unittest.TestCase): + def setUp(self): + self.expected = ['bord', 'birdy', 'fbird', 'bir', 'ird', 'birdwaj'] + + def test_fuzzy_match(self): + result = helpers._fuzzy_match( + "bird", ["plane", "bord", "birdy", "fbird", "bir", "ird", "birdwaj", "bored", "biron", "bead"]) + + self.assertCountEqual(result, self.expected) + self.assertListEqual(result, self.expected) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_loadbalancer.py b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_loadbalancer.py new file mode 100644 index 00000000000..5a84f843267 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_loadbalancer.py @@ -0,0 +1,54 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +import unittest +from unittest import mock + +from knack import CLI + +from azure.cli.core._config import GLOBAL_CONFIG_DIR, ENV_VAR_PREFIX +from azure.cli.core.cloud import get_active_cloud +from azure.cli.core.profiles import get_sdk, ResourceType, supported_api_version + +from azure.mgmt.containerservice.v2020_11_01.models import ManagedClusterLoadBalancerProfile +from azure.mgmt.containerservice.v2020_11_01.models import ManagedClusterLoadBalancerProfileManagedOutboundIPs +from azure.mgmt.containerservice.v2020_11_01.models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes +from azure.mgmt.containerservice.v2020_11_01.models import ManagedClusterLoadBalancerProfileOutboundIPs +from azure.cli.core.util import CLIError +from azext_aks_preview import _loadbalancer as loadbalancer + + +class TestLoadBalancer(unittest.TestCase): + def test_configure_load_balancer_profile(self): + cmd = mock.MagicMock() + managed_outbound_ip_count = 5 + outbound_ips = None + outbound_ip_prefixes = None + outbound_ports = 80 + idle_timeout = 3600 + + profile = ManagedClusterLoadBalancerProfile() + # ips -> i_ps due to track 2 naming issue + profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs( + count=2 + ) + # ips -> i_ps due to track 2 naming issue + profile.outbound_i_ps = ManagedClusterLoadBalancerProfileOutboundIPs( + public_ips="public_ips" + ) + profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( + public_ip_prefixes="public_ip_prefixes" + ) + + p = loadbalancer.configure_load_balancer_profile(cmd, managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile) + + # ips -> i_ps due to track 2 naming issue + self.assertIsNotNone(p.managed_outbound_i_ps) + # ips -> i_ps due to track 2 naming issue + self.assertIsNone(p.outbound_i_ps) + self.assertIsNone(p.outbound_ip_prefixes) + + +if __name__ == '__main__': + unittest.main() diff --git a/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_validators.py b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_validators.py new file mode 100644 index 00000000000..9709008aace --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/hybrid_2020_09_01/test_validators.py @@ -0,0 +1,340 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +import unittest +from unittest import mock + +from knack import CLI + +from azure.cli.core._config import GLOBAL_CONFIG_DIR, ENV_VAR_PREFIX +from azure.cli.core.cloud import get_active_cloud +from azure.cli.core.profiles import get_sdk, ResourceType, supported_api_version + +from azure.cli.core.util import CLIError +import azext_aks_preview._validators as validators +from azext_aks_preview._consts import ADDONS + +class MockCLI(CLI): + def __init__(self): + super(MockCLI, self).__init__(cli_name='mock_cli', config_dir=GLOBAL_CONFIG_DIR, + config_env_var_prefix=ENV_VAR_PREFIX, commands_loader_cls=MockLoader) + self.cloud = get_active_cloud(self) + + +class MockLoader(object): + def __init__(self, ctx): + self.ctx = ctx + + def get_models(self, *attr_args, **_): + from azure.cli.core.profiles import get_sdk + return get_sdk(self.ctx, ResourceType.MGMT_CONTAINERSERVICE, 'ManagedClusterPropertiesAutoScalerProfile', + mod='models', operation_group='managed_clusters') + + +class MockCmd(object): + def __init__(self, ctx, arguments={}): + self.cli_ctx = ctx + self.loader = MockLoader(self.cli_ctx) + self.arguments = arguments + + def get_models(self, *attr_args, **kwargs): + return get_sdk(self.cli_ctx, ResourceType.MGMT_CONTAINERSERVICE, 'ManagedClusterPropertiesAutoScalerProfile', + mod='models', operation_group='managed_clusters') + +class TestValidateIPRanges(unittest.TestCase): + def test_simultaneous_allow_and_disallow_with_spaces(self): + api_server_authorized_ip_ranges = " 0.0.0.0/32 , 129.1.1.1.1 " + namespace = Namespace(api_server_authorized_ip_ranges) + err = ("Setting --api-server-authorized-ip-ranges to 0.0.0.0/32 is not allowed with other IP ranges." + "Refer to https://aka.ms/aks/whitelist for more details") + + with self.assertRaises(CLIError) as cm: + validators.validate_ip_ranges(namespace) + self.assertEqual(str(cm.exception), err) + + def test_simultaneous_enable_and_disable_with_spaces(self): + # an entry of "", 129.1.1.1.1 from command line is translated into " , 129.1.1.1.1" + api_server_authorized_ip_ranges = " , 129.1.1.1.1" + namespace = Namespace(api_server_authorized_ip_ranges) + err = "--api-server-authorized-ip-ranges cannot be disabled and simultaneously enabled" + + with self.assertRaises(CLIError) as cm: + validators.validate_ip_ranges(namespace) + self.assertEqual(str(cm.exception), err) + + def test_disable_authorized_ip_ranges(self): + api_server_authorized_ip_ranges = '' + namespace = Namespace(api_server_authorized_ip_ranges) + validators.validate_ip_ranges(namespace) + + def test_local_ip_address(self): + api_server_authorized_ip_ranges = "192.168.0.0,192.168.0.0/16" + namespace = Namespace(api_server_authorized_ip_ranges) + err = "--api-server-authorized-ip-ranges must be global non-reserved addresses or CIDRs" + + with self.assertRaises(CLIError) as cm: + validators.validate_ip_ranges(namespace) + self.assertEqual(str(cm.exception), err) + + def test_invalid_ip(self): + api_server_authorized_ip_ranges = "193.168.0" + namespace = Namespace(api_server_authorized_ip_ranges) + err = "--api-server-authorized-ip-ranges should be a list of IPv4 addresses or CIDRs" + + with self.assertRaises(CLIError) as cm: + validators.validate_ip_ranges(namespace) + self.assertEqual(str(cm.exception), err) + + def test_IPv6(self): + api_server_authorized_ip_ranges = "3ffe:1900:4545:3:200:f8ff:fe21:67cf" + namespace = Namespace(api_server_authorized_ip_ranges) + err = "--api-server-authorized-ip-ranges cannot be IPv6 addresses" + + with self.assertRaises(CLIError) as cm: + validators.validate_ip_ranges(namespace) + self.assertEqual(str(cm.exception), err) + + +class TestClusterAutoscalerParamsValidators(unittest.TestCase): + def setUp(self): + self.cli = MockCLI() + + def test_empty_key_empty_value(self): + cluster_autoscaler_profile = ["="] + namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) + err = "Empty key specified for cluster-autoscaler-profile" + + with self.assertRaises(CLIError) as cm: + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) + self.assertEqual(str(cm.exception), err) + + def test_non_empty_key_empty_value(self): + cluster_autoscaler_profile = ["scan-interval="] + namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) + + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) + + def test_two_empty_keys_empty_value(self): + cluster_autoscaler_profile = ["=", "="] + namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) + err = "Empty key specified for cluster-autoscaler-profile" + + with self.assertRaises(CLIError) as cm: + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) + self.assertEqual(str(cm.exception), err) + + def test_one_empty_key_in_pair_one_non_empty(self): + cluster_autoscaler_profile = ["scan-interval=20s", "="] + namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) + err = "Empty key specified for cluster-autoscaler-profile" + + with self.assertRaises(CLIError) as cm: + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) + self.assertEqual(str(cm.exception), err) + + def test_invalid_key(self): + cluster_autoscaler_profile = ["bad-key=val"] + namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) + err = "Invalid key specified for cluster-autoscaler-profile: bad-key" + + with self.assertRaises(CLIError) as cm: + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) + self.assertEqual(str(cm.exception), err) + + def test_valid_parameters(self): + cluster_autoscaler_profile = ["scan-interval=20s", "scale-down-delay-after-add=15m"] + namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) + + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) + + +class Namespace: + def __init__(self, api_server_authorized_ip_ranges=None, cluster_autoscaler_profile=None): + self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges + self.cluster_autoscaler_profile = cluster_autoscaler_profile + + +class TestSubnetId(unittest.TestCase): + def test_invalid_subnet_id(self): + invalid_vnet_subnet_id = "dummy subnet id" + err = ("--vnet-subnet-id is not a valid Azure resource ID.") + + with self.assertRaises(CLIError) as cm: + validators._validate_subnet_id(invalid_vnet_subnet_id, "--vnet-subnet-id") + self.assertEqual(str(cm.exception), err) + + def test_valid_vnet_subnet_id(self): + valid_subnet_id = "/subscriptions/testid/resourceGroups/MockedResourceGroup/providers/Microsoft.Network/virtualNetworks/MockedNetworkId/subnets/MockedSubNetId" + validators._validate_subnet_id(valid_subnet_id, "something") + + def test_none_vnet_subnet_id(self): + validators._validate_subnet_id(None, "something") + + def test_empty_vnet_subnet_id(self): + validators._validate_subnet_id("", "something") + + +class MaxSurgeNamespace: + def __init__(self, max_surge): + self.max_surge = max_surge + + +class SpotMaxPriceNamespace: + def __init__(self, spot_max_price): + self.priority = "Spot" + self.spot_max_price = spot_max_price + + +class TestMaxSurge(unittest.TestCase): + def test_valid_cases(self): + valid = ["5", "33%", "1", "100%"] + for v in valid: + validators.validate_max_surge(MaxSurgeNamespace(v)) + + def test_throws_on_string(self): + with self.assertRaises(CLIError) as cm: + validators.validate_max_surge(MaxSurgeNamespace("foobar")) + self.assertTrue('int or percentage' in str(cm.exception), msg=str(cm.exception)) + + def test_throws_on_negative(self): + with self.assertRaises(CLIError) as cm: + validators.validate_max_surge(MaxSurgeNamespace("-3")) + self.assertTrue('positive' in str(cm.exception), msg=str(cm.exception)) + + +class TestSpotMaxPrice(unittest.TestCase): + def test_valid_cases(self): + valid = [5, 5.12345, -1.0, 0.068, 0.071, 5.00000000] + for v in valid: + validators.validate_spot_max_price(SpotMaxPriceNamespace(v)) + + def test_throws_if_more_than_5(self): + with self.assertRaises(CLIError) as cm: + validators.validate_spot_max_price(SpotMaxPriceNamespace(5.123456)) + self.assertTrue('--spot_max_price can only include up to 5 decimal places' in str(cm.exception), msg=str(cm.exception)) + + def test_throws_if_non_valid_negative(self): + with self.assertRaises(CLIError) as cm: + validators.validate_spot_max_price(SpotMaxPriceNamespace(-2)) + self.assertTrue('--spot_max_price can only be any decimal value greater than zero, or -1 which indicates' in str(cm.exception), msg=str(cm.exception)) + with self.assertRaises(CLIError) as cm: + validators.validate_spot_max_price(SpotMaxPriceNamespace(0)) + self.assertTrue('--spot_max_price can only be any decimal value greater than zero, or -1 which indicates' in str(cm.exception), msg=str(cm.exception)) + + def test_throws_if_input_max_price_for_regular(self): + ns = SpotMaxPriceNamespace(2) + ns.priority = "Regular" + with self.assertRaises(CLIError) as cm: + validators.validate_spot_max_price(ns) + self.assertTrue('--spot_max_price can only be set when --priority is Spot' in str(cm.exception), msg=str(cm.exception)) + + +class ValidateAddonsNamespace: + def __init__(self, addons): + self.addons = addons + + +class TestValidateAddons(unittest.TestCase): + def test_correct_addon(self): + addons = list(ADDONS) + if len(addons) > 0: + first_addon = addons[0] + namespace1 = ValidateAddonsNamespace(first_addon) + + try: + validators.validate_addons(namespace1) + except CLIError: + self.fail("validate_addons failed unexpectedly with CLIError") + + def test_validate_addons(self): + addons = list(ADDONS) + if len(addons) > 0: + first_addon = addons[0] + midlen = int(len(first_addon) / 2) + + namespace = ValidateAddonsNamespace( + first_addon[:midlen] + first_addon[midlen + 1:]) + self.assertRaises(CLIError, validators.validate_addons, namespace) + + def test_no_addon_match(self): + namespace = ValidateAddonsNamespace("qfrnmjk") + + self.assertRaises(CLIError, validators.validate_addons, namespace) + + +class AssignIdentityNamespace: + def __init__(self, assign_identity): + self.assign_identity = assign_identity + + +class TestAssignIdentity(unittest.TestCase): + def test_invalid_identity_id(self): + invalid_identity_id = "dummy identity id" + namespace = AssignIdentityNamespace(invalid_identity_id) + err = ("--assign-identity is not a valid Azure resource ID.") + + with self.assertRaises(CLIError) as cm: + validators.validate_assign_identity(namespace) + self.assertEqual(str(cm.exception), err) + + def test_valid_identity_id(self): + valid_identity_id = "/subscriptions/testid/resourceGroups/MockedResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mockIdentityID" + namespace = AssignIdentityNamespace(valid_identity_id) + validators.validate_assign_identity(namespace) + + def test_none_identity_id(self): + none_identity_id = None + namespace = AssignIdentityNamespace(none_identity_id) + validators.validate_assign_identity(namespace) + + def test_empty_identity_id(self): + empty_identity_id = "" + namespace = AssignIdentityNamespace(empty_identity_id) + validators.validate_assign_identity(namespace) + + +class PodIdentityNamespace: + + def __init__(self, identity_name): + self.identity_name = identity_name + + +class TestValidatePodIdentityResourceName(unittest.TestCase): + + def test_valid_required_resource_name(self): + validator = validators.validate_pod_identity_resource_name('identity_name', required=True) + namespace = PodIdentityNamespace('test-name') + validator(namespace) + + def test_missing_required_resource_name(self): + validator = validators.validate_pod_identity_resource_name('identity_name', required=True) + namespace = PodIdentityNamespace(None) + + with self.assertRaises(CLIError) as cm: + validator(namespace) + self.assertEqual(str(cm.exception), '--name is required') + + +class PodIdentityResourceNamespace: + + def __init__(self, namespace): + self.namespace = namespace + + +class TestValidatePodIdentityResourceNamespace(unittest.TestCase): + + def test_valid_required_resource_name(self): + namespace = PodIdentityResourceNamespace('test-name') + validators.validate_pod_identity_resource_namespace(namespace) + + def test_missing_required_resource_name(self): + namespace = PodIdentityResourceNamespace(None) + + with self.assertRaises(CLIError) as cm: + validators.validate_pod_identity_resource_namespace(namespace) + self.assertEqual(str(cm.exception), '--namespace is required') + + +if __name__ == "__main__": + unittest.main() diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_helpers.py b/src/aks-preview/azext_aks_preview/tests/latest/test_helpers.py index c4630f3b40e..c1f9db6b19b 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_helpers.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_helpers.py @@ -4,18 +4,55 @@ # -------------------------------------------------------------------------------------------- import unittest +from unittest import mock + +from knack import CLI + +from azure.cli.core._config import GLOBAL_CONFIG_DIR, ENV_VAR_PREFIX +from azure.cli.core.cloud import get_active_cloud +from azure.cli.core.profiles import get_sdk, ResourceType, supported_api_version + import azext_aks_preview._helpers as helpers +class MockCLI(CLI): + def __init__(self): + super(MockCLI, self).__init__(cli_name='mock_cli', config_dir=GLOBAL_CONFIG_DIR, + config_env_var_prefix=ENV_VAR_PREFIX, commands_loader_cls=MockLoader) + self.cloud = get_active_cloud(self) + + +class MockLoader(object): + def __init__(self, ctx): + self.ctx = ctx + + def get_models(self, *attr_args, **_): + from azure.cli.core.profiles import get_sdk + return get_sdk(self.ctx, ResourceType.MGMT_CONTAINERSERVICE, 'ManagedClusterAPIServerAccessProfile', + mod='models', operation_group='managed_clusters') + + +class MockCmd(object): + def __init__(self, ctx, arguments={}): + self.cli_ctx = ctx + self.loader = MockLoader(self.cli_ctx) + self.arguments = arguments + + def get_models(self, *attr_args, **kwargs): + return get_sdk(self.cli_ctx, ResourceType.MGMT_CONTAINERSERVICE, 'ManagedClusterAPIServerAccessProfile', + mod='models', operation_group='managed_clusters') class TestPopulateApiServerAccessProfile(unittest.TestCase): + def setUp(self): + self.cli = MockCLI() + def test_single_cidr_with_spaces(self): api_server_authorized_ip_ranges = "0.0.0.0/32 " - profile = helpers._populate_api_server_access_profile(api_server_authorized_ip_ranges) + profile = helpers._populate_api_server_access_profile(MockCmd(self.cli), api_server_authorized_ip_ranges) self.assertListEqual(profile.authorized_ip_ranges, ["0.0.0.0/32"]) def test_multi_cidr_with_spaces(self): api_server_authorized_ip_ranges = " 0.0.0.0/32 , 129.1.1.1/32" - profile = helpers._populate_api_server_access_profile(api_server_authorized_ip_ranges) + profile = helpers._populate_api_server_access_profile(MockCmd(self.cli), api_server_authorized_ip_ranges) self.assertListEqual(profile.authorized_ip_ranges, ["0.0.0.0/32", "129.1.1.1/32"]) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py b/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py index 9850a3923e0..c0ad23f8af2 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py @@ -3,17 +3,25 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- import unittest +from unittest import mock -from azure.mgmt.containerservice.v2019_11_01.models import ManagedClusterLoadBalancerProfile -from azure.mgmt.containerservice.v2019_11_01.models import ManagedClusterLoadBalancerProfileManagedOutboundIPs -from azure.mgmt.containerservice.v2019_11_01.models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes -from azure.mgmt.containerservice.v2019_11_01.models import ManagedClusterLoadBalancerProfileOutboundIPs +from knack import CLI + +from azure.cli.core._config import GLOBAL_CONFIG_DIR, ENV_VAR_PREFIX +from azure.cli.core.cloud import get_active_cloud +from azure.cli.core.profiles import get_sdk, ResourceType, supported_api_version + +from azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterLoadBalancerProfile +from azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterLoadBalancerProfileManagedOutboundIPs +from azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes +from azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.v2021_08_01.models import ManagedClusterLoadBalancerProfileOutboundIPs from azure.cli.core.util import CLIError from azext_aks_preview import _loadbalancer as loadbalancer class TestLoadBalancer(unittest.TestCase): def test_configure_load_balancer_profile(self): + cmd = mock.MagicMock() managed_outbound_ip_count = 5 outbound_ips = None outbound_ip_prefixes = None @@ -33,7 +41,7 @@ def test_configure_load_balancer_profile(self): public_ip_prefixes="public_ip_prefixes" ) - p = loadbalancer.configure_load_balancer_profile(managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile) + p = loadbalancer.configure_load_balancer_profile(cmd, managed_outbound_ip_count, outbound_ips, outbound_ip_prefixes, outbound_ports, idle_timeout, profile) # ips -> i_ps due to track 2 naming issue self.assertIsNotNone(p.managed_outbound_i_ps) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py b/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py index ed09fb97f52..9709008aace 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py @@ -3,10 +3,44 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- import unittest +from unittest import mock + +from knack import CLI + +from azure.cli.core._config import GLOBAL_CONFIG_DIR, ENV_VAR_PREFIX +from azure.cli.core.cloud import get_active_cloud +from azure.cli.core.profiles import get_sdk, ResourceType, supported_api_version + from azure.cli.core.util import CLIError import azext_aks_preview._validators as validators from azext_aks_preview._consts import ADDONS +class MockCLI(CLI): + def __init__(self): + super(MockCLI, self).__init__(cli_name='mock_cli', config_dir=GLOBAL_CONFIG_DIR, + config_env_var_prefix=ENV_VAR_PREFIX, commands_loader_cls=MockLoader) + self.cloud = get_active_cloud(self) + + +class MockLoader(object): + def __init__(self, ctx): + self.ctx = ctx + + def get_models(self, *attr_args, **_): + from azure.cli.core.profiles import get_sdk + return get_sdk(self.ctx, ResourceType.MGMT_CONTAINERSERVICE, 'ManagedClusterPropertiesAutoScalerProfile', + mod='models', operation_group='managed_clusters') + + +class MockCmd(object): + def __init__(self, ctx, arguments={}): + self.cli_ctx = ctx + self.loader = MockLoader(self.cli_ctx) + self.arguments = arguments + + def get_models(self, *attr_args, **kwargs): + return get_sdk(self.cli_ctx, ResourceType.MGMT_CONTAINERSERVICE, 'ManagedClusterPropertiesAutoScalerProfile', + mod='models', operation_group='managed_clusters') class TestValidateIPRanges(unittest.TestCase): def test_simultaneous_allow_and_disallow_with_spaces(self): @@ -63,20 +97,23 @@ def test_IPv6(self): class TestClusterAutoscalerParamsValidators(unittest.TestCase): + def setUp(self): + self.cli = MockCLI() + def test_empty_key_empty_value(self): cluster_autoscaler_profile = ["="] namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) err = "Empty key specified for cluster-autoscaler-profile" with self.assertRaises(CLIError) as cm: - validators.validate_cluster_autoscaler_profile(namespace) + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) self.assertEqual(str(cm.exception), err) def test_non_empty_key_empty_value(self): cluster_autoscaler_profile = ["scan-interval="] namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) - validators.validate_cluster_autoscaler_profile(namespace) + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) def test_two_empty_keys_empty_value(self): cluster_autoscaler_profile = ["=", "="] @@ -84,7 +121,7 @@ def test_two_empty_keys_empty_value(self): err = "Empty key specified for cluster-autoscaler-profile" with self.assertRaises(CLIError) as cm: - validators.validate_cluster_autoscaler_profile(namespace) + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) self.assertEqual(str(cm.exception), err) def test_one_empty_key_in_pair_one_non_empty(self): @@ -93,7 +130,7 @@ def test_one_empty_key_in_pair_one_non_empty(self): err = "Empty key specified for cluster-autoscaler-profile" with self.assertRaises(CLIError) as cm: - validators.validate_cluster_autoscaler_profile(namespace) + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) self.assertEqual(str(cm.exception), err) def test_invalid_key(self): @@ -102,14 +139,14 @@ def test_invalid_key(self): err = "Invalid key specified for cluster-autoscaler-profile: bad-key" with self.assertRaises(CLIError) as cm: - validators.validate_cluster_autoscaler_profile(namespace) + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) self.assertEqual(str(cm.exception), err) def test_valid_parameters(self): cluster_autoscaler_profile = ["scan-interval=20s", "scale-down-delay-after-add=15m"] namespace = Namespace(cluster_autoscaler_profile=cluster_autoscaler_profile) - validators.validate_cluster_autoscaler_profile(namespace) + validators.validate_cluster_autoscaler_profile(MockCmd(self.cli), namespace) class Namespace: diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py new file mode 100644 index 00000000000..eb3d7ba7a26 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py new file mode 100644 index 00000000000..eb477462452 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2020-11-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py new file mode 100644 index 00000000000..eae3d62eaf3 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/_container_service_client.py @@ -0,0 +1,95 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import AgentPoolsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ResolvePrivateLinkServiceIdOperations +from . import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2020_11_01.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2020_11_01.operations.ManagedClustersOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2020_11_01.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_11_01.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.containerservice.v2020_11_01.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_11_01.operations.ResolvePrivateLinkServiceIdOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/__init__.py new file mode 100644 index 00000000000..4ad2bb20096 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/_configuration.py new file mode 100644 index 00000000000..aa250c6ba1d --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2020-11-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/_container_service_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/_container_service_client.py new file mode 100644 index 00000000000..7639433606c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/_container_service_client.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import AgentPoolsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ResolvePrivateLinkServiceIdOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2020_11_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2020_11_01.aio.operations.ManagedClustersOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2020_11_01.aio.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerservice.v2020_11_01.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.containerservice.v2020_11_01.aio.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2020_11_01.aio.operations.ResolvePrivateLinkServiceIdOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/__init__.py new file mode 100644 index 00000000000..653c0387002 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._agent_pools_operations import AgentPoolsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations + +__all__ = [ + 'Operations', + 'ManagedClustersOperations', + 'AgentPoolsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'ResolvePrivateLinkServiceIdOperations', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_agent_pools_operations.py new file mode 100644 index 00000000000..cc45a97658d --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_agent_pools_operations.py @@ -0,0 +1,689 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations: + """AgentPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> AsyncIterable["_models.AgentPoolListResult"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs + ) -> "_models.AgentPool": + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs + ) -> "_models.AgentPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", + **kwargs + ) -> AsyncLROPoller["_models.AgentPool"]: + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs + ) -> "_models.AgentPoolUpgradeProfile": + """Gets upgrade profile for an agent pool. + + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore + + async def get_available_agent_pool_versions( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.AgentPoolAvailableVersions": + """Gets a list of supported versions for the specified agent pool. + + Gets a list of supported versions for the specified agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore + + async def _upgrade_node_image_version_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs + ) -> Optional["_models.AgentPool"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + async def begin_upgrade_node_image_version( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs + ) -> AsyncLROPoller["_models.AgentPool"]: + """Upgrade node image version of an agent pool to the latest. + + Upgrade node image version of an agent pool to the latest. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_managed_clusters_operations.py new file mode 100644 index 00000000000..17ccd29481c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_managed_clusters_operations.py @@ -0,0 +1,1495 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations: + """ManagedClustersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + async def get_upgrade_profile( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.ManagedClusterUpgradeProfile": + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + async def get_access_profile( + self, + resource_group_name: str, + resource_name: str, + role_name: str, + **kwargs + ) -> "_models.ManagedClusterAccessProfile": + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials `_ or `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + async def list_cluster_admin_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.CredentialResults": + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + async def list_cluster_user_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.CredentialResults": + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + async def list_cluster_monitoring_user_credentials( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.CredentialResults": + """Gets cluster monitoring user credential of a managed cluster. + + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.ManagedCluster": + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedCluster", + **kwargs + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + async def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def begin_reset_service_principal_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", + **kwargs + ) -> AsyncLROPoller[None]: + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + async def _reset_aad_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def begin_reset_aad_profile( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", + **kwargs + ) -> AsyncLROPoller[None]: + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + async def _rotate_cluster_certificates_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def begin_rotate_cluster_certificates( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Rotate certificates of a managed cluster. + + Rotate certificates of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + async def _stop_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def begin_stop( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Stop Managed Cluster. + + Stops a Running Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + async def _start_initial( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore + + async def begin_start( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Start Managed Cluster. + + Starts a Stopped Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_operations.py new file mode 100644 index 00000000000..b73d747eee1 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2020_11_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 00000000000..f8de685f0f4 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,357 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.PrivateEndpointConnectionListResult": + """Gets a list of private endpoint connections in the specified managed cluster. + + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> "_models.PrivateEndpointConnection": + """Gets the private endpoint connection. + + Gets the details of the private endpoint connection by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs + ) -> "_models.PrivateEndpointConnection": + """Updates a private endpoint connection. + + Updates a private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection. + + Deletes the private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_private_link_resources_operations.py new file mode 100644 index 00000000000..7cf59cd9ad1 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs + ) -> "_models.PrivateLinkResourcesListResult": + """Gets a list of private link resources in the specified managed cluster. + + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py new file mode 100644 index 00000000000..c85ec849848 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResolvePrivateLinkServiceIdOperations: + """ResolvePrivateLinkServiceIdOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.PrivateLinkResource", + **kwargs + ) -> "_models.PrivateLinkResource": + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py new file mode 100644 index 00000000000..eb2cdef3da4 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/__init__.py @@ -0,0 +1,256 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AgentPool + from ._models_py3 import AgentPoolAvailableVersions + from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + from ._models_py3 import AgentPoolListResult + from ._models_py3 import AgentPoolUpgradeProfile + from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem + from ._models_py3 import AgentPoolUpgradeSettings + from ._models_py3 import CloudError + from ._models_py3 import CloudErrorBody + from ._models_py3 import Components1Q1Og48SchemasManagedclusterAllof1 + from ._models_py3 import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties + from ._models_py3 import ContainerServiceDiagnosticsProfile + from ._models_py3 import ContainerServiceLinuxProfile + from ._models_py3 import ContainerServiceMasterProfile + from ._models_py3 import ContainerServiceNetworkProfile + from ._models_py3 import ContainerServiceSshConfiguration + from ._models_py3 import ContainerServiceSshPublicKey + from ._models_py3 import ContainerServiceVMDiagnostics + from ._models_py3 import CredentialResult + from ._models_py3 import CredentialResults + from ._models_py3 import KubeletConfig + from ._models_py3 import LinuxOSConfig + from ._models_py3 import ManagedCluster + from ._models_py3 import ManagedClusterAADProfile + from ._models_py3 import ManagedClusterAPIServerAccessProfile + from ._models_py3 import ManagedClusterAccessProfile + from ._models_py3 import ManagedClusterAddonProfile + from ._models_py3 import ManagedClusterAddonProfileIdentity + from ._models_py3 import ManagedClusterAgentPoolProfile + from ._models_py3 import ManagedClusterAgentPoolProfileProperties + from ._models_py3 import ManagedClusterAutoUpgradeProfile + from ._models_py3 import ManagedClusterIdentity + from ._models_py3 import ManagedClusterListResult + from ._models_py3 import ManagedClusterLoadBalancerProfile + from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs + from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes + from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs + from ._models_py3 import ManagedClusterPodIdentity + from ._models_py3 import ManagedClusterPodIdentityException + from ._models_py3 import ManagedClusterPodIdentityProfile + from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo + from ._models_py3 import ManagedClusterPoolUpgradeProfile + from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem + from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile + from ._models_py3 import ManagedClusterSKU + from ._models_py3 import ManagedClusterServicePrincipalProfile + from ._models_py3 import ManagedClusterUpgradeProfile + from ._models_py3 import ManagedClusterWindowsProfile + from ._models_py3 import OperationListResult + from ._models_py3 import OperationValue + from ._models_py3 import PowerState + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourcesListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import Resource + from ._models_py3 import ResourceReference + from ._models_py3 import SubResource + from ._models_py3 import SysctlConfig + from ._models_py3 import TagsObject + from ._models_py3 import UserAssignedIdentity +except (SyntaxError, ImportError): + from ._models import AgentPool # type: ignore + from ._models import AgentPoolAvailableVersions # type: ignore + from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem # type: ignore + from ._models import AgentPoolListResult # type: ignore + from ._models import AgentPoolUpgradeProfile # type: ignore + from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem # type: ignore + from ._models import AgentPoolUpgradeSettings # type: ignore + from ._models import CloudError # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import Components1Q1Og48SchemasManagedclusterAllof1 # type: ignore + from ._models import Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceNetworkProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import KubeletConfig # type: ignore + from ._models import LinuxOSConfig # type: ignore + from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterAADProfile # type: ignore + from ._models import ManagedClusterAPIServerAccessProfile # type: ignore + from ._models import ManagedClusterAccessProfile # type: ignore + from ._models import ManagedClusterAddonProfile # type: ignore + from ._models import ManagedClusterAddonProfileIdentity # type: ignore + from ._models import ManagedClusterAgentPoolProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfileProperties # type: ignore + from ._models import ManagedClusterAutoUpgradeProfile # type: ignore + from ._models import ManagedClusterIdentity # type: ignore + from ._models import ManagedClusterListResult # type: ignore + from ._models import ManagedClusterLoadBalancerProfile # type: ignore + from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPs # type: ignore + from ._models import ManagedClusterPodIdentity # type: ignore + from ._models import ManagedClusterPodIdentityException # type: ignore + from ._models import ManagedClusterPodIdentityProfile # type: ignore + from ._models import ManagedClusterPodIdentityProvisioningInfo # type: ignore + from ._models import ManagedClusterPoolUpgradeProfile # type: ignore + from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem # type: ignore + from ._models import ManagedClusterPropertiesAutoScalerProfile # type: ignore + from ._models import ManagedClusterSKU # type: ignore + from ._models import ManagedClusterServicePrincipalProfile # type: ignore + from ._models import ManagedClusterUpgradeProfile # type: ignore + from ._models import ManagedClusterWindowsProfile # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import PowerState # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourcesListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceReference # type: ignore + from ._models import SubResource # type: ignore + from ._models import SysctlConfig # type: ignore + from ._models import TagsObject # type: ignore + from ._models import UserAssignedIdentity # type: ignore + +from ._container_service_client_enums import ( + AgentPoolMode, + AgentPoolType, + Code, + ConnectionStatus, + ContainerServiceStorageProfileTypes, + ContainerServiceVMSizeTypes, + Count, + Expander, + LicenseType, + LoadBalancerSku, + ManagedClusterPodIdentityProvisioningState, + ManagedClusterSKUName, + ManagedClusterSKUTier, + NetworkMode, + NetworkPlugin, + NetworkPolicy, + OSDiskType, + OSType, + OutboundType, + PrivateEndpointConnectionProvisioningState, + ResourceIdentityType, + ScaleSetEvictionPolicy, + ScaleSetPriority, + UpgradeChannel, +) + +__all__ = [ + 'AgentPool', + 'AgentPoolAvailableVersions', + 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', + 'AgentPoolListResult', + 'AgentPoolUpgradeProfile', + 'AgentPoolUpgradeProfilePropertiesUpgradesItem', + 'AgentPoolUpgradeSettings', + 'CloudError', + 'CloudErrorBody', + 'Components1Q1Og48SchemasManagedclusterAllof1', + 'Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties', + 'ContainerServiceDiagnosticsProfile', + 'ContainerServiceLinuxProfile', + 'ContainerServiceMasterProfile', + 'ContainerServiceNetworkProfile', + 'ContainerServiceSshConfiguration', + 'ContainerServiceSshPublicKey', + 'ContainerServiceVMDiagnostics', + 'CredentialResult', + 'CredentialResults', + 'KubeletConfig', + 'LinuxOSConfig', + 'ManagedCluster', + 'ManagedClusterAADProfile', + 'ManagedClusterAPIServerAccessProfile', + 'ManagedClusterAccessProfile', + 'ManagedClusterAddonProfile', + 'ManagedClusterAddonProfileIdentity', + 'ManagedClusterAgentPoolProfile', + 'ManagedClusterAgentPoolProfileProperties', + 'ManagedClusterAutoUpgradeProfile', + 'ManagedClusterIdentity', + 'ManagedClusterListResult', + 'ManagedClusterLoadBalancerProfile', + 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', + 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', + 'ManagedClusterLoadBalancerProfileOutboundIPs', + 'ManagedClusterPodIdentity', + 'ManagedClusterPodIdentityException', + 'ManagedClusterPodIdentityProfile', + 'ManagedClusterPodIdentityProvisioningInfo', + 'ManagedClusterPoolUpgradeProfile', + 'ManagedClusterPoolUpgradeProfileUpgradesItem', + 'ManagedClusterPropertiesAutoScalerProfile', + 'ManagedClusterSKU', + 'ManagedClusterServicePrincipalProfile', + 'ManagedClusterUpgradeProfile', + 'ManagedClusterWindowsProfile', + 'OperationListResult', + 'OperationValue', + 'PowerState', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourcesListResult', + 'PrivateLinkServiceConnectionState', + 'Resource', + 'ResourceReference', + 'SubResource', + 'SysctlConfig', + 'TagsObject', + 'UserAssignedIdentity', + 'AgentPoolMode', + 'AgentPoolType', + 'Code', + 'ConnectionStatus', + 'ContainerServiceStorageProfileTypes', + 'ContainerServiceVMSizeTypes', + 'Count', + 'Expander', + 'LicenseType', + 'LoadBalancerSku', + 'ManagedClusterPodIdentityProvisioningState', + 'ManagedClusterSKUName', + 'ManagedClusterSKUTier', + 'NetworkMode', + 'NetworkPlugin', + 'NetworkPolicy', + 'OSDiskType', + 'OSType', + 'OutboundType', + 'PrivateEndpointConnectionProvisioningState', + 'ResourceIdentityType', + 'ScaleSetEvictionPolicy', + 'ScaleSetPriority', + 'UpgradeChannel', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py new file mode 100644 index 00000000000..a602a54ecbd --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_container_service_client_enums.py @@ -0,0 +1,382 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgentPoolMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolMode represents mode of an agent pool. + """ + + SYSTEM = "System" + USER = "User" + +class AgentPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """AgentPoolType represents types of an agent pool. + """ + + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + AVAILABILITY_SET = "AvailabilitySet" + +class Code(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tells whether the cluster is Running or Stopped + """ + + RUNNING = "Running" + STOPPED = "Stopped" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private link service connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Storage profile specifies what kind of storage used. Choose from StorageAccount and + ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class Expander(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + LEAST_WASTE = "least-waste" + MOST_PODS = "most-pods" + RANDOM = "random" + +class LicenseType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User + Benefits for Windows VMs. + """ + + NONE = "None" + WINDOWS_SERVER = "Windows_Server" + +class LoadBalancerSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The load balancer sku for the managed cluster. + """ + + STANDARD = "standard" + BASIC = "basic" + +class ManagedClusterPodIdentityProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state of the pod identity. + """ + + ASSIGNED = "Assigned" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class ManagedClusterSKUName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a managed cluster SKU. + """ + + BASIC = "Basic" + +class ManagedClusterSKUTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a managed cluster SKU. + """ + + PAID = "Paid" + FREE = "Free" + +class NetworkMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network mode used for building Kubernetes network. + """ + + TRANSPARENT = "transparent" + BRIDGE = "bridge" + +class NetworkPlugin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network plugin used for building Kubernetes network. + """ + + AZURE = "azure" + KUBENET = "kubenet" + +class NetworkPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network policy used for building Kubernetes network. + """ + + CALICO = "calico" + AZURE = "azure" + +class OSDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OSDiskType represents the type of an OS disk on an agent pool. + """ + + MANAGED = "Managed" + EPHEMERAL = "Ephemeral" + +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + +class OutboundType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The outbound (egress) routing method. + """ + + LOAD_BALANCER = "loadBalancer" + USER_DEFINED_ROUTING = "userDefinedRouting" + +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly + created identity in master components and an auto-created user assigned identity in MC_ + resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service + principal will be used instead. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + NONE = "None" + +class ScaleSetEvictionPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale + set. Default to Delete. + """ + + DELETE = "Delete" + DEALLOCATE = "Deallocate" + +class ScaleSetPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. + """ + + SPOT = "Spot" + REGULAR = "Regular" + +class UpgradeChannel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """upgrade channel for auto upgrade. + """ + + RAPID = "rapid" + STABLE = "stable" + PATCH = "patch" + NONE = "none" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py new file mode 100644 index 00000000000..207a93291b7 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models.py @@ -0,0 +1,3037 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import msrest.serialization + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. + :type vnet_subnet_id: str + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. + :type pod_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or + ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar node_image_version: Version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. + :type availability_zones: list[str] + :param enable_node_public_ip: Enable public IP for nodes. + :type enable_node_public_ip: bool + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. + :type spot_max_price: float + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. + :type tags: dict[str, str] + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, + 'min_count': {'key': 'properties.minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, + 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'properties.tags', 'type': '{str}'}, + 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPool, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.os_disk_type = kwargs.get('os_disk_type', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.pod_subnet_id = kwargs.get('pod_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") + self.max_count = kwargs.get('max_count', None) + self.min_count = kwargs.get('min_count', None) + self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) + self.type_properties_type = kwargs.get('type_properties_type', None) + self.mode = kwargs.get('mode', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.node_image_version = None + self.upgrade_settings = kwargs.get('upgrade_settings', None) + self.provisioning_state = None + self.power_state = None + self.availability_zones = kwargs.get('availability_zones', None) + self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) + self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") + self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") + self.spot_max_price = kwargs.get('spot_max_price', -1) + self.tags = kwargs.get('tags', None) + self.node_labels = kwargs.get('node_labels', None) + self.node_taints = kwargs.get('node_taints', None) + self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) + self.kubelet_config = kwargs.get('kubelet_config', None) + self.linux_os_config = kwargs.get('linux_os_config', None) + + +class AgentPoolAvailableVersions(msrest.serialization.Model): + """The list of available versions for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Id of the agent pool available versions. + :vartype id: str + :ivar name: Name of the agent pool available versions. + :vartype name: str + :ivar type: Type of the agent pool available versions. + :vartype type: str + :param agent_pool_versions: List of versions available for agent pool. + :type agent_pool_versions: + list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolAvailableVersions, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.agent_pool_versions = kwargs.get('agent_pool_versions', None) + + +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): + """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + + :param default: Whether this version is the default agent pool version. + :type default: bool + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'default': {'key': 'default', 'type': 'bool'}, + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) + self.default = kwargs.get('default', None) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.is_preview = kwargs.get('is_preview', None) + + +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of the agent pool upgrade profile. + :vartype id: str + :ivar name: Name of the agent pool upgrade profile. + :vartype name: str + :ivar type: Type of the agent pool upgrade profile. + :vartype type: str + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. + :type latest_node_image_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, + 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kubernetes_version = kwargs['kubernetes_version'] + self.os_type = kwargs.get('os_type', "Linux") + self.upgrades = kwargs.get('upgrades', None) + self.latest_node_image_version = kwargs.get('latest_node_image_version', None) + + +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): + """AgentPoolUpgradeProfilePropertiesUpgradesItem. + + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.is_preview = kwargs.get('is_preview', None) + + +class AgentPoolUpgradeSettings(msrest.serialization.Model): + """Settings for upgrading an agentpool. + + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. + :type max_surge: str + """ + + _attribute_map = { + 'max_surge': {'key': 'maxSurge', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolUpgradeSettings, self).__init__(**kwargs) + self.max_surge = kwargs.get('max_surge', None) + + +class CloudError(msrest.serialization.Model): + """An error response from the Container service. + + :param error: Details about the error. + :type error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the Container service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.private_fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.pod_identity_profile = kwargs.get('pod_identity_profile', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) + self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) + self.api_server_access_profile = kwargs.get('api_server_access_profile', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.identity_profile = kwargs.get('identity_profile', None) + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(**kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = kwargs['vm_diagnostics'] + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2020_11_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") + self.storage_profile = kwargs.get('storage_profile', None) + self.fqdn = None + + +class ContainerServiceNetworkProfile(msrest.serialization.Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2020_11_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :type docker_bridge_cidr: str + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2020_11_01.models.LoadBalancerSku + :param load_balancer_profile: Profile of the cluster load balancer. + :type load_balancer_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfile + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'network_mode': {'key': 'networkMode', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + 'outbound_type': {'key': 'outboundType', 'type': 'str'}, + 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, + 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = kwargs.get('network_plugin', "kubenet") + self.network_policy = kwargs.get('network_policy', None) + self.network_mode = kwargs.get('network_mode', None) + self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") + self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") + self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") + self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") + self.outbound_type = kwargs.get('outbound_type', "loadBalancer") + self.load_balancer_sku = kwargs.get('load_balancer_sku', None) + self.load_balancer_profile = kwargs.get('load_balancer_profile', None) + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs['public_keys'] + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = kwargs['key_data'] + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.storage_uri = None + + +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2020_11_01.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.kubeconfigs = None + + +class KubeletConfig(msrest.serialization.Model): + """Kubelet configurations of agent nodes. + + :param cpu_manager_policy: CPU Manager policy to use. + :type cpu_manager_policy: str + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. + :type cpu_cfs_quota: bool + :param cpu_cfs_quota_period: Sets CPU CFS quota period value. + :type cpu_cfs_quota_period: str + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. + :type image_gc_high_threshold: int + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. + :type image_gc_low_threshold: int + :param topology_manager_policy: Topology Manager policy to use. + :type topology_manager_policy: str + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). + :type allowed_unsafe_sysctls: list[str] + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. + :type fail_swap_on: bool + """ + + _attribute_map = { + 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, + 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, + 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, + 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, + 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, + 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, + 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, + 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(KubeletConfig, self).__init__(**kwargs) + self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) + self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) + self.cpu_cfs_quota_period = kwargs.get('cpu_cfs_quota_period', None) + self.image_gc_high_threshold = kwargs.get('image_gc_high_threshold', None) + self.image_gc_low_threshold = kwargs.get('image_gc_low_threshold', None) + self.topology_manager_policy = kwargs.get('topology_manager_policy', None) + self.allowed_unsafe_sysctls = kwargs.get('allowed_unsafe_sysctls', None) + self.fail_swap_on = kwargs.get('fail_swap_on', None) + + +class LinuxOSConfig(msrest.serialization.Model): + """OS configurations of Linux agent nodes. + + :param sysctls: Sysctl settings for Linux agent nodes. + :type sysctls: ~azure.mgmt.containerservice.v2020_11_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. + :type transparent_huge_page_enabled: str + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. + :type transparent_huge_page_defrag: str + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. + :type swap_file_size_mb: int + """ + + _attribute_map = { + 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, + 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, + 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, + 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(LinuxOSConfig, self).__init__(**kwargs) + self.sysctls = kwargs.get('sysctls', None) + self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) + self.transparent_huge_page_defrag = kwargs.get('transparent_huge_page_defrag', None) + self.swap_file_size_mb = kwargs.get('swap_file_size_mb', None) + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): + """Managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The managed cluster SKU. + :type sku: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKU + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedCluster, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn = None + self.private_fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.pod_identity_profile = kwargs.get('pod_identity_profile', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) + self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) + self.api_server_access_profile = kwargs.get('api_server_access_profile', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.identity_profile = kwargs.get('identity_profile', None) + self.sku = kwargs.get('sku', None) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class ManagedClusterAADProfile(msrest.serialization.Model): + """AADProfile specifies attributes for Azure Active Directory integration. + + :param managed: Whether to enable managed AAD. + :type managed: bool + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. + :type enable_azure_rbac: bool + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] + :param client_app_id: The client AAD application ID. + :type client_app_id: str + :param server_app_id: The server AAD application ID. + :type server_app_id: str + :param server_app_secret: The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :type tenant_id: str + """ + + _attribute_map = { + 'managed': {'key': 'managed', 'type': 'bool'}, + 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.managed = kwargs.get('managed', None) + self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) + self.admin_group_object_i_ds = kwargs.get('admin_group_object_i_ds', None) + self.client_app_id = kwargs.get('client_app_id', None) + self.server_app_id = kwargs.get('server_app_id', None) + self.server_app_secret = kwargs.get('server_app_secret', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAccessProfile, self).__init__(**kwargs) + self.kube_config = kwargs.get('kube_config', None) + + +class ManagedClusterAddonProfile(msrest.serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + :ivar identity: Information of user assigned identity used by this add-on. + :vartype identity: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfileIdentity + """ + + _validation = { + 'enabled': {'required': True}, + 'identity': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.config = kwargs.get('config', None) + self.identity = None + + +class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): + """Information of user assigned identity used by this add-on. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) + + +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. + :type vnet_subnet_id: str + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. + :type pod_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar node_image_version: Version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. + :type availability_zones: list[str] + :param enable_node_public_ip: Enable public IP for nodes. + :type enable_node_public_ip: bool + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. + :type spot_max_price: float + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. + :type tags: dict[str, str] + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig + """ + + _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, + 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.os_disk_type = kwargs.get('os_disk_type', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.pod_subnet_id = kwargs.get('pod_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") + self.max_count = kwargs.get('max_count', None) + self.min_count = kwargs.get('min_count', None) + self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) + self.type = kwargs.get('type', None) + self.mode = kwargs.get('mode', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.node_image_version = None + self.upgrade_settings = kwargs.get('upgrade_settings', None) + self.provisioning_state = None + self.power_state = None + self.availability_zones = kwargs.get('availability_zones', None) + self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) + self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") + self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") + self.spot_max_price = kwargs.get('spot_max_price', -1) + self.tags = kwargs.get('tags', None) + self.node_labels = kwargs.get('node_labels', None) + self.node_taints = kwargs.get('node_taints', None) + self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) + self.kubelet_config = kwargs.get('kubelet_config', None) + self.linux_os_config = kwargs.get('linux_os_config', None) + + +class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. + :type vnet_subnet_id: str + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. + :type pod_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar node_image_version: Version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. + :type availability_zones: list[str] + :param enable_node_public_ip: Enable public IP for nodes. + :type enable_node_public_ip: bool + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. + :type spot_max_price: float + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. + :type tags: dict[str, str] + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + """ + + _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, + 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): + """Access profile for managed cluster API server. + + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. + :type authorized_ip_ranges: list[str] + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. + :type enable_private_cluster: bool + :param private_dns_zone: Private dns zone mode for private cluster. + :type private_dns_zone: str + """ + + _attribute_map = { + 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, + 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, + 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) + self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) + self.enable_private_cluster = kwargs.get('enable_private_cluster', None) + self.private_dns_zone = kwargs.get('private_dns_zone', None) + + +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): + """Auto upgrade profile for a managed cluster. + + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2020_11_01.models.UpgradeChannel + """ + + _attribute_map = { + 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) + self.upgrade_channel = kwargs.get('upgrade_channel', None) + + +class ManagedClusterIdentity(msrest.serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2020_11_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): + """Profile of the managed cluster load balancer. + + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. + :type outbound_ip_prefixes: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPs + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. + :type allocated_outbound_ports: int + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. + :type idle_timeout_in_minutes: int + """ + + _validation = { + 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, + 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, + } + + _attribute_map = { + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) + self.managed_outbound_i_ps = kwargs.get('managed_outbound_i_ps', None) + self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) + self.outbound_i_ps = kwargs.get('outbound_i_ps', None) + self.effective_outbound_i_ps = kwargs.get('effective_outbound_i_ps', None) + self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) + + +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): + """Desired managed outbound IPs for the cluster load balancer. + + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + """ + + _validation = { + 'count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) + self.count = kwargs.get('count', 1) + + +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): + """Desired outbound IP Prefix resources for the cluster load balancer. + + :param public_ip_prefixes: A list of public IP prefix resources. + :type public_ip_prefixes: + list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] + """ + + _attribute_map = { + 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) + self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) + + +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): + """Desired outbound IP resources for the cluster load balancer. + + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] + """ + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) + self.public_i_ps = kwargs.get('public_i_ps', None) + + +class ManagedClusterPodIdentity(msrest.serialization.Model): + """ManagedClusterPodIdentity. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the pod identity. + :type name: str + :param namespace: Required. Namespace of the pod identity. + :type namespace: str + :param identity: Required. Information of the user assigned identity. + :type identity: ~azure.mgmt.containerservice.v2020_11_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningState + :ivar provisioning_info: + :vartype provisioning_info: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningInfo + """ + + _validation = { + 'name': {'required': True}, + 'namespace': {'required': True}, + 'identity': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_info': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentity, self).__init__(**kwargs) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.identity = kwargs['identity'] + self.provisioning_state = None + self.provisioning_info = None + + +class ManagedClusterPodIdentityException(msrest.serialization.Model): + """ManagedClusterPodIdentityException. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the pod identity exception. + :type name: str + :param namespace: Required. Namespace of the pod identity exception. + :type namespace: str + :param pod_labels: Required. Pod labels to match. + :type pod_labels: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'namespace': {'required': True}, + 'pod_labels': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentityException, self).__init__(**kwargs) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.pod_labels = kwargs['pod_labels'] + + +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): + """ManagedClusterPodIdentityProfile. + + :param enabled: Whether the pod identity addon is enabled. + :type enabled: bool + :param user_assigned_identities: User assigned pod identity settings. + :type user_assigned_identities: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentity] + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. + :type user_assigned_identity_exceptions: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityException] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, + 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) + + +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): + """ManagedClusterPodIdentityProvisioningInfo. + + :param error: Pod identity assignment error (if any). + :type error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param name: Pool name. + :type name: str + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kwargs['kubernetes_version'] + self.name = kwargs.get('name', None) + self.os_type = kwargs.get('os_type', "Linux") + self.upgrades = kwargs.get('upgrades', None) + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.is_preview = kwargs.get('is_preview', None) + + +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): + """Parameters to be applied to the cluster-autoscaler when enabled. + + :param balance_similar_node_groups: + :type balance_similar_node_groups: str + :param expander: Possible values include: "least-waste", "most-pods", "random". + :type expander: str or ~azure.mgmt.containerservice.v2020_11_01.models.Expander + :param max_empty_bulk_delete: + :type max_empty_bulk_delete: str + :param max_graceful_termination_sec: + :type max_graceful_termination_sec: str + :param max_total_unready_percentage: + :type max_total_unready_percentage: str + :param new_pod_scale_up_delay: + :type new_pod_scale_up_delay: str + :param ok_total_unready_count: + :type ok_total_unready_count: str + :param scan_interval: + :type scan_interval: str + :param scale_down_delay_after_add: + :type scale_down_delay_after_add: str + :param scale_down_delay_after_delete: + :type scale_down_delay_after_delete: str + :param scale_down_delay_after_failure: + :type scale_down_delay_after_failure: str + :param scale_down_unneeded_time: + :type scale_down_unneeded_time: str + :param scale_down_unready_time: + :type scale_down_unready_time: str + :param scale_down_utilization_threshold: + :type scale_down_utilization_threshold: str + :param skip_nodes_with_local_storage: + :type skip_nodes_with_local_storage: str + :param skip_nodes_with_system_pods: + :type skip_nodes_with_system_pods: str + """ + + _attribute_map = { + 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, + 'expander': {'key': 'expander', 'type': 'str'}, + 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, + 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, + 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, + 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, + 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, + 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, + 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, + 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, + 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, + 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, + 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, + 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, + 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, + 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) + self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) + self.expander = kwargs.get('expander', None) + self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) + self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) + self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) + self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) + self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) + self.scan_interval = kwargs.get('scan_interval', None) + self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) + self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) + self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) + self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) + self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) + self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) + self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) + self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) + + +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs['client_id'] + self.secret = kwargs.get('secret', None) + + +class ManagedClusterSKU(msrest.serialization.Model): + """ManagedClusterSKU. + + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterSKU, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class ManagedClusterUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of upgrade profile. + :vartype id: str + :ivar name: Name of upgrade profile. + :vartype name: str + :ivar type: Type of upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = kwargs['control_plane_profile'] + self.agent_pool_profiles = kwargs['agent_pool_profiles'] + + +class ManagedClusterWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. + :type admin_username: str + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` **Max- + length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :type admin_password: str + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.LicenseType + """ + + _validation = { + 'admin_username': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterWindowsProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.admin_password = kwargs.get('admin_password', None) + self.license_type = kwargs.get('license_type', None) + + +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2020_11_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class PowerState(msrest.serialization.Model): + """Describes the Power State of the cluster. + + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". + :type code: str or ~azure.mgmt.containerservice.v2020_11_01.models.Code + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PowerState, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """Private endpoint which a connection belongs to. + + :param id: The resource Id for private endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointConnection(msrest.serialization.Model): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the private endpoint connection. + :vartype id: str + :ivar name: The name of the private endpoint connection. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionProvisioningState + :param private_endpoint: The resource of private endpoint. + :type private_endpoint: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = None + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + :param value: The collection value. + :type value: list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkResource(msrest.serialization.Model): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: The ID of the private link resource. + :type id: str + :param name: The name of the private link resource. + :type name: str + :param type: The resource type. + :type type: str + :param group_id: The group ID of the resource. + :type group_id: str + :param required_members: RequiredMembers of the resource. + :type required_members: list[str] + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. + :vartype private_link_service_id: str + """ + + _validation = { + 'private_link_service_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.group_id = kwargs.get('group_id', None) + self.required_members = kwargs.get('required_members', None) + self.private_link_service_id = None + + +class PrivateLinkResourcesListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: The collection value. + :type value: list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourcesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """The state of a private link service connection. + + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2020_11_01.models.ConnectionStatus + :param description: The private link service connection description. + :type description: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + + +class ResourceReference(msrest.serialization.Model): + """A reference to an Azure resource. + + :param id: The fully qualified Azure resource id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SysctlConfig(msrest.serialization.Model): + """Sysctl settings for Linux agent nodes. + + :param net_core_somaxconn: Sysctl setting net.core.somaxconn. + :type net_core_somaxconn: int + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. + :type net_core_netdev_max_backlog: int + :param net_core_rmem_max: Sysctl setting net.core.rmem_max. + :type net_core_rmem_max: int + :param net_core_wmem_max: Sysctl setting net.core.wmem_max. + :type net_core_wmem_max: int + :param net_core_optmem_max: Sysctl setting net.core.optmem_max. + :type net_core_optmem_max: int + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. + :type net_ipv4_tcp_max_syn_backlog: int + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. + :type net_ipv4_tcp_max_tw_buckets: int + :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. + :type net_ipv4_tcp_fin_timeout: int + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. + :type net_ipv4_tcp_keepalive_time: int + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. + :type net_ipv4_tcp_keepalive_probes: int + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. + :type net_ipv4_tcpkeepalive_intvl: int + :param net_ipv4_tcp_rmem: Sysctl setting net.ipv4.tcp_rmem. + :type net_ipv4_tcp_rmem: int + :param net_ipv4_tcp_wmem: Sysctl setting net.ipv4.tcp_wmem. + :type net_ipv4_tcp_wmem: int + :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. + :type net_ipv4_tcp_tw_reuse: bool + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. + :type net_ipv4_ip_local_port_range: str + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + :type net_ipv4_neigh_default_gc_thresh1: int + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + :type net_ipv4_neigh_default_gc_thresh2: int + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + :type net_ipv4_neigh_default_gc_thresh3: int + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. + :type net_netfilter_nf_conntrack_max: int + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. + :type net_netfilter_nf_conntrack_buckets: int + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. + :type fs_inotify_max_user_watches: int + :param fs_file_max: Sysctl setting fs.file-max. + :type fs_file_max: int + :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. + :type fs_aio_max_nr: int + :param fs_nr_open: Sysctl setting fs.nr_open. + :type fs_nr_open: int + :param kernel_threads_max: Sysctl setting kernel.threads-max. + :type kernel_threads_max: int + :param vm_max_map_count: Sysctl setting vm.max_map_count. + :type vm_max_map_count: int + :param vm_swappiness: Sysctl setting vm.swappiness. + :type vm_swappiness: int + :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. + :type vm_vfs_cache_pressure: int + """ + + _attribute_map = { + 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, + 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, + 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, + 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, + 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, + 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, + 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, + 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, + 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, + 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, + 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, + 'net_ipv4_tcp_rmem': {'key': 'netIpv4TcpRmem', 'type': 'int'}, + 'net_ipv4_tcp_wmem': {'key': 'netIpv4TcpWmem', 'type': 'int'}, + 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, + 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, + 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, + 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, + 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, + 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, + 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, + 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, + 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, + 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, + 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, + 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, + 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, + 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, + 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SysctlConfig, self).__init__(**kwargs) + self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) + self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) + self.net_core_rmem_max = kwargs.get('net_core_rmem_max', None) + self.net_core_wmem_max = kwargs.get('net_core_wmem_max', None) + self.net_core_optmem_max = kwargs.get('net_core_optmem_max', None) + self.net_ipv4_tcp_max_syn_backlog = kwargs.get('net_ipv4_tcp_max_syn_backlog', None) + self.net_ipv4_tcp_max_tw_buckets = kwargs.get('net_ipv4_tcp_max_tw_buckets', None) + self.net_ipv4_tcp_fin_timeout = kwargs.get('net_ipv4_tcp_fin_timeout', None) + self.net_ipv4_tcp_keepalive_time = kwargs.get('net_ipv4_tcp_keepalive_time', None) + self.net_ipv4_tcp_keepalive_probes = kwargs.get('net_ipv4_tcp_keepalive_probes', None) + self.net_ipv4_tcpkeepalive_intvl = kwargs.get('net_ipv4_tcpkeepalive_intvl', None) + self.net_ipv4_tcp_rmem = kwargs.get('net_ipv4_tcp_rmem', None) + self.net_ipv4_tcp_wmem = kwargs.get('net_ipv4_tcp_wmem', None) + self.net_ipv4_tcp_tw_reuse = kwargs.get('net_ipv4_tcp_tw_reuse', None) + self.net_ipv4_ip_local_port_range = kwargs.get('net_ipv4_ip_local_port_range', None) + self.net_ipv4_neigh_default_gc_thresh1 = kwargs.get('net_ipv4_neigh_default_gc_thresh1', None) + self.net_ipv4_neigh_default_gc_thresh2 = kwargs.get('net_ipv4_neigh_default_gc_thresh2', None) + self.net_ipv4_neigh_default_gc_thresh3 = kwargs.get('net_ipv4_neigh_default_gc_thresh3', None) + self.net_netfilter_nf_conntrack_max = kwargs.get('net_netfilter_nf_conntrack_max', None) + self.net_netfilter_nf_conntrack_buckets = kwargs.get('net_netfilter_nf_conntrack_buckets', None) + self.fs_inotify_max_user_watches = kwargs.get('fs_inotify_max_user_watches', None) + self.fs_file_max = kwargs.get('fs_file_max', None) + self.fs_aio_max_nr = kwargs.get('fs_aio_max_nr', None) + self.fs_nr_open = kwargs.get('fs_nr_open', None) + self.kernel_threads_max = kwargs.get('kernel_threads_max', None) + self.vm_max_map_count = kwargs.get('vm_max_map_count', None) + self.vm_swappiness = kwargs.get('vm_swappiness', None) + self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py new file mode 100644 index 00000000000..79ff6b80d73 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/models/_models_py3.py @@ -0,0 +1,3394 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._container_service_client_enums import * + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. + :type vnet_subnet_id: str + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. + :type pod_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type_properties_type: AgentPoolType represents types of an agent pool. Possible values + include: "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or + ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar node_image_version: Version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. + :type availability_zones: list[str] + :param enable_node_public_ip: Enable public IP for nodes. + :type enable_node_public_ip: bool + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. + :type spot_max_price: float + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. + :type tags: dict[str, str] + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, + 'min_count': {'key': 'properties.minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, + 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'properties.tags', 'type': '{str}'}, + 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, + } + + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type_properties_type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + **kwargs + ): + super(AgentPool, self).__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.os_disk_type = os_disk_type + self.vnet_subnet_id = vnet_subnet_id + self.pod_subnet_id = pod_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.type_properties_type = type_properties_type + self.mode = mode + self.orchestrator_version = orchestrator_version + self.node_image_version = None + self.upgrade_settings = upgrade_settings + self.provisioning_state = None + self.power_state = None + self.availability_zones = availability_zones + self.enable_node_public_ip = enable_node_public_ip + self.scale_set_priority = scale_set_priority + self.scale_set_eviction_policy = scale_set_eviction_policy + self.spot_max_price = spot_max_price + self.tags = tags + self.node_labels = node_labels + self.node_taints = node_taints + self.proximity_placement_group_id = proximity_placement_group_id + self.kubelet_config = kubelet_config + self.linux_os_config = linux_os_config + + +class AgentPoolAvailableVersions(msrest.serialization.Model): + """The list of available versions for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Id of the agent pool available versions. + :vartype id: str + :ivar name: Name of the agent pool available versions. + :vartype name: str + :ivar type: Type of the agent pool available versions. + :vartype type: str + :param agent_pool_versions: List of versions available for agent pool. + :type agent_pool_versions: + list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, + } + + def __init__( + self, + *, + agent_pool_versions: Optional[List["AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, + **kwargs + ): + super(AgentPoolAvailableVersions, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.agent_pool_versions = agent_pool_versions + + +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): + """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + + :param default: Whether this version is the default agent pool version. + :type default: bool + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'default': {'key': 'default', 'type': 'bool'}, + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + default: Optional[bool] = None, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) + self.default = default + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentPool"]] = None, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of the agent pool upgrade profile. + :vartype id: str + :ivar name: Name of the agent pool upgrade profile. + :vartype name: str + :ivar type: Type of the agent pool upgrade profile. + :vartype type: str + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :param latest_node_image_version: LatestNodeImageVersion is the latest AKS supported node image + version. + :type latest_node_image_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, + 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + upgrades: Optional[List["AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + latest_node_image_version: Optional[str] = None, + **kwargs + ): + super(AgentPoolUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kubernetes_version = kubernetes_version + self.os_type = os_type + self.upgrades = upgrades + self.latest_node_image_version = latest_node_image_version + + +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): + """AgentPoolUpgradeProfilePropertiesUpgradesItem. + + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class AgentPoolUpgradeSettings(msrest.serialization.Model): + """Settings for upgrading an agentpool. + + :param max_surge: Count or percentage of additional nodes to be added during upgrade. If empty + uses AKS default. + :type max_surge: str + """ + + _attribute_map = { + 'max_surge': {'key': 'maxSurge', 'type': 'str'}, + } + + def __init__( + self, + *, + max_surge: Optional[str] = None, + **kwargs + ): + super(AgentPoolUpgradeSettings, self).__init__(**kwargs) + self.max_surge = max_surge + + +class CloudError(msrest.serialization.Model): + """An error response from the Container service. + + :param error: Details about the error. + :type error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__( + self, + *, + error: Optional["CloudErrorBody"] = None, + **kwargs + ): + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the Container service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerservice.v2020_11_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Components1Q1Og48SchemasManagedclusterAllof1(msrest.serialization.Model): + """Components1Q1Og48SchemasManagedclusterAllof1. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + } + + def __init__( + self, + *, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + **kwargs + ): + super(Components1Q1Og48SchemasManagedclusterAllof1, self).__init__(**kwargs) + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn = None + self.private_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + + +class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """UserAssignedIdentity. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + self.object_id = object_id + + +class ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(UserAssignedIdentity): + """ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2020_11_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None + + +class ContainerServiceNetworkProfile(msrest.serialization.Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPlugin + :param network_policy: Network policy used for building Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2020_11_01.models.NetworkPolicy + :param network_mode: Network mode used for building Kubernetes network. Possible values + include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2020_11_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :type docker_bridge_cidr: str + :param outbound_type: The outbound (egress) routing method. Possible values include: + "loadBalancer", "userDefinedRouting". Default value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OutboundType + :param load_balancer_sku: The load balancer sku for the managed cluster. Possible values + include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2020_11_01.models.LoadBalancerSku + :param load_balancer_profile: Profile of the cluster load balancer. + :type load_balancer_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfile + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'network_mode': {'key': 'networkMode', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + 'outbound_type': {'key': 'outboundType', 'type': 'str'}, + 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, + 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, + } + + def __init__( + self, + *, + network_plugin: Optional[Union[str, "NetworkPlugin"]] = "kubenet", + network_policy: Optional[Union[str, "NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "NetworkMode"]] = None, + pod_cidr: Optional[str] = "10.244.0.0/16", + service_cidr: Optional[str] = "10.0.0.0/16", + dns_service_ip: Optional[str] = "10.0.0.10", + docker_bridge_cidr: Optional[str] = "172.17.0.1/16", + outbound_type: Optional[Union[str, "OutboundType"]] = "loadBalancer", + load_balancer_sku: Optional[Union[str, "LoadBalancerSku"]] = None, + load_balancer_profile: Optional["ManagedClusterLoadBalancerProfile"] = None, + **kwargs + ): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = network_plugin + self.network_policy = network_policy + self.network_mode = network_mode + self.pod_cidr = pod_cidr + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr + self.outbound_type = outbound_type + self.load_balancer_sku = load_balancer_sku + self.load_balancer_profile = load_balancer_profile + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. Only expect one key specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + *, + key_data: str, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = key_data + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None + + +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2020_11_01.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.kubeconfigs = None + + +class KubeletConfig(msrest.serialization.Model): + """Kubelet configurations of agent nodes. + + :param cpu_manager_policy: CPU Manager policy to use. + :type cpu_manager_policy: str + :param cpu_cfs_quota: Enable CPU CFS quota enforcement for containers that specify CPU limits. + :type cpu_cfs_quota: bool + :param cpu_cfs_quota_period: Sets CPU CFS quota period value. + :type cpu_cfs_quota_period: str + :param image_gc_high_threshold: The percent of disk usage after which image garbage collection + is always run. + :type image_gc_high_threshold: int + :param image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. + :type image_gc_low_threshold: int + :param topology_manager_policy: Topology Manager policy to use. + :type topology_manager_policy: str + :param allowed_unsafe_sysctls: Allowlist of unsafe sysctls or unsafe sysctl patterns (ending in + ``*``\ ). + :type allowed_unsafe_sysctls: list[str] + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. + :type fail_swap_on: bool + """ + + _attribute_map = { + 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, + 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, + 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, + 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, + 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, + 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, + 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, + 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, + } + + def __init__( + self, + *, + cpu_manager_policy: Optional[str] = None, + cpu_cfs_quota: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + allowed_unsafe_sysctls: Optional[List[str]] = None, + fail_swap_on: Optional[bool] = None, + **kwargs + ): + super(KubeletConfig, self).__init__(**kwargs) + self.cpu_manager_policy = cpu_manager_policy + self.cpu_cfs_quota = cpu_cfs_quota + self.cpu_cfs_quota_period = cpu_cfs_quota_period + self.image_gc_high_threshold = image_gc_high_threshold + self.image_gc_low_threshold = image_gc_low_threshold + self.topology_manager_policy = topology_manager_policy + self.allowed_unsafe_sysctls = allowed_unsafe_sysctls + self.fail_swap_on = fail_swap_on + + +class LinuxOSConfig(msrest.serialization.Model): + """OS configurations of Linux agent nodes. + + :param sysctls: Sysctl settings for Linux agent nodes. + :type sysctls: ~azure.mgmt.containerservice.v2020_11_01.models.SysctlConfig + :param transparent_huge_page_enabled: Transparent Huge Page enabled configuration. + :type transparent_huge_page_enabled: str + :param transparent_huge_page_defrag: Transparent Huge Page defrag configuration. + :type transparent_huge_page_defrag: str + :param swap_file_size_mb: SwapFileSizeMB specifies size in MB of a swap file will be created on + each node. + :type swap_file_size_mb: int + """ + + _attribute_map = { + 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, + 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, + 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, + 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, + } + + def __init__( + self, + *, + sysctls: Optional["SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + **kwargs + ): + super(LinuxOSConfig, self).__init__(**kwargs) + self.sysctls = sysctls + self.transparent_huge_page_enabled = transparent_huge_page_enabled + self.transparent_huge_page_defrag = transparent_huge_page_defrag + self.swap_file_size_mb = swap_file_size_mb + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): + """Managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Represents the Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: Version of Kubernetes specified when creating the managed cluster. + :type kubernetes_version: str + :param dns_prefix: DNS prefix specified when creating the managed cluster. + :type dns_prefix: str + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + :ivar private_fqdn: FQDN of private cluster. + :vartype private_fqdn: str + :param agent_pool_profiles: Properties of the agent pool. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: Profile for Linux VMs in the container service cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceLinuxProfile + :param windows_profile: Profile for Windows VMs in the container service cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: Profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: Profile of managed cluster pod identity. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: Name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: Profile of network configuration. + :type network_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceNetworkProfile + :param aad_profile: Profile of Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: Profile of auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: Access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The managed cluster SKU. + :type sku: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKU + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, + } + + def __init__( + self, + *, + location: str, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties"]] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ManagedClusterSKU"] = None, + **kwargs + ): + super(ManagedCluster, self).__init__(location=location, tags=tags, identity=identity, kubernetes_version=kubernetes_version, dns_prefix=dns_prefix, agent_pool_profiles=agent_pool_profiles, linux_profile=linux_profile, windows_profile=windows_profile, service_principal_profile=service_principal_profile, addon_profiles=addon_profiles, pod_identity_profile=pod_identity_profile, node_resource_group=node_resource_group, enable_rbac=enable_rbac, enable_pod_security_policy=enable_pod_security_policy, network_profile=network_profile, aad_profile=aad_profile, auto_upgrade_profile=auto_upgrade_profile, auto_scaler_profile=auto_scaler_profile, api_server_access_profile=api_server_access_profile, disk_encryption_set_id=disk_encryption_set_id, identity_profile=identity_profile, **kwargs) + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn = None + self.private_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + self.sku = sku + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.sku = sku + + +class ManagedClusterAADProfile(msrest.serialization.Model): + """AADProfile specifies attributes for Azure Active Directory integration. + + :param managed: Whether to enable managed AAD. + :type managed: bool + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. + :type enable_azure_rbac: bool + :param admin_group_object_i_ds: AAD group object IDs that will have admin role of the cluster. + :type admin_group_object_i_ds: list[str] + :param client_app_id: The client AAD application ID. + :type client_app_id: str + :param server_app_id: The server AAD application ID. + :type server_app_id: str + :param server_app_secret: The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :type tenant_id: str + """ + + _attribute_map = { + 'managed': {'key': 'managed', 'type': 'bool'}, + 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__( + self, + *, + managed: Optional[bool] = None, + enable_azure_rbac: Optional[bool] = None, + admin_group_object_i_ds: Optional[List[str]] = None, + client_app_id: Optional[str] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.managed = managed + self.enable_azure_rbac = enable_azure_rbac + self.admin_group_object_i_ds = admin_group_object_i_ds + self.client_app_id = client_app_id + self.server_app_id = server_app_id + self.server_app_secret = server_app_secret + self.tenant_id = tenant_id + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytearray] = None, + **kwargs + ): + super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) + self.kube_config = kube_config + + +class ManagedClusterAddonProfile(msrest.serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + :ivar identity: Information of user assigned identity used by this add-on. + :vartype identity: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAddonProfileIdentity + """ + + _validation = { + 'enabled': {'required': True}, + 'identity': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, + } + + def __init__( + self, + *, + enabled: bool, + config: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = enabled + self.config = config + self.identity = None + + +class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): + """Information of user assigned identity used by this add-on. + + :param resource_id: The resource id of the user assigned identity. + :type resource_id: str + :param client_id: The client id of the user assigned identity. + :type client_id: str + :param object_id: The object id of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. + :type vnet_subnet_id: str + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. + :type pod_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar node_image_version: Version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. + :type availability_zones: list[str] + :param enable_node_public_ip: Enable public IP for nodes. + :type enable_node_public_ip: bool + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. + :type spot_max_price: float + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. + :type tags: dict[str, str] + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig + """ + + _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, + 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, + } + + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + **kwargs + ): + super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.os_disk_type = os_disk_type + self.vnet_subnet_id = vnet_subnet_id + self.pod_subnet_id = pod_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.type = type + self.mode = mode + self.orchestrator_version = orchestrator_version + self.node_image_version = None + self.upgrade_settings = upgrade_settings + self.provisioning_state = None + self.power_state = None + self.availability_zones = availability_zones + self.enable_node_public_ip = enable_node_public_ip + self.scale_set_priority = scale_set_priority + self.scale_set_eviction_policy = scale_set_eviction_policy + self.spot_max_price = spot_max_price + self.tags = tags + self.node_labels = node_labels + self.node_taints = node_taints + self.proximity_placement_group_id = proximity_placement_group_id + self.kubelet_config = kubelet_config + self.linux_os_config = linux_os_config + + +class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + """Profile for the container service agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: Size of agent VMs. Possible values include: "Standard_A1", "Standard_A10", + "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", "Standard_A2m_v2", + "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", "Standard_A5", + "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", "Standard_A8m_v2", + "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", "Standard_B8ms", + "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", "Standard_D12", + "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: OS disk type to be used for machines in a given agent pool. Allowed values + are 'Ephemeral' and 'Managed'. If unspecified, defaults to 'Ephemeral' when the VM supports + ephemeral OS and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults + to 'Managed'. May not be changed after creation. Possible values include: "Managed", + "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSDiskType + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier for nodes and maybe + pods. + :type vnet_subnet_id: str + :param pod_subnet_id: Pod SubnetID specifies the VNet's subnet identifier for pods. + :type pod_subnet_id: str + :param max_pods: Maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: OsType to be used to specify os type. Choose from Linux and Windows. Default to + Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param max_count: Maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: Minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param type: AgentPoolType represents types of an agent pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolType + :param mode: AgentPoolMode represents mode of an agent pool. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolMode + :param orchestrator_version: Version of orchestrator specified when creating the managed + cluster. + :type orchestrator_version: str + :ivar node_image_version: Version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar power_state: Describes whether the Agent Pool is Running or Stopped. + :vartype power_state: ~azure.mgmt.containerservice.v2020_11_01.models.PowerState + :param availability_zones: Availability zones for nodes. Must use VirtualMachineScaleSets + AgentPoolType. + :type availability_zones: list[str] + :param enable_node_public_ip: Enable public IP for nodes. + :type enable_node_public_ip: bool + :param scale_set_priority: ScaleSetPriority to be used to specify virtual machine scale set + priority. Default to regular. Possible values include: "Spot", "Regular". Default value: + "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetPriority + :param scale_set_eviction_policy: ScaleSetEvictionPolicy to be used to specify eviction policy + for Spot virtual machine scale set. Default to Delete. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ScaleSetEvictionPolicy + :param spot_max_price: SpotMaxPrice to be used to specify the maximum price you are willing to + pay in US Dollars. Possible values are any decimal value greater than zero or -1 which + indicates default price to be up-to on-demand. + :type spot_max_price: float + :param tags: A set of tags. Agent pool tags to be persisted on the agent pool virtual machine + scale set. + :type tags: dict[str, str] + :param node_labels: Agent pool node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: Taints added to new nodes during node pool create and scale. For example, + key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: KubeletConfig specifies the configuration of kubelet on agent nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2020_11_01.models.KubeletConfig + :param linux_os_config: LinuxOSConfig specifies the OS configuration of linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2020_11_01.models.LinuxOSConfig + :param name: Required. Unique name of the agent pool profile in the context of the subscription + and resource group. + :type name: str + """ + + _validation = { + 'os_disk_size_gb': {'maximum': 1023, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, + 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + count: Optional[int] = None, + vm_size: Optional[Union[str, "ContainerServiceVMSizeTypes"]] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + **kwargs + ): + super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, **kwargs) + self.name = name + + +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): + """Access profile for managed cluster API server. + + :param authorized_ip_ranges: Authorized IP Ranges to kubernetes API server. + :type authorized_ip_ranges: list[str] + :param enable_private_cluster: Whether to create the cluster as a private cluster or not. + :type enable_private_cluster: bool + :param private_dns_zone: Private dns zone mode for private cluster. + :type private_dns_zone: str + """ + + _attribute_map = { + 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, + 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, + 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, + } + + def __init__( + self, + *, + authorized_ip_ranges: Optional[List[str]] = None, + enable_private_cluster: Optional[bool] = None, + private_dns_zone: Optional[str] = None, + **kwargs + ): + super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) + self.authorized_ip_ranges = authorized_ip_ranges + self.enable_private_cluster = enable_private_cluster + self.private_dns_zone = private_dns_zone + + +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): + """Auto upgrade profile for a managed cluster. + + :param upgrade_channel: upgrade channel for auto upgrade. Possible values include: "rapid", + "stable", "patch", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2020_11_01.models.UpgradeChannel + """ + + _attribute_map = { + 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, + } + + def __init__( + self, + *, + upgrade_channel: Optional[Union[str, "UpgradeChannel"]] = None, + **kwargs + ): + super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) + self.upgrade_channel = upgrade_channel + + +class ManagedClusterIdentity(msrest.serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :param type: The type of identity used for the managed cluster. Type 'SystemAssigned' will use + an implicitly created identity in master components and an auto-created user assigned identity + in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, + service principal will be used instead. Possible values include: "SystemAssigned", + "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2020_11_01.models.ResourceIdentityType + :param user_assigned_identities: The user identity associated with the managed cluster. This + identity will be used in control plane and only one user assigned identity is allowed. The user + identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.containerservice.v2020_11_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): + super(ManagedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ManagedCluster"]] = None, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): + """Profile of the managed cluster load balancer. + + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. + :type outbound_ip_prefixes: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterLoadBalancerProfileOutboundIPs + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] + :param allocated_outbound_ports: Desired number of allocated SNAT ports per VM. Allowed values + must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure + dynamically allocating ports. + :type allocated_outbound_ports: int + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. + :type idle_timeout_in_minutes: int + """ + + _validation = { + 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, + 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, + } + + _attribute_map = { + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, + } + + def __init__( + self, + *, + managed_outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = None, + outbound_ip_prefixes: Optional["ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, + outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileOutboundIPs"] = None, + effective_outbound_i_ps: Optional[List["ResourceReference"]] = None, + allocated_outbound_ports: Optional[int] = 0, + idle_timeout_in_minutes: Optional[int] = 30, + **kwargs + ): + super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) + self.managed_outbound_i_ps = managed_outbound_i_ps + self.outbound_ip_prefixes = outbound_ip_prefixes + self.outbound_i_ps = outbound_i_ps + self.effective_outbound_i_ps = effective_outbound_i_ps + self.allocated_outbound_ports = allocated_outbound_ports + self.idle_timeout_in_minutes = idle_timeout_in_minutes + + +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): + """Desired managed outbound IPs for the cluster load balancer. + + :param count: Desired number of outbound IP created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + """ + + _validation = { + 'count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + *, + count: Optional[int] = 1, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) + self.count = count + + +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): + """Desired outbound IP Prefix resources for the cluster load balancer. + + :param public_ip_prefixes: A list of public IP prefix resources. + :type public_ip_prefixes: + list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] + """ + + _attribute_map = { + 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, + } + + def __init__( + self, + *, + public_ip_prefixes: Optional[List["ResourceReference"]] = None, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) + self.public_ip_prefixes = public_ip_prefixes + + +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): + """Desired outbound IP resources for the cluster load balancer. + + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2020_11_01.models.ResourceReference] + """ + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + } + + def __init__( + self, + *, + public_i_ps: Optional[List["ResourceReference"]] = None, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) + self.public_i_ps = public_i_ps + + +class ManagedClusterPodIdentity(msrest.serialization.Model): + """ManagedClusterPodIdentity. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the pod identity. + :type name: str + :param namespace: Required. Namespace of the pod identity. + :type namespace: str + :param identity: Required. Information of the user assigned identity. + :type identity: ~azure.mgmt.containerservice.v2020_11_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningState + :ivar provisioning_info: + :vartype provisioning_info: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityProvisioningInfo + """ + + _validation = { + 'name': {'required': True}, + 'namespace': {'required': True}, + 'identity': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_info': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, + } + + def __init__( + self, + *, + name: str, + namespace: str, + identity: "UserAssignedIdentity", + **kwargs + ): + super(ManagedClusterPodIdentity, self).__init__(**kwargs) + self.name = name + self.namespace = namespace + self.identity = identity + self.provisioning_state = None + self.provisioning_info = None + + +class ManagedClusterPodIdentityException(msrest.serialization.Model): + """ManagedClusterPodIdentityException. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the pod identity exception. + :type name: str + :param namespace: Required. Namespace of the pod identity exception. + :type namespace: str + :param pod_labels: Required. Pod labels to match. + :type pod_labels: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'namespace': {'required': True}, + 'pod_labels': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, + } + + def __init__( + self, + *, + name: str, + namespace: str, + pod_labels: Dict[str, str], + **kwargs + ): + super(ManagedClusterPodIdentityException, self).__init__(**kwargs) + self.name = name + self.namespace = namespace + self.pod_labels = pod_labels + + +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): + """ManagedClusterPodIdentityProfile. + + :param enabled: Whether the pod identity addon is enabled. + :type enabled: bool + :param user_assigned_identities: User assigned pod identity settings. + :type user_assigned_identities: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentity] + :param user_assigned_identity_exceptions: User assigned pod identity exception settings. + :type user_assigned_identity_exceptions: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPodIdentityException] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, + 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + user_assigned_identities: Optional[List["ManagedClusterPodIdentity"]] = None, + user_assigned_identity_exceptions: Optional[List["ManagedClusterPodIdentityException"]] = None, + **kwargs + ): + super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) + self.enabled = enabled + self.user_assigned_identities = user_assigned_identities + self.user_assigned_identity_exceptions = user_assigned_identity_exceptions + + +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): + """ManagedClusterPodIdentityProvisioningInfo. + + :param error: Pod identity assignment error (if any). + :type error: ~azure.mgmt.containerservice.v2020_11_01.models.CloudError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudError'}, + } + + def __init__( + self, + *, + error: Optional["CloudError"] = None, + **kwargs + ): + super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) + self.error = error + + +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param name: Pool name. + :type name: str + :param os_type: Required. OsType to be used to specify os type. Choose from Linux and Windows. + Default to Linux. Possible values include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.name = name + self.os_type = os_type + self.upgrades = upgrades + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :param kubernetes_version: Kubernetes version (major, minor, patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): + """Parameters to be applied to the cluster-autoscaler when enabled. + + :param balance_similar_node_groups: + :type balance_similar_node_groups: str + :param expander: Possible values include: "least-waste", "most-pods", "random". + :type expander: str or ~azure.mgmt.containerservice.v2020_11_01.models.Expander + :param max_empty_bulk_delete: + :type max_empty_bulk_delete: str + :param max_graceful_termination_sec: + :type max_graceful_termination_sec: str + :param max_total_unready_percentage: + :type max_total_unready_percentage: str + :param new_pod_scale_up_delay: + :type new_pod_scale_up_delay: str + :param ok_total_unready_count: + :type ok_total_unready_count: str + :param scan_interval: + :type scan_interval: str + :param scale_down_delay_after_add: + :type scale_down_delay_after_add: str + :param scale_down_delay_after_delete: + :type scale_down_delay_after_delete: str + :param scale_down_delay_after_failure: + :type scale_down_delay_after_failure: str + :param scale_down_unneeded_time: + :type scale_down_unneeded_time: str + :param scale_down_unready_time: + :type scale_down_unready_time: str + :param scale_down_utilization_threshold: + :type scale_down_utilization_threshold: str + :param skip_nodes_with_local_storage: + :type skip_nodes_with_local_storage: str + :param skip_nodes_with_system_pods: + :type skip_nodes_with_system_pods: str + """ + + _attribute_map = { + 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, + 'expander': {'key': 'expander', 'type': 'str'}, + 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, + 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, + 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, + 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, + 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, + 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, + 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, + 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, + 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, + 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, + 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, + 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, + 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, + 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, + } + + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = None, + expander: Optional[Union[str, "Expander"]] = None, + max_empty_bulk_delete: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_total_unready_percentage: Optional[str] = None, + new_pod_scale_up_delay: Optional[str] = None, + ok_total_unready_count: Optional[str] = None, + scan_interval: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded_time: Optional[str] = None, + scale_down_unready_time: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + skip_nodes_with_local_storage: Optional[str] = None, + skip_nodes_with_system_pods: Optional[str] = None, + **kwargs + ): + super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) + self.balance_similar_node_groups = balance_similar_node_groups + self.expander = expander + self.max_empty_bulk_delete = max_empty_bulk_delete + self.max_graceful_termination_sec = max_graceful_termination_sec + self.max_total_unready_percentage = max_total_unready_percentage + self.new_pod_scale_up_delay = new_pod_scale_up_delay + self.ok_total_unready_count = ok_total_unready_count + self.scan_interval = scan_interval + self.scale_down_delay_after_add = scale_down_delay_after_add + self.scale_down_delay_after_delete = scale_down_delay_after_delete + self.scale_down_delay_after_failure = scale_down_delay_after_failure + self.scale_down_unneeded_time = scale_down_unneeded_time + self.scale_down_unready_time = scale_down_unready_time + self.scale_down_utilization_threshold = scale_down_utilization_threshold + self.skip_nodes_with_local_storage = skip_nodes_with_local_storage + self.skip_nodes_with_system_pods = skip_nodes_with_system_pods + + +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + **kwargs + ): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret + + +class ManagedClusterSKU(msrest.serialization.Model): + """ManagedClusterSKU. + + :param name: Name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUName + :param tier: Tier of a managed cluster SKU. Possible values include: "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterSKUTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "ManagedClusterSKUTier"]] = None, + **kwargs + ): + super(ManagedClusterSKU, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class ManagedClusterUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for compute pools. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Id of upgrade profile. + :vartype id: str + :ivar name: Name of upgrade profile. + :vartype name: str + :ivar type: Type of upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__( + self, + *, + control_plane_profile: "ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["ManagedClusterPoolUpgradeProfile"], + **kwargs + ): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = control_plane_profile + self.agent_pool_profiles = agent_pool_profiles + + +class ManagedClusterWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. + :type admin_username: str + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` **Max- + length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :type admin_password: str + :param license_type: The licenseType to use for Windows VMs. Windows_Server is used to enable + Azure Hybrid User Benefits for Windows VMs. Possible values include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2020_11_01.models.LicenseType + """ + + _validation = { + 'admin_username': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + } + + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + license_type: Optional[Union[str, "LicenseType"]] = None, + **kwargs + ): + super(ManagedClusterWindowsProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password + self.license_type = license_type + + +class OperationListResult(msrest.serialization.Model): + """The List Compute Operation operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of compute operations. + :vartype value: list[~azure.mgmt.containerservice.v2020_11_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Compute Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar name: The name of the compute operation. + :vartype name: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class PowerState(msrest.serialization.Model): + """Describes the Power State of the cluster. + + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". + :type code: str or ~azure.mgmt.containerservice.v2020_11_01.models.Code + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[Union[str, "Code"]] = None, + **kwargs + ): + super(PowerState, self).__init__(**kwargs) + self.code = code + + +class PrivateEndpoint(msrest.serialization.Model): + """Private endpoint which a connection belongs to. + + :param id: The resource Id for private endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(msrest.serialization.Model): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the private endpoint connection. + :vartype id: str + :ivar name: The name of the private endpoint connection. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionProvisioningState + :param private_endpoint: The resource of private endpoint. + :type private_endpoint: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + :param value: The collection value. + :type value: list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkResource(msrest.serialization.Model): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: The ID of the private link resource. + :type id: str + :param name: The name of the private link resource. + :type name: str + :param type: The resource type. + :type type: str + :param group_id: The group ID of the resource. + :type group_id: str + :param required_members: RequiredMembers of the resource. + :type required_members: list[str] + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. + :vartype private_link_service_id: str + """ + + _validation = { + 'private_link_service_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.group_id = group_id + self.required_members = required_members + self.private_link_service_id = None + + +class PrivateLinkResourcesListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: The collection value. + :type value: list[~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + super(PrivateLinkResourcesListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """The state of a private link service connection. + + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2020_11_01.models.ConnectionStatus + :param description: The private link service connection description. + :type description: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "ConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + + +class ResourceReference(msrest.serialization.Model): + """A reference to an Azure resource. + + :param id: The fully qualified Azure resource id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(ResourceReference, self).__init__(**kwargs) + self.id = id + + +class SysctlConfig(msrest.serialization.Model): + """Sysctl settings for Linux agent nodes. + + :param net_core_somaxconn: Sysctl setting net.core.somaxconn. + :type net_core_somaxconn: int + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. + :type net_core_netdev_max_backlog: int + :param net_core_rmem_max: Sysctl setting net.core.rmem_max. + :type net_core_rmem_max: int + :param net_core_wmem_max: Sysctl setting net.core.wmem_max. + :type net_core_wmem_max: int + :param net_core_optmem_max: Sysctl setting net.core.optmem_max. + :type net_core_optmem_max: int + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. + :type net_ipv4_tcp_max_syn_backlog: int + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. + :type net_ipv4_tcp_max_tw_buckets: int + :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. + :type net_ipv4_tcp_fin_timeout: int + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. + :type net_ipv4_tcp_keepalive_time: int + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. + :type net_ipv4_tcp_keepalive_probes: int + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. + :type net_ipv4_tcpkeepalive_intvl: int + :param net_ipv4_tcp_rmem: Sysctl setting net.ipv4.tcp_rmem. + :type net_ipv4_tcp_rmem: int + :param net_ipv4_tcp_wmem: Sysctl setting net.ipv4.tcp_wmem. + :type net_ipv4_tcp_wmem: int + :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. + :type net_ipv4_tcp_tw_reuse: bool + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. + :type net_ipv4_ip_local_port_range: str + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + :type net_ipv4_neigh_default_gc_thresh1: int + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + :type net_ipv4_neigh_default_gc_thresh2: int + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + :type net_ipv4_neigh_default_gc_thresh3: int + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. + :type net_netfilter_nf_conntrack_max: int + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. + :type net_netfilter_nf_conntrack_buckets: int + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. + :type fs_inotify_max_user_watches: int + :param fs_file_max: Sysctl setting fs.file-max. + :type fs_file_max: int + :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. + :type fs_aio_max_nr: int + :param fs_nr_open: Sysctl setting fs.nr_open. + :type fs_nr_open: int + :param kernel_threads_max: Sysctl setting kernel.threads-max. + :type kernel_threads_max: int + :param vm_max_map_count: Sysctl setting vm.max_map_count. + :type vm_max_map_count: int + :param vm_swappiness: Sysctl setting vm.swappiness. + :type vm_swappiness: int + :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. + :type vm_vfs_cache_pressure: int + """ + + _attribute_map = { + 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, + 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, + 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, + 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, + 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, + 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, + 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, + 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, + 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, + 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, + 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, + 'net_ipv4_tcp_rmem': {'key': 'netIpv4TcpRmem', 'type': 'int'}, + 'net_ipv4_tcp_wmem': {'key': 'netIpv4TcpWmem', 'type': 'int'}, + 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, + 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, + 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, + 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, + 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, + 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, + 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, + 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, + 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, + 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, + 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, + 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, + 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, + 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, + 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, + } + + def __init__( + self, + *, + net_core_somaxconn: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcpkeepalive_intvl: Optional[int] = None, + net_ipv4_tcp_rmem: Optional[int] = None, + net_ipv4_tcp_wmem: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_ipv4_ip_local_port_range: Optional[str] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_aio_max_nr: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + **kwargs + ): + super(SysctlConfig, self).__init__(**kwargs) + self.net_core_somaxconn = net_core_somaxconn + self.net_core_netdev_max_backlog = net_core_netdev_max_backlog + self.net_core_rmem_max = net_core_rmem_max + self.net_core_wmem_max = net_core_wmem_max + self.net_core_optmem_max = net_core_optmem_max + self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog + self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets + self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout + self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time + self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes + self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl + self.net_ipv4_tcp_rmem = net_ipv4_tcp_rmem + self.net_ipv4_tcp_wmem = net_ipv4_tcp_wmem + self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse + self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range + self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 + self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 + self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 + self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max + self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets + self.fs_inotify_max_user_watches = fs_inotify_max_user_watches + self.fs_file_max = fs_file_max + self.fs_aio_max_nr = fs_aio_max_nr + self.fs_nr_open = fs_nr_open + self.kernel_threads_max = kernel_threads_max + self.vm_max_map_count = vm_max_map_count + self.vm_swappiness = vm_swappiness + self.vm_vfs_cache_pressure = vm_vfs_cache_pressure + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = tags diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py new file mode 100644 index 00000000000..653c0387002 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._agent_pools_operations import AgentPoolsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations + +__all__ = [ + 'Operations', + 'ManagedClustersOperations', + 'AgentPoolsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'ResolvePrivateLinkServiceIdOperations', +] diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py new file mode 100644 index 00000000000..ea1b816b549 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_agent_pools_operations.py @@ -0,0 +1,703 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AgentPoolsOperations(object): + """AgentPoolsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AgentPoolListResult"] + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. The operation returns properties + of each agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + """Gets the agent pool. + + Gets the details of the agent pool by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AgentPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] + """Creates or updates an agent pool. + + Creates or updates an agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: Parameters supplied to the Create or Update an agent pool operation. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPool + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_11_01.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an agent pool. + + Deletes the agent pool in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore + + def get_upgrade_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolUpgradeProfile" + """Gets upgrade profile for an agent pool. + + Gets the details of the upgrade profile for an agent pool with a specified resource group and + managed cluster name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore + + def get_available_agent_pool_versions( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AgentPoolAvailableVersions" + """Gets a list of supported versions for the specified agent pool. + + Gets a list of supported versions for the specified agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore + + def _upgrade_node_image_version_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.AgentPool"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + def begin_upgrade_node_image_version( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] + """Upgrade node image version of an agent pool to the latest. + + Upgrade node image version of an agent pool to the latest. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py new file mode 100644 index 00000000000..4e3150bd34f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_managed_clusters_operations.py @@ -0,0 +1,1523 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ManagedClustersOperations(object): + """ManagedClustersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. The operation returns properties + of each managed cluster. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. The operation returns + properties of each managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def get_upgrade_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterUpgradeProfile" + """Gets upgrade profile for a managed cluster. + + Gets the details of the upgrade profile for a managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get_upgrade_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore + + def get_access_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + role_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedClusterAccessProfile" + """Gets an access profile of a managed cluster. + + Gets the accessProfile for the specified role name of the managed cluster with a specified + resource group and name. **WARNING**\ : This API will be deprecated. Instead use + `ListClusterUserCredentials `_ or `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get_access_profile.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore + + def list_cluster_admin_credentials( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster admin credential of a managed cluster. + + Gets cluster admin credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore + + def list_cluster_user_credentials( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster user credential of a managed cluster. + + Gets cluster user credential of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore + + def list_cluster_monitoring_user_credentials( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster monitoring user credential of a managed cluster. + + Gets cluster monitoring user credential of the managed cluster with a specified resource group + and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + """Gets a managed cluster. + + Gets the details of the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedCluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] + """Creates or updates a managed cluster. + + Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Create or Update a Managed Cluster operation. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _update_tags_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedCluster"] + """Updates tags on a managed cluster. + + Updates a managed cluster with the specified tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2020_11_01.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedCluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a managed cluster. + + Deletes the managed cluster with a specified resource group and name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore + + def _reset_service_principal_profile_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def begin_reset_service_principal_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Reset Service Principal Profile of a managed cluster. + + Update the service principal Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset Service Principal Profile operation for a + Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterServicePrincipalProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_service_principal_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore + + def _reset_aad_profile_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + def begin_reset_aad_profile( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Reset AAD Profile of a managed cluster. + + Update the AAD Profile for a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Reset AAD Profile operation for a Managed + Cluster. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterAADProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_aad_profile_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore + + def _rotate_cluster_certificates_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + def begin_rotate_cluster_certificates( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Rotate certificates of a managed cluster. + + Rotate certificates of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._rotate_cluster_certificates_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore + + def _stop_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._stop_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + def begin_stop( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Stop Managed Cluster. + + Stops a Running Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore + + def _start_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore + + def begin_start( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Start Managed Cluster. + + Starts a Stopped Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py new file mode 100644 index 00000000000..65363484fcc --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] + """Gets a list of compute operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2020_11_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py new file mode 100644 index 00000000000..487e32ccb6c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,366 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionListResult" + """Gets a list of private endpoint connections in the specified managed cluster. + + Gets a list of private endpoint connections in the specified managed cluster. The operation + returns properties of each private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets the private endpoint connection. + + Gets the details of the private endpoint connection by managed cluster and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Updates a private endpoint connection. + + Updates a private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to the Update a private endpoint connection operation. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a private endpoint connection. + + Deletes the private endpoint connection in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: Pass in True if you'd like the ARMPolling polling method, + False for no polling, or your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py new file mode 100644 index 00000000000..829fcbc7dae --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_private_link_resources_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesListResult" + """Gets a list of private link resources in the specified managed cluster. + + Gets a list of private link resources in the specified managed cluster. The operation returns + properties of each private link resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py new file mode 100644 index 00000000000..27ddbd6cf50 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2020_11_01/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ResolvePrivateLinkServiceIdOperations(object): + """ResolvePrivateLinkServiceIdOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2020_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def post( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.PrivateLinkResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters (name, groupId) supplied in order to resolve a private link + service ID. + :type parameters: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore