diff --git a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json index ec81fa34ea0..fb63756e45d 100644 --- a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json @@ -23,6 +23,9 @@ "test_aks_create_with_csi_driver_v2", "test_aks_create_and_update_csi_driver_to_v2", "test_aks_nodepool_abort", + "test_aks_create_with_namespace_enabled", + "test_aks_update_enable_namespace", + "test_aks_get_credentials_at_namespace_scope", "test_aks_update_outbound_from_slb_to_natgateway" ], "missing namespace registration (AME)": [ diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 0ec802f53d0..f2197bf120f 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -149,6 +149,7 @@ validate_disable_windows_outbound_nat, validate_allowed_host_ports, validate_application_security_groups, + validate_enable_disable_namespace_resources, validate_utc_offset, validate_start_date, validate_start_time, @@ -396,6 +397,7 @@ def load_arguments(self, _): # no validation for aks create because it already only supports Linux. c.argument('message_of_the_day') c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) + c.argument('enable_namespace_resources', action="store_true", help='Enable sync of namespaces as Azure Resource Manager resources') # no validation for aks create because it already only supports Linux. c.argument('enable_custom_ca_trust', action='store_true') c.argument('nodepool_allowed_host_ports', validator=validate_allowed_host_ports, is_preview=True, help="allowed host ports for agentpool") @@ -512,6 +514,8 @@ def load_arguments(self, _): c.argument('disable_vpa', action='store_true', is_preview=True, help="disable vertical pod autoscaler for cluster") c.argument('cluster_snapshot_id', validator=validate_cluster_snapshot_id, is_preview=True) c.argument('custom_ca_trust_certificates', options_list=["--custom-ca-trust-certificates", "--ca-certs"], validator=validate_custom_ca_trust_certificates, is_preview=True, help="path to file containing list of new line separated CAs") + c.argument('enable_namespace_resources', action='store_true', help='Enable sync of namespaces as Azure Resource Manager resources', validator=validate_enable_disable_namespace_resources) + c.argument('disable_namespace_resources', action='store_true', help='Disable sync of namespaces as Azure Resource Manager resources') with self.argument_context('aks upgrade') as c: c.argument('kubernetes_version', completer=get_k8s_upgrades_completion_list) @@ -734,6 +738,7 @@ def load_arguments(self, _): default=os.path.join(os.path.expanduser('~'), '.kube', 'config')) c.argument('public_fqdn', default=False, action='store_true') c.argument('credential_format', options_list=['--format'], arg_type=get_enum_type(credential_formats)) + c.argument('namespace_name', options_list=['--namespace'], help='User only having access to namespace resource can use this parameter to specify the namespace name.') with self.argument_context('aks pod-identity') as c: c.argument('cluster_name', help='The cluster name.') diff --git a/src/aks-preview/azext_aks_preview/_validators.py b/src/aks-preview/azext_aks_preview/_validators.py index c44538a2db1..b86bc984029 100644 --- a/src/aks-preview/azext_aks_preview/_validators.py +++ b/src/aks-preview/azext_aks_preview/_validators.py @@ -701,6 +701,9 @@ def sanitize_resource_id(resource_id): resource_id = resource_id.rstrip("/") return resource_id.lower() +def validate_enable_disable_namespace_resources(namespace): + if namespace.enable_namespace_resources and namespace.disable_namespace_resources: + raise ArgumentUsageError("Providing both --enable-namespace-resources and --disable-namespace-resources is invalid") def validate_azuremonitorworkspaceresourceid(namespace): resource_id = namespace.azure_monitor_workspace_resource_id diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 03af73684f0..8c7d9139fea 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -714,6 +714,7 @@ def aks_create( message_of_the_day=None, workload_runtime=None, enable_custom_ca_trust=False, + enable_namespace_resources=False, nodepool_allowed_host_ports=None, nodepool_asg_ids=None, node_public_ip_tags=None, @@ -850,6 +851,8 @@ def aks_update( enable_vpa=False, disable_vpa=False, cluster_snapshot_id=None, + enable_namespace_resources=False, + disable_namespace_resources=False, custom_ca_trust_certificates=None, ): # DO NOT MOVE: get all the original parameters and save them as a dictionary @@ -920,6 +923,7 @@ def aks_get_credentials(cmd, # pylint: disable=unused-argument client, resource_group_name, name, + namespace_name=None, admin=False, user='clusterUser', path=os.path.join(os.path.expanduser( @@ -937,12 +941,22 @@ def aks_get_credentials(cmd, # pylint: disable=unused-argument if admin: raise InvalidArgumentValueError("--format can only be specified when requesting clusterUser credential.") if admin: + if namespace_name is not None: + raise InvalidArgumentValueError("--namespace is not valid for admin credentials") credentialResults = client.list_cluster_admin_credentials( resource_group_name, name, serverType) else: if user.lower() == 'clusteruser': - credentialResults = client.list_cluster_user_credentials( - resource_group_name, name, serverType, credential_format) + if namespace_name is not None: + from azext_aks_preview.vendored_sdks.namespace_client import NamespaceClient + from azure.cli.core.commands.client_factory import get_mgmt_service_client + + client = get_mgmt_service_client(cmd.cli_ctx, NamespaceClient) + credentialResults = client.list_user_credential(resource_group_name, "Microsoft.ContainerService", "managedClusters", name, namespace_name) + + else: + credentialResults = client.list_cluster_user_credentials( + resource_group_name, name, serverType, credential_format) elif user.lower() == 'clustermonitoringuser': credentialResults = client.list_cluster_monitoring_user_credentials( resource_group_name, name, serverType) diff --git a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py index 93509957319..f6ffb06f3aa 100644 --- a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py +++ b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py @@ -2172,6 +2172,17 @@ def set_up_workload_auto_scaler_profile(self, mc: ManagedCluster) -> ManagedClus return mc + def set_up_enable_namespace_resource(self, mc: ManagedCluster) -> ManagedCluster: + """Sets the property to enable namespace as an ARM resource + :return: the ManagedCluster object + """ + self._ensure_mc(mc) + + if self.context.raw_param.get("enable_namespace_resources"): + mc.enable_namespace_resources = True + + return mc + def set_up_custom_ca_trust_certificates(self, mc: ManagedCluster) -> ManagedCluster: """Set up Custom CA Trust Certificates for the ManagedCluster object. @@ -2290,6 +2301,8 @@ def construct_mc_profile_preview(self, bypass_restore_defaults: bool = False) -> mc = self.set_up_workload_auto_scaler_profile(mc) # set up vpa mc = self.set_up_vpa(mc) + # set up the enableNamespaceResources properties + mc = self.set_up_enable_namespace_resource(mc) # set up kube-proxy config mc = self.set_up_kube_proxy_config(mc) # set up custom ca trust certificates @@ -2668,6 +2681,20 @@ def update_custom_ca_trust_certificates(self, mc: ManagedCluster) -> ManagedClus mc.security_profile.custom_ca_trust_certificates = ca_certs return mc + + def update_enable_namespace_resources(self, mc: ManagedCluster) -> ManagedCluster: + """Sets the property to enable namespace as an ARM resource + :return: the ManagedCluster object + """ + self._ensure_mc(mc) + if self.context.raw_param.get("enable_namespace_resources"): + mc.enable_namespace_resources = True + + elif self.context.raw_param.get("disable_namespace_resources"): + mc.enable_namespace_resources = False + + return mc + def update_azure_monitor_profile(self, mc: ManagedCluster) -> ManagedCluster: """Update azure monitor profile for the ManagedCluster object. @@ -2852,6 +2879,8 @@ def update_mc_profile_preview(self) -> ManagedCluster: mc = self.update_image_cleaner(mc) # update workload auto scaler profile mc = self.update_workload_auto_scaler_profile(mc) + # update the enbaleNamespaceResources property + mc = self.update_enable_namespace_resources(mc) # update azure monitor metrics profile mc = self.update_azure_monitor_profile(mc) # update vpa diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_namespace_enabled.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_namespace_enabled.yaml new file mode 100644 index 00000000000..381b9d3be62 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_namespace_enabled.yaml @@ -0,0 +1,872 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.4 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-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":"2022-07-11T09:38:48Z","Created":"20220711"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '325' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 11 Jul 2022 09:39:07 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": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestquwiltuwl-1bfbb5", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": + 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": + false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "", "upgradeSettings": {}, "enableNodePublicIP": false, "enableCustomCATrust": + false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "nodeTaints": [], "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": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "enableNamespaceResources": true, "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, "storageProfile": + {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1920' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitestquwiltuwl-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitestquwiltuwl-1bfbb5-b59bb474.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestquwiltuwl-1bfbb5-b59bb474.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"disableLocalAccounts\": false,\n \"securityProfile\": {},\n\ + \ \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true,\n\ + \ \"version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\"\ + : true\n },\n \"snapshotController\": {\n \"enabled\": true\n \ + \ }\n },\n \"enableNamespaceResources\": true,\n \"oidcIssuerProfile\"\ + : {\n \"enabled\": false\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/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '3728' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:39: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: + - '1196' + 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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:39: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 + 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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:40: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 --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:40: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 --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:41: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 --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:41: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: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:42:18 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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:42: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: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:43: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 create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:43: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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:44: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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:44: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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T09:39:14Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '118' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:45: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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/31240b61-ce67-4237-ba7d-dfb0bfd896db?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"610b2431-67ce-3742-ba7d-dfb0bfd896db\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-07-11T09:39:14Z\",\n \"endTime\"\ + : \"2022-07-11T09:45:36.1676359Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '162' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:45: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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitestquwiltuwl-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitestquwiltuwl-1bfbb5-b59bb474.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestquwiltuwl-1bfbb5-b59bb474.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/3dd8fa71-88a1-4796-b644-081d6456c08f\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"enableNamespaceResources\": true,\n \ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\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: + - '4379' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 09:45: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/latest/recordings/test_aks_get_credentials_at_namespace_scope.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_get_credentials_at_namespace_scope.yaml new file mode 100644 index 00000000000..8c2e7efb730 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_get_credentials_at_namespace_scope.yaml @@ -0,0 +1,730 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.4 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-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":"2022-07-11T11:21:31Z","Created":"20220711"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '325' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 11 Jul 2022 11:21:49 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": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestfktc4rldf-1bfbb5", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": + 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": + false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "", "upgradeSettings": {}, "enableNodePublicIP": false, "enableCustomCATrust": + false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "nodeTaints": [], "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": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "enableNamespaceResources": true, "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, "storageProfile": + {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1920' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitestfktc4rldf-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitestfktc4rldf-1bfbb5-7c6c7a60.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestfktc4rldf-1bfbb5-7c6c7a60.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"disableLocalAccounts\": false,\n \"securityProfile\": {},\n\ + \ \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true,\n\ + \ \"version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\"\ + : true\n },\n \"snapshotController\": {\n \"enabled\": true\n \ + \ }\n },\n \"enableNamespaceResources\": true,\n \"oidcIssuerProfile\"\ + : {\n \"enabled\": false\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/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '3728' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:22:05 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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:22:36 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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:23: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 --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:23: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 --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:24: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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:24: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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11: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 --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:25: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 --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:26:12 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-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/22ece45e-11ed-4d53-afdd-3c07cda5a2d0?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5ee4ec22-ed11-534d-afdd-3c07cda5a2d0\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-07-11T11:22:01.09Z\",\n \"endTime\"\ + : \"2022-07-11T11:26:35.4727509Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '165' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:26: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 --enable-namespace-resources --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitestfktc4rldf-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitestfktc4rldf-1bfbb5-7c6c7a60.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestfktc4rldf-1bfbb5-7c6c7a60.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/a634c48c-13a8-44f7-a8b0-e99af771b379\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"enableNamespaceResources\": true,\n \ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\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: + - '4379' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 11:26: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: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks get-credentials + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --namespace + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-namespaceclient/unknown Python/3.10.4 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/providers/Microsoft.KubernetesConfiguration/namespaces/default/listUserCredential?api-version=2021-12-01-preview + response: + body: + string: '{"code":"BadRequest","message":"ListUserCredentials for Namespaces + is not supported for non AAD clusters"}' + headers: + api-supported-versions: + - 2021-12-01-preview + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 11 Jul 2022 11:31:52 GMT + expires: + - '-1' + pragma: + - no-cache + 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/latest/recordings/test_aks_update_enable_namespace.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_enable_namespace.yaml new file mode 100644 index 00000000000..f705cf52feb --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_update_enable_namespace.yaml @@ -0,0 +1,1831 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.10.4 + (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-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":"2022-07-11T10:25:46Z","Created":"20220711"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '325' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 11 Jul 2022 10:26:04 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": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitesttnflbbdak-1bfbb5", + "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": + 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": + false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": + "", "upgradeSettings": {}, "enableNodePublicIP": false, "enableCustomCATrust": + false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "nodeTaints": [], "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": {}, "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, "storageProfile": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1886' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitesttnflbbdak-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"disableLocalAccounts\": false,\n \"securityProfile\": {},\n\ + \ \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true,\n\ + \ \"version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\"\ + : true\n },\n \"snapshotController\": {\n \"enabled\": true\n \ + \ }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\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/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '3691' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:26:15 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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:26: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 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:27: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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10: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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10: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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10: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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:29:25 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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:29: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: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10: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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10: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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10: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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/53f47db5-7779-44ed-b134-60fc5ca5873f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b57df453-7977-ed44-b134-60fc5ca5873f\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-07-11T10:26:14.8033333Z\",\n \"\ + endTime\": \"2022-07-11T10:31:33.0018476Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10: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 --ssh-key-value + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitesttnflbbdak-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\"\ + : false\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: + - '4342' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:31:59 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-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitesttnflbbdak-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\"\ + : false\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: + - '4342' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:32:09 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: '{"location": "eastus", "sku": {"name": "Basic", "tier": "Free"}, "identity": + {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": "1.22.6", "dnsPrefix": + "cliakstest-clitesttnflbbdak-1bfbb5", "agentPoolProfiles": [{"count": 3, "vmSize": + "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": "Managed", "kubeletDiskType": + "OS", "workloadRuntime": "OCIContainer", "maxPods": 110, "osType": "Linux", + "osSKU": "Ubuntu", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.22.6", "upgradeSettings": {}, "powerState": + {"code": "Running"}, "enableNodePublicIP": false, "enableCustomCATrust": false, + "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"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_eastus", "enableRBAC": + true, "enablePodSecurityPolicy": false, "enableNamespaceResources": true, "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, "countIPv6": 0}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c"}]}, + "podCidrs": ["10.244.0.0/16"], "serviceCidrs": ["10.0.0.0/16"], "ipFamilies": + ["IPv4"]}, "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}, + "disableLocalAccounts": false, "securityProfile": {}, "storageProfile": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2884' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --enable-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitesttnflbbdak-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"enableNamespaceResources\": true,\n \ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\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/eastus/operations/229beec5-3760-4788-b8c2-0a78620249e4?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '4377' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:32: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 + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + 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-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/229beec5-3760-4788-b8c2-0a78620249e4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"c5ee9b22-6037-8847-b8c2-0a78620249e4\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:32:16.99Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:32: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 + 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-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/229beec5-3760-4788-b8c2-0a78620249e4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"c5ee9b22-6037-8847-b8c2-0a78620249e4\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:32:16.99Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:33: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-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/229beec5-3760-4788-b8c2-0a78620249e4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"c5ee9b22-6037-8847-b8c2-0a78620249e4\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:32:16.99Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:33: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-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/229beec5-3760-4788-b8c2-0a78620249e4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"c5ee9b22-6037-8847-b8c2-0a78620249e4\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-07-11T10:32:16.99Z\",\n \"endTime\"\ + : \"2022-07-11T10:34:15.7910008Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '165' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:34: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 update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --enable-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitesttnflbbdak-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"enableNamespaceResources\": true,\n \ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\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: + - '4379' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:34: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: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitesttnflbbdak-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"enableNamespaceResources\": true,\n \ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\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: + - '4379' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:34:30 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: '{"location": "eastus", "sku": {"name": "Basic", "tier": "Free"}, "identity": + {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": "1.22.6", "dnsPrefix": + "cliakstest-clitesttnflbbdak-1bfbb5", "agentPoolProfiles": [{"count": 3, "vmSize": + "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": "Managed", "kubeletDiskType": + "OS", "workloadRuntime": "OCIContainer", "maxPods": 110, "osType": "Linux", + "osSKU": "Ubuntu", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "orchestratorVersion": "1.22.6", "upgradeSettings": {}, "powerState": + {"code": "Running"}, "enableNodePublicIP": false, "enableCustomCATrust": false, + "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"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, + "nodeResourceGroup": "MC_clitest000001_cliakstest000002_eastus", "enableRBAC": + true, "enablePodSecurityPolicy": false, "enableNamespaceResources": 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, "countIPv6": 0}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c"}]}, + "podCidrs": ["10.244.0.0/16"], "serviceCidrs": ["10.0.0.0/16"], "ipFamilies": + ["IPv4"]}, "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", + "clientId":"00000000-0000-0000-0000-000000000001", "objectId":"00000000-0000-0000-0000-000000000001"}}, + "disableLocalAccounts": false, "securityProfile": {}, "storageProfile": {}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + Content-Length: + - '2885' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --disable-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitesttnflbbdak-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Updating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"enableNamespaceResources\": false,\n \ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\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/eastus/operations/20725249-fb40-442e-9038-51a5de8650ca?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '4378' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:34: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 + 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-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/20725249-fb40-442e-9038-51a5de8650ca?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"49527220-40fb-2e44-9038-51a5de8650ca\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:34:36.0666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:35:10 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-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/20725249-fb40-442e-9038-51a5de8650ca?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"49527220-40fb-2e44-9038-51a5de8650ca\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:34:36.0666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:35: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: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/20725249-fb40-442e-9038-51a5de8650ca?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"49527220-40fb-2e44-9038-51a5de8650ca\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:34:36.0666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:36: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 update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/20725249-fb40-442e-9038-51a5de8650ca?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"49527220-40fb-2e44-9038-51a5de8650ca\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-07-11T10:34:36.0666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:36: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 update + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --disable-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/20725249-fb40-442e-9038-51a5de8650ca?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"49527220-40fb-2e44-9038-51a5de8650ca\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-07-11T10:34:36.0666666Z\",\n \"\ + endTime\": \"2022-07-11T10:36:52.3673165Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:37: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 --disable-namespace-resources + User-Agent: + - AZURECLI/2.37.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/19.1.0b + Python/3.10.4 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-05-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.22.6\",\n \"currentKubernetesVersion\"\ + : \"1.22.6\",\n \"dnsPrefix\": \"cliakstest-clitesttnflbbdak-1bfbb5\",\n\ + \ \"fqdn\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitesttnflbbdak-1bfbb5-0a12a5b3.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \ + \ \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.22.6\"\ + ,\n \"currentOrchestratorVersion\": \"1.22.6\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.06.22\",\n \"upgradeSettings\":\ + \ {},\n \"enableFIPS\": false\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_eastus\",\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_eastus/providers/Microsoft.Network/publicIPAddresses/61fe398d-efa2-4253-9f63-be522702845c\"\ + \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 \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"enableNamespaceResources\": false,\n \ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\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: + - '4380' + content-type: + - application/json + date: + - Mon, 11 Jul 2022 10:37: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/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 31197740dcb..2d83e5cd335 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -18,7 +18,7 @@ ) from azext_aks_preview.tests.latest.recording_processors import KeyReplacer from azure.cli.command_modules.acs._format import version_to_tuple -from azure.cli.core.azclierror import AzureInternalError, BadRequestError +from azure.cli.core.azclierror import AzureInternalError, BadRequestError, MutuallyExclusiveArgumentError from azure.cli.testsdk import CliTestError, ScenarioTest, live_only from azure.cli.testsdk.scenario_tests import AllowLargeResponse from azure.core.exceptions import HttpResponseError @@ -387,6 +387,62 @@ def test_aks_create_with_ingress_appgw_addon(self, resource_group, resource_grou 'addonProfiles.ingressApplicationGateway.config.subnetCIDR', "10.232.0.0/16") ]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + def test_aks_create_with_namespace_enabled(self, resource_group, resource_group_location="eastus"): + 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-namespace-resources --ssh-key-value={ssh_key_value}' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('enableNamespaceResources', True) + ]) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + def test_aks_update_enable_namespace(self, resource_group, resource_group_location="eastus"): + 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_cmd = 'aks update --resource-group={resource_group} --name={name} --enable-namespace-resources' + self.cmd(update_cmd, checks=[ + self.check('enableNamespaceResources', True) + ]) + + update_cmd = 'aks update --resource-group={resource_group} --name={name} --disable-namespace-resources' + self.cmd(update_cmd, checks=[ + self.check('enableNamespaceResources', False) + ]) + + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + def test_aks_get_credentials_at_namespace_scope(self, resource_group): + 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-namespace-resources --ssh-key-value={ssh_key_value}' + self.cmd(create_cmd) + print("Cluster created, sleeping for 300 seconds") + time.sleep(300) # Sleep for 300 seconds to allow hydration of namespaces + get_credentials_command = 'aks get-credentials --resource-group={resource_group} --name={name} --namespace default' + with self.assertRaisesRegexp(HttpResponseError, ".* ListUserCredentials for Namespaces is not supported for non AAD clusters.*"): # ListUserCredential will fail for non-aad clusters. By verifying this error, we can verify that the call has reached the RP. + self.cmd(get_credentials_command) + @live_only() @AllowLargeResponse() @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/__init__.py new file mode 100644 index 00000000000..50a362d00f9 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._namespace_client import NamespaceClient + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk +__all__ = ['NamespaceClient'] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_configuration.py new file mode 100644 index 00000000000..c4b08ad3b0d --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_configuration.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# 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 + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class NamespaceClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for NamespaceClient. + + 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: The Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). + :type subscription_id: str + :keyword api_version: Api Version. Default value is "2021-12-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + super(NamespaceClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-12-01-preview") # type: str + + 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.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', []) + kwargs.setdefault('sdk_moniker', 'namespaceclient/{}'.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 policies.HttpLoggingPolicy(**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 not self.credential_scopes and not self.authentication_policy: + raise ValueError("You must provide either credential_scopes or authentication_policy as kwargs") + 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/namespace_client/_namespace_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_namespace_client.py new file mode 100644 index 00000000000..dd18e57294c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_namespace_client.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core import PipelineClient + +from . import models +from ._configuration import NamespaceClientConfiguration +from .operations import NamespaceClientOperationsMixin, NamespacesOperations, Operations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class NamespaceClient(NamespaceClientOperationsMixin): + """APIs used to get and list namespace resources through ARM for Kubernetes Clusters. + + :ivar namespaces: NamespacesOperations operations + :vartype namespaces: namespace_client.operations.NamespacesOperations + :ivar operations: Operations operations + :vartype operations: namespace_client.operations.Operations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2021-12-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url="https://management.azure.com", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = NamespaceClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = PipelineClient(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._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.namespaces = NamespacesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize + ) + + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> NamespaceClient + 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/namespace_client/_patch.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_patch.py new file mode 100644 index 00000000000..8a35ddb87c7 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_patch.py @@ -0,0 +1,23 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import List + +__all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_vendor.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_vendor.py new file mode 100644 index 00000000000..79eba78ed32 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/_vendor.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/__init__.py new file mode 100644 index 00000000000..50a362d00f9 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._namespace_client import NamespaceClient + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk +__all__ = ['NamespaceClient'] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/_configuration.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/_configuration.py new file mode 100644 index 00000000000..6e5eff3375c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# 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 + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class NamespaceClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for NamespaceClient. + + 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: The Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). + :type subscription_id: str + :keyword api_version: Api Version. Default value is "2021-12-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(NamespaceClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-12-01-preview") # type: str + + 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.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', []) + kwargs.setdefault('sdk_moniker', 'namespaceclient/{}'.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 policies.HttpLoggingPolicy(**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 not self.credential_scopes and not self.authentication_policy: + raise ValueError("You must provide either credential_scopes or authentication_policy as kwargs") + 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/namespace_client/aio/_namespace_client.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/_namespace_client.py new file mode 100644 index 00000000000..d802e6a8d9c --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/_namespace_client.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core import AsyncPipelineClient +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from .. import models +from ._configuration import NamespaceClientConfiguration +from .operations import NamespaceClientOperationsMixin, NamespacesOperations, Operations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class NamespaceClient(NamespaceClientOperationsMixin): + """APIs used to get and list namespace resources through ARM for Kubernetes Clusters. + + :ivar namespaces: NamespacesOperations operations + :vartype namespaces: namespace_client.aio.operations.NamespacesOperations + :ivar operations: Operations operations + :vartype operations: namespace_client.aio.operations.Operations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2021-12-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = NamespaceClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = AsyncPipelineClient(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._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.namespaces = NamespacesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize + ) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "NamespaceClient": + 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/namespace_client/aio/_patch.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/_patch.py new file mode 100644 index 00000000000..8a35ddb87c7 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/_patch.py @@ -0,0 +1,23 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import List + +__all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/__init__.py new file mode 100644 index 00000000000..9d012048b5b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/__init__.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._namespaces_operations import NamespacesOperations +from ._namespace_client_operations import NamespaceClientOperationsMixin +from ._operations import Operations + +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk +__all__ = [ + 'NamespacesOperations', + 'NamespaceClientOperationsMixin', + 'Operations', +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_namespace_client_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_namespace_client_operations.py new file mode 100644 index 00000000000..5486ab9db79 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_namespace_client_operations.py @@ -0,0 +1,109 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar, Union + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._namespace_client_operations import build_list_user_credential_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NamespaceClientOperationsMixin: + + @distributed_trace_async + async def list_user_credential( + self, + resource_group_name: str, + cluster_rp: Union[str, "_models.Enum0"], + cluster_resource_name: Union[str, "_models.Enum1"], + cluster_name: str, + namespace_name: str, + properties: Optional[_models.ArcListUserCredentialProperties] = None, + **kwargs: Any + ) -> _models.CredentialResults: + """Get the kubeconfig of the cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_rp: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + :type cluster_rp: str or ~namespace_client.models.Enum0 + :param cluster_resource_name: The Kubernetes cluster resource name - either managedClusters + (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + :type cluster_resource_name: str or ~namespace_client.models.Enum1 + :param cluster_name: The name of the kubernetes cluster. + :type cluster_name: str + :param namespace_name: Name of the Namespace. + :type namespace_name: str + :param properties: ListUserCredential properties for Arc Clusters. Default value is None. + :type properties: ~namespace_client.models.ArcListUserCredentialProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~namespace_client.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[_models.CredentialResults] + + if properties is not None: + _json = self._serialize.body(properties, 'ArcListUserCredentialProperties') + else: + _json = None + + request = build_list_user_credential_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + cluster_rp=cluster_rp, + cluster_resource_name=cluster_resource_name, + cluster_name=cluster_name, + namespace_name=namespace_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_user_credential.metadata['url'], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_user_credential.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces/{namespaceName}/listUserCredential"} # type: ignore + diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_namespaces_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_namespaces_operations.py new file mode 100644 index 00000000000..029add8107b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_namespaces_operations.py @@ -0,0 +1,220 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +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 +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._namespaces_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NamespacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~namespace_client.aio.NamespaceClient`'s + :attr:`namespaces` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + cluster_rp: Union[str, "_models.Enum0"], + cluster_resource_name: Union[str, "_models.Enum1"], + cluster_name: str, + namespace_name: str, + **kwargs: Any + ) -> _models.Namespace: + """Get details about the namespace resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_rp: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + :type cluster_rp: str or ~namespace_client.models.Enum0 + :param cluster_resource_name: The Kubernetes cluster resource name - either managedClusters + (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + :type cluster_resource_name: str or ~namespace_client.models.Enum1 + :param cluster_name: The name of the kubernetes cluster. + :type cluster_name: str + :param namespace_name: Name of the Namespace. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Namespace, or the result of cls(response) + :rtype: ~namespace_client.models.Namespace + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[_models.Namespace] + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + cluster_rp=cluster_rp, + cluster_resource_name=cluster_resource_name, + cluster_name=cluster_name, + namespace_name=namespace_name, + api_version=api_version, + template_url=self.get.metadata['url'], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Namespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces/{namespaceName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + cluster_rp: Union[str, "_models.Enum0"], + cluster_resource_name: Union[str, "_models.Enum1"], + cluster_name: str, + **kwargs: Any + ) -> AsyncIterable[_models.NamespaceList]: + """List namespaces in the cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_rp: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + :type cluster_rp: str or ~namespace_client.models.Enum0 + :param cluster_resource_name: The Kubernetes cluster resource name - either managedClusters + (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + :type cluster_resource_name: str or ~namespace_client.models.Enum1 + :param cluster_name: The name of the kubernetes cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NamespaceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~namespace_client.models.NamespaceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[_models.NamespaceList] + + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + cluster_rp=cluster_rp, + cluster_resource_name=cluster_resource_name, + cluster_name=cluster_name, + api_version=api_version, + template_url=self.list.metadata['url'], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + cluster_rp=cluster_rp, + cluster_resource_name=cluster_resource_name, + cluster_name=cluster_name, + api_version=api_version, + template_url=next_link, + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NamespaceList", 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( # pylint: disable=protected-access + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces"} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_operations.py new file mode 100644 index 00000000000..0d8c1756d8b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_operations.py @@ -0,0 +1,119 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +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 +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~namespace_client.aio.NamespaceClient`'s + :attr:`operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable[_models.ResourceProviderOperationList]: + """List all the available operations the KubernetesConfiguration resource provider supports. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceProviderOperationList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~namespace_client.models.ResourceProviderOperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[_models.ResourceProviderOperationList] + + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + + request = build_list_request( + api_version=api_version, + template_url=next_link, + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ResourceProviderOperationList", 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( # pylint: disable=protected-access + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/providers/Microsoft.KubernetesConfiguration/operations"} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_patch.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_patch.py new file mode 100644 index 00000000000..8a35ddb87c7 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/aio/operations/_patch.py @@ -0,0 +1,23 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import List + +__all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/__init__.py new file mode 100644 index 00000000000..03b356491bf --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/__init__.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ArcListUserCredentialProperties + from ._models_py3 import CredentialResult + from ._models_py3 import CredentialResults + from ._models_py3 import ErrorDefinition + from ._models_py3 import ErrorResponse + from ._models_py3 import HybridConnectionConfig + from ._models_py3 import Namespace + from ._models_py3 import NamespaceList + from ._models_py3 import ProxyResource + from ._models_py3 import Resource + from ._models_py3 import ResourceProviderOperation + from ._models_py3 import ResourceProviderOperationDisplay + from ._models_py3 import ResourceProviderOperationList + from ._models_py3 import SystemData +except (SyntaxError, ImportError): + from ._models import ArcListUserCredentialProperties # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import ErrorDefinition # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import HybridConnectionConfig # type: ignore + from ._models import Namespace # type: ignore + from ._models import NamespaceList # type: ignore + from ._models import ProxyResource # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceProviderOperation # type: ignore + from ._models import ResourceProviderOperationDisplay # type: ignore + from ._models import ResourceProviderOperationList # type: ignore + from ._models import SystemData # type: ignore + +from ._namespace_client_enums import ( + AuthenticationMethod, + CreatedByType, + Enum0, + Enum1, +) +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk +__all__ = [ + 'ArcListUserCredentialProperties', + 'CredentialResult', + 'CredentialResults', + 'ErrorDefinition', + 'ErrorResponse', + 'HybridConnectionConfig', + 'Namespace', + 'NamespaceList', + 'ProxyResource', + 'Resource', + 'ResourceProviderOperation', + 'ResourceProviderOperationDisplay', + 'ResourceProviderOperationList', + 'SystemData', + 'AuthenticationMethod', + 'CreatedByType', + 'Enum0', + 'Enum1', +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_models.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_models.py new file mode 100644 index 00000000000..828361e0aa8 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_models.py @@ -0,0 +1,595 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class ArcListUserCredentialProperties(msrest.serialization.Model): + """Properties required in body of listUserCredential call for Arc clusters. + + All required parameters must be populated in order to send to Azure. + + :ivar authentication_method: Required. The mode of client authentication. Known values are: + "Token", "AAD". + :vartype authentication_method: str or ~namespace_client.models.AuthenticationMethod + :ivar client_proxy: Required. Boolean value to indicate whether the request is for client side + proxy or not. + :vartype client_proxy: bool + """ + + _validation = { + 'authentication_method': {'required': True}, + 'client_proxy': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'client_proxy': {'key': 'clientProxy', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword authentication_method: Required. The mode of client authentication. Known values are: + "Token", "AAD". + :paramtype authentication_method: str or ~namespace_client.models.AuthenticationMethod + :keyword client_proxy: Required. Boolean value to indicate whether the request is for client + side proxy or not. + :paramtype client_proxy: bool + """ + super(ArcListUserCredentialProperties, self).__init__(**kwargs) + self.authentication_method = kwargs['authentication_method'] + self.client_proxy = kwargs['client_proxy'] + + +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 hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access + token. + :vartype hybrid_connection_config: ~namespace_client.models.HybridConnectionConfig + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~namespace_client.models.CredentialResult] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + +class ErrorDefinition(msrest.serialization.Model): + """Error definition. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Service specific error code which serves as the substatus for the HTTP + error code. + :vartype code: str + :ivar message: Required. Description of the error. + :vartype message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: Required. Service specific error code which serves as the substatus for the HTTP + error code. + :paramtype code: str + :keyword message: Required. Description of the error. + :paramtype message: str + """ + super(ErrorDefinition, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + + +class ErrorResponse(msrest.serialization.Model): + """Error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: Error definition. + :vartype error: ~namespace_client.models.ErrorDefinition + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = None + + +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :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(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :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(ProxyResource, self).__init__(**kwargs) + + +class Namespace(ProxyResource): + """The Namespace object returned by Get calls. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: System metadata recommended for all azure objects. + :vartype system_data: ~namespace_client.models.SystemData + :ivar uid: Unique ID for the namespace resource. + :vartype uid: str + :ivar creation_timestamp: Time of creation of namespace in cluster. + :vartype creation_timestamp: ~datetime.datetime + :ivar deletion_timestamp: Time of deletion of namespace in cluster. + :vartype deletion_timestamp: ~datetime.datetime + :ivar resource_version: A number which is used to identify when the resource has been modified. + :vartype resource_version: str + :ivar labels: Key Value pairs to identify the resource. + :vartype labels: dict[str, str] + :ivar annotations: Key Value pairs to give more information about the namespace. + :vartype annotations: dict[str, str] + :ivar status: States whether the namespace is active/terminating. + :vartype status: str + :ivar azure_portal_fqdn: FQDN of the namespace resource. Used for portal browse. + :vartype azure_portal_fqdn: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'uid': {'key': 'properties.uid', 'type': 'str'}, + 'creation_timestamp': {'key': 'properties.creationTimestamp', 'type': 'iso-8601'}, + 'deletion_timestamp': {'key': 'properties.deletionTimestamp', 'type': 'iso-8601'}, + 'resource_version': {'key': 'properties.resourceVersion', 'type': 'str'}, + 'labels': {'key': 'properties.labels', 'type': '{str}'}, + 'annotations': {'key': 'properties.annotations', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword uid: Unique ID for the namespace resource. + :paramtype uid: str + :keyword creation_timestamp: Time of creation of namespace in cluster. + :paramtype creation_timestamp: ~datetime.datetime + :keyword deletion_timestamp: Time of deletion of namespace in cluster. + :paramtype deletion_timestamp: ~datetime.datetime + :keyword resource_version: A number which is used to identify when the resource has been + modified. + :paramtype resource_version: str + :keyword labels: Key Value pairs to identify the resource. + :paramtype labels: dict[str, str] + :keyword annotations: Key Value pairs to give more information about the namespace. + :paramtype annotations: dict[str, str] + :keyword status: States whether the namespace is active/terminating. + :paramtype status: str + :keyword azure_portal_fqdn: FQDN of the namespace resource. Used for portal browse. + :paramtype azure_portal_fqdn: str + """ + super(Namespace, self).__init__(**kwargs) + self.system_data = None + self.uid = kwargs.get('uid', None) + self.creation_timestamp = kwargs.get('creation_timestamp', None) + self.deletion_timestamp = kwargs.get('deletion_timestamp', None) + self.resource_version = kwargs.get('resource_version', None) + self.labels = kwargs.get('labels', None) + self.annotations = kwargs.get('annotations', None) + self.status = kwargs.get('status', None) + self.azure_portal_fqdn = kwargs.get('azure_portal_fqdn', None) + + +class NamespaceList(msrest.serialization.Model): + """List of namespaces returned. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Namespaces within a Kubernetes cluster. + :vartype value: list[~namespace_client.models.Namespace] + :ivar next_link: URL to get the next set of Namespace objects, if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Namespace]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NamespaceList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ResourceProviderOperation(msrest.serialization.Model): + """Supported operation of this resource provider. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Operation name, in format of {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: Display metadata associated with the operation. + :vartype display: ~namespace_client.models.ResourceProviderOperationDisplay + :ivar origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :vartype origin: str + :ivar is_data_action: The flag that indicates whether the operation applies to data plane. + :vartype is_data_action: bool + """ + + _validation = { + 'is_data_action': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Operation name, in format of {provider}/{resource}/{operation}. + :paramtype name: str + :keyword display: Display metadata associated with the operation. + :paramtype display: ~namespace_client.models.ResourceProviderOperationDisplay + :keyword origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :paramtype origin: str + """ + super(ResourceProviderOperation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.is_data_action = None + + +class ResourceProviderOperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :ivar provider: Resource provider: Microsoft KubernetesConfiguration. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: Type of operation: get, read, delete, etc. + :vartype operation: str + :ivar description: Description of this operation. + :vartype description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword provider: Resource provider: Microsoft KubernetesConfiguration. + :paramtype provider: str + :keyword resource: Resource on which the operation is performed. + :paramtype resource: str + :keyword operation: Type of operation: get, read, delete, etc. + :paramtype operation: str + :keyword description: Description of this operation. + :paramtype description: str + """ + super(ResourceProviderOperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class ResourceProviderOperationList(msrest.serialization.Model): + """Result of the request to list operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations supported by this resource provider. + :vartype value: list[~namespace_client.models.ResourceProviderOperation] + :ivar next_link: URL to the next set of results, if any. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceProviderOperation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: List of operations supported by this resource provider. + :paramtype value: list[~namespace_client.models.ResourceProviderOperation] + """ + super(ResourceProviderOperationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~namespace_client.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~namespace_client.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", "Key". + :paramtype created_by_type: str or ~namespace_client.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Known + values are: "User", "Application", "ManagedIdentity", "Key". + :paramtype last_modified_by_type: str or ~namespace_client.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_models_py3.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_models_py3.py new file mode 100644 index 00000000000..0cf48aa7158 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_models_py3.py @@ -0,0 +1,635 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, TYPE_CHECKING, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + import __init__ as _models + + +class ArcListUserCredentialProperties(msrest.serialization.Model): + """Properties required in body of listUserCredential call for Arc clusters. + + All required parameters must be populated in order to send to Azure. + + :ivar authentication_method: Required. The mode of client authentication. Known values are: + "Token", "AAD". + :vartype authentication_method: str or ~namespace_client.models.AuthenticationMethod + :ivar client_proxy: Required. Boolean value to indicate whether the request is for client side + proxy or not. + :vartype client_proxy: bool + """ + + _validation = { + 'authentication_method': {'required': True}, + 'client_proxy': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'client_proxy': {'key': 'clientProxy', 'type': 'bool'}, + } + + def __init__( + self, + *, + authentication_method: Union[str, "_models.AuthenticationMethod"], + client_proxy: bool, + **kwargs + ): + """ + :keyword authentication_method: Required. The mode of client authentication. Known values are: + "Token", "AAD". + :paramtype authentication_method: str or ~namespace_client.models.AuthenticationMethod + :keyword client_proxy: Required. Boolean value to indicate whether the request is for client + side proxy or not. + :paramtype client_proxy: bool + """ + super(ArcListUserCredentialProperties, self).__init__(**kwargs) + self.authentication_method = authentication_method + self.client_proxy = client_proxy + + +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 hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access + token. + :vartype hybrid_connection_config: ~namespace_client.models.HybridConnectionConfig + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~namespace_client.models.CredentialResult] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + +class ErrorDefinition(msrest.serialization.Model): + """Error definition. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Service specific error code which serves as the substatus for the HTTP + error code. + :vartype code: str + :ivar message: Required. Description of the error. + :vartype message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + **kwargs + ): + """ + :keyword code: Required. Service specific error code which serves as the substatus for the HTTP + error code. + :paramtype code: str + :keyword message: Required. Description of the error. + :paramtype message: str + """ + super(ErrorDefinition, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse(msrest.serialization.Model): + """Error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: Error definition. + :vartype error: ~namespace_client.models.ErrorDefinition + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDefinition'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = None + + +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :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(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :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(ProxyResource, self).__init__(**kwargs) + + +class Namespace(ProxyResource): + """The Namespace object returned by Get calls. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: System metadata recommended for all azure objects. + :vartype system_data: ~namespace_client.models.SystemData + :ivar uid: Unique ID for the namespace resource. + :vartype uid: str + :ivar creation_timestamp: Time of creation of namespace in cluster. + :vartype creation_timestamp: ~datetime.datetime + :ivar deletion_timestamp: Time of deletion of namespace in cluster. + :vartype deletion_timestamp: ~datetime.datetime + :ivar resource_version: A number which is used to identify when the resource has been modified. + :vartype resource_version: str + :ivar labels: Key Value pairs to identify the resource. + :vartype labels: dict[str, str] + :ivar annotations: Key Value pairs to give more information about the namespace. + :vartype annotations: dict[str, str] + :ivar status: States whether the namespace is active/terminating. + :vartype status: str + :ivar azure_portal_fqdn: FQDN of the namespace resource. Used for portal browse. + :vartype azure_portal_fqdn: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'uid': {'key': 'properties.uid', 'type': 'str'}, + 'creation_timestamp': {'key': 'properties.creationTimestamp', 'type': 'iso-8601'}, + 'deletion_timestamp': {'key': 'properties.deletionTimestamp', 'type': 'iso-8601'}, + 'resource_version': {'key': 'properties.resourceVersion', 'type': 'str'}, + 'labels': {'key': 'properties.labels', 'type': '{str}'}, + 'annotations': {'key': 'properties.annotations', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, + } + + def __init__( + self, + *, + uid: Optional[str] = None, + creation_timestamp: Optional[datetime.datetime] = None, + deletion_timestamp: Optional[datetime.datetime] = None, + resource_version: Optional[str] = None, + labels: Optional[Dict[str, str]] = None, + annotations: Optional[Dict[str, str]] = None, + status: Optional[str] = None, + azure_portal_fqdn: Optional[str] = None, + **kwargs + ): + """ + :keyword uid: Unique ID for the namespace resource. + :paramtype uid: str + :keyword creation_timestamp: Time of creation of namespace in cluster. + :paramtype creation_timestamp: ~datetime.datetime + :keyword deletion_timestamp: Time of deletion of namespace in cluster. + :paramtype deletion_timestamp: ~datetime.datetime + :keyword resource_version: A number which is used to identify when the resource has been + modified. + :paramtype resource_version: str + :keyword labels: Key Value pairs to identify the resource. + :paramtype labels: dict[str, str] + :keyword annotations: Key Value pairs to give more information about the namespace. + :paramtype annotations: dict[str, str] + :keyword status: States whether the namespace is active/terminating. + :paramtype status: str + :keyword azure_portal_fqdn: FQDN of the namespace resource. Used for portal browse. + :paramtype azure_portal_fqdn: str + """ + super(Namespace, self).__init__(**kwargs) + self.system_data = None + self.uid = uid + self.creation_timestamp = creation_timestamp + self.deletion_timestamp = deletion_timestamp + self.resource_version = resource_version + self.labels = labels + self.annotations = annotations + self.status = status + self.azure_portal_fqdn = azure_portal_fqdn + + +class NamespaceList(msrest.serialization.Model): + """List of namespaces returned. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Namespaces within a Kubernetes cluster. + :vartype value: list[~namespace_client.models.Namespace] + :ivar next_link: URL to get the next set of Namespace objects, if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Namespace]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NamespaceList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ResourceProviderOperation(msrest.serialization.Model): + """Supported operation of this resource provider. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Operation name, in format of {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: Display metadata associated with the operation. + :vartype display: ~namespace_client.models.ResourceProviderOperationDisplay + :ivar origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :vartype origin: str + :ivar is_data_action: The flag that indicates whether the operation applies to data plane. + :vartype is_data_action: bool + """ + + _validation = { + 'is_data_action': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["_models.ResourceProviderOperationDisplay"] = None, + origin: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Operation name, in format of {provider}/{resource}/{operation}. + :paramtype name: str + :keyword display: Display metadata associated with the operation. + :paramtype display: ~namespace_client.models.ResourceProviderOperationDisplay + :keyword origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :paramtype origin: str + """ + super(ResourceProviderOperation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.is_data_action = None + + +class ResourceProviderOperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :ivar provider: Resource provider: Microsoft KubernetesConfiguration. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: Type of operation: get, read, delete, etc. + :vartype operation: str + :ivar description: Description of this operation. + :vartype description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword provider: Resource provider: Microsoft KubernetesConfiguration. + :paramtype provider: str + :keyword resource: Resource on which the operation is performed. + :paramtype resource: str + :keyword operation: Type of operation: get, read, delete, etc. + :paramtype operation: str + :keyword description: Description of this operation. + :paramtype description: str + """ + super(ResourceProviderOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class ResourceProviderOperationList(msrest.serialization.Model): + """Result of the request to list operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations supported by this resource provider. + :vartype value: list[~namespace_client.models.ResourceProviderOperation] + :ivar next_link: URL to the next set of results, if any. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceProviderOperation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["_models.ResourceProviderOperation"]] = None, + **kwargs + ): + """ + :keyword value: List of operations supported by this resource provider. + :paramtype value: list[~namespace_client.models.ResourceProviderOperation] + """ + super(ResourceProviderOperationList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~namespace_client.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~namespace_client.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", "Key". + :paramtype created_by_type: str or ~namespace_client.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Known + values are: "User", "Application", "ManagedIdentity", "Key". + :paramtype last_modified_by_type: str or ~namespace_client.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_namespace_client_enums.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_namespace_client_enums.py new file mode 100644 index 00000000000..5358391de39 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_namespace_client_enums.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class AuthenticationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The mode of client authentication. + """ + + TOKEN = "Token" + AAD = "AAD" + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class Enum0(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + MICROSOFT_CONTAINER_SERVICE = "Microsoft.ContainerService" + MICROSOFT_KUBERNETES = "Microsoft.Kubernetes" + +class Enum1(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + MANAGED_CLUSTERS = "managedClusters" + CONNECTED_CLUSTERS = "connectedClusters" diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_patch.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_patch.py new file mode 100644 index 00000000000..8a35ddb87c7 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/models/_patch.py @@ -0,0 +1,23 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import List + +__all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/__init__.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/__init__.py new file mode 100644 index 00000000000..9d012048b5b --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/__init__.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._namespaces_operations import NamespacesOperations +from ._namespace_client_operations import NamespaceClientOperationsMixin +from ._operations import Operations + +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk +__all__ = [ + 'NamespacesOperations', + 'NamespaceClientOperationsMixin', + 'Operations', +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_namespace_client_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_namespace_client_operations.py new file mode 100644 index 00000000000..0b2959473cc --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_namespace_client_operations.py @@ -0,0 +1,166 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_user_credential_request( + subscription_id, # type: str + resource_group_name, # type: str + cluster_rp, # type: Union[str, "_models.Enum0"] + cluster_resource_name, # type: Union[str, "_models.Enum1"] + cluster_name, # type: str + namespace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', None)) # type: Optional[str] + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces/{namespaceName}/listUserCredential") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "clusterRp": _SERIALIZER.url("cluster_rp", cluster_rp, 'str'), + "clusterResourceName": _SERIALIZER.url("cluster_resource_name", cluster_resource_name, 'str'), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str'), + "namespaceName": _SERIALIZER.url("namespace_name", namespace_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + if content_type is not None: + _headers['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + +# fmt: on +class NamespaceClientOperationsMixin(object): + + @distributed_trace + def list_user_credential( + self, + resource_group_name, # type: str + cluster_rp, # type: Union[str, "_models.Enum0"] + cluster_resource_name, # type: Union[str, "_models.Enum1"] + cluster_name, # type: str + namespace_name, # type: str + properties=None, # type: Optional[_models.ArcListUserCredentialProperties] + **kwargs # type: Any + ): + # type: (...) -> _models.CredentialResults + """Get the kubeconfig of the cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_rp: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + :type cluster_rp: str or ~namespace_client.models.Enum0 + :param cluster_resource_name: The Kubernetes cluster resource name - either managedClusters + (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + :type cluster_resource_name: str or ~namespace_client.models.Enum1 + :param cluster_name: The name of the kubernetes cluster. + :type cluster_name: str + :param namespace_name: Name of the Namespace. + :type namespace_name: str + :param properties: ListUserCredential properties for Arc Clusters. Default value is None. + :type properties: ~namespace_client.models.ArcListUserCredentialProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~namespace_client.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + content_type = kwargs.pop('content_type', _headers.pop('Content-Type', "application/json")) # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[_models.CredentialResults] + + if properties is not None: + _json = self._serialize.body(properties, 'ArcListUserCredentialProperties') + else: + _json = None + + request = build_list_user_credential_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + cluster_rp=cluster_rp, + cluster_resource_name=cluster_resource_name, + cluster_name=cluster_name, + namespace_name=namespace_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_user_credential.metadata['url'], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_user_credential.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces/{namespaceName}/listUserCredential"} # type: ignore + diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_namespaces_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_namespaces_operations.py new file mode 100644 index 00000000000..6e3ae2d1fbf --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_namespaces_operations.py @@ -0,0 +1,316 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +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 HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + cluster_rp, # type: Union[str, "_models.Enum0"] + cluster_resource_name, # type: Union[str, "_models.Enum1"] + cluster_name, # type: str + namespace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces/{namespaceName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "clusterRp": _SERIALIZER.url("cluster_rp", cluster_rp, 'str'), + "clusterResourceName": _SERIALIZER.url("cluster_resource_name", cluster_resource_name, 'str'), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str'), + "namespaceName": _SERIALIZER.url("namespace_name", namespace_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + cluster_rp, # type: Union[str, "_models.Enum0"] + cluster_resource_name, # type: Union[str, "_models.Enum1"] + cluster_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "clusterRp": _SERIALIZER.url("cluster_rp", cluster_rp, 'str'), + "clusterResourceName": _SERIALIZER.url("cluster_resource_name", cluster_resource_name, 'str'), + "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + +# fmt: on +class NamespacesOperations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~namespace_client.NamespaceClient`'s + :attr:`namespaces` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + cluster_rp, # type: Union[str, "_models.Enum0"] + cluster_resource_name, # type: Union[str, "_models.Enum1"] + cluster_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> _models.Namespace + """Get details about the namespace resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_rp: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + :type cluster_rp: str or ~namespace_client.models.Enum0 + :param cluster_resource_name: The Kubernetes cluster resource name - either managedClusters + (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + :type cluster_resource_name: str or ~namespace_client.models.Enum1 + :param cluster_name: The name of the kubernetes cluster. + :type cluster_name: str + :param namespace_name: Name of the Namespace. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Namespace, or the result of cls(response) + :rtype: ~namespace_client.models.Namespace + :raises: ~azure.core.exceptions.HttpResponseError + """ + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[_models.Namespace] + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + cluster_rp=cluster_rp, + cluster_resource_name=cluster_resource_name, + cluster_name=cluster_name, + namespace_name=namespace_name, + api_version=api_version, + template_url=self.get.metadata['url'], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Namespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces/{namespaceName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name, # type: str + cluster_rp, # type: Union[str, "_models.Enum0"] + cluster_resource_name, # type: Union[str, "_models.Enum1"] + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable[_models.NamespaceList] + """List namespaces in the cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_rp: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS + clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + :type cluster_rp: str or ~namespace_client.models.Enum0 + :param cluster_resource_name: The Kubernetes cluster resource name - either managedClusters + (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + :type cluster_resource_name: str or ~namespace_client.models.Enum1 + :param cluster_name: The name of the kubernetes cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NamespaceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~namespace_client.models.NamespaceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[_models.NamespaceList] + + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + cluster_rp=cluster_rp, + cluster_resource_name=cluster_resource_name, + cluster_name=cluster_name, + api_version=api_version, + template_url=self.list.metadata['url'], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + cluster_rp=cluster_rp, + cluster_resource_name=cluster_resource_name, + cluster_name=cluster_name, + api_version=api_version, + template_url=next_link, + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NamespaceList", 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( # pylint: disable=protected-access + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/namespaces"} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_operations.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_operations.py new file mode 100644 index 00000000000..048b59006f0 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_operations.py @@ -0,0 +1,156 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.4, generator: @autorest/python@5.16.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from msrest import Serializer + +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 HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace + +from .. import models as _models +from .._vendor import _convert_request + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + accept = _headers.pop('Accept', "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.KubernetesConfiguration/operations") + + # Construct parameters + _params['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _headers['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_params, + headers=_headers, + **kwargs + ) + +# fmt: on +class Operations(object): + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~namespace_client.NamespaceClient`'s + :attr:`operations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable[_models.ResourceProviderOperationList] + """List all the available operations the KubernetesConfiguration resource provider supports. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceProviderOperationList or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~namespace_client.models.ResourceProviderOperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + api_version = kwargs.pop('api_version', _params.pop('api-version', "2021-12-01-preview")) # type: str + cls = kwargs.pop('cls', None) # type: ClsType[_models.ResourceProviderOperationList] + + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {}) or {}) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + + request = build_list_request( + api_version=api_version, + template_url=next_link, + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ResourceProviderOperationList", 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( # pylint: disable=protected-access + 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/providers/Microsoft.KubernetesConfiguration/operations"} # type: ignore diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_patch.py b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_patch.py new file mode 100644 index 00000000000..8a35ddb87c7 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/operations/_patch.py @@ -0,0 +1,23 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import List + +__all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/py.typed b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/src/aks-preview/azext_aks_preview/vendored_sdks/namespace_client/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/src/aks-preview/linter_exclusions.yml b/src/aks-preview/linter_exclusions.yml index 747ef2a1e15..ffd5bdbc2e8 100644 --- a/src/aks-preview/linter_exclusions.yml +++ b/src/aks-preview/linter_exclusions.yml @@ -21,6 +21,9 @@ aks create: enable_workload_identity: rule_exclusions: - option_length_too_long + enable_namespace_resources: + rule_exclusions: + - option_length_too_long disable_snapshot_controller: rule_exclusions: - option_length_too_long @@ -77,6 +80,12 @@ aks update: enable_workload_identity: rule_exclusions: - option_length_too_long + enable_namespace_resources: + rule_exclusions: + - option_length_too_long + disable_namespace_resources: + rule_exclusions: + - option_length_too_long enable_snapshot_controller: rule_exclusions: - option_length_too_long